From: Ben Hutchings Date: Wed, 14 Jul 2010 01:52:43 +0000 (+0100) Subject: Merge branch 'upstream' X-Git-Tag: debian/1%1.1.0-1~1 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=3f0395ca63d99e6bc39c1bc8109b716d8d824681;hp=6d8fa3a51242c630084dd4f365285eb9129a9b46 Merge branch 'upstream' Conflicts: Makefile.in aclocal.m4 config.guess config.sub configure linux-nfs/Makefile.in support/Makefile.in support/export/Makefile.in support/include/Makefile.in support/include/config.h.in support/include/nfs/Makefile.in support/include/rpcsvc/Makefile.in support/include/sys/Makefile.in support/include/sys/fs/Makefile.in support/misc/Makefile.in support/nfs/Makefile.in tools/Makefile.in tools/locktest/Makefile.in tools/nlmtest/Makefile.in tools/rpcdebug/Makefile.in tools/rpcgen/Makefile.in utils/Makefile.in utils/exportfs/Makefile.in utils/gssd/Makefile.in utils/idmapd/Makefile.in utils/mount/Makefile.in utils/mountd/Makefile.in utils/nfsd/Makefile.in utils/nfsstat/Makefile.in utils/showmount/Makefile.in utils/statd/Makefile.in --- diff --git a/Makefile.in b/Makefile.in index 41514d5..0b3dbac 100644 --- a/Makefile.in +++ b/Makefile.in @@ -39,6 +39,7 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/NEWS b/NEWS index e71acf1..e70ae8a 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ Significant changes for nfs-utils 1.1.0 - March/April 2007 - rpc.lockd is gone. One 3 old kernel releases need it. + - rpc.rquotad is gone. Use the one from the 'quota' package. + Everone else does. - /sbin/{u,}mount.nfs{,4} are now installed so 'mount' will use these to mount nfs filesystems instead of internal code. + mount.nfs will check for 'statd' to be running when mounting @@ -33,12 +35,12 @@ Significant changes for nfs-utils 1.1.0 - March/April 2007 - Comprehensive notes on startup dependencies have been added to the README file. - Mount and statd now listen on a non-privileged port by default. - For maximum safety an upgrade to portmap is recommended. + For maximum safety an upgrade to portmap-6.0 is recommended. + http://neil.brown.name/portmap/ git://neil.brown.name/portmap - This release should work with MIT Kerberos and Heimdal 0.8.1 and later. - - A new option, -n, was added to rpc.gssd which specifies that accesses by root should not use 'machine credentials' when accessing NFS file systems mounted with Kerberos. Using this @@ -58,3 +60,4 @@ Significant changes for nfs-utils 1.1.0 - March/April 2007 root/@REALM nfs/@REALM host/@REALM + diff --git a/README b/README index aa4666f..e2196da 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -This is version 1.0.1 of nfs-utils, the Linux NFS utility package. +This is version 1.1.0 of nfs-utils, the Linux NFS utility package. 0. PROJECT RESOURCES diff --git a/aclocal.m4 b/aclocal.m4 index e90a163..2a1b805 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -7452,5 +7452,6 @@ AC_SUBST([am__untar]) m4_include([aclocal/bsdsignals.m4]) m4_include([aclocal/kerberos5.m4]) +m4_include([aclocal/libblkid.m4]) m4_include([aclocal/nfs-utils.m4]) m4_include([aclocal/tcp-wrappers.m4]) diff --git a/aclocal/kerberos5.m4 b/aclocal/kerberos5.m4 index 2475f50..dfa5738 100644 --- a/aclocal/kerberos5.m4 +++ b/aclocal/kerberos5.m4 @@ -97,6 +97,10 @@ AC_DEFUN([AC_KERBEROS_V5],[ AC_CHECK_LIB($gssapi_lib, krb5_get_error_message, AC_DEFINE(HAVE_KRB5_GET_ERROR_MESSAGE, 1, [Define this if the function krb5_get_error_message is available]), ,$KRBLIBS) + dnl Check for function to specify addressless tickets + AC_CHECK_LIB($gssapi_lib, krb5_get_init_creds_opt_set_addressless, + AC_DEFINE(HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS, 1, [Define this if the function krb5_get_init_creds_opt_set_addressless is available]), ,$KRBLIBS) + dnl If they specified a directory and it didn't work, give them a warning if test "x$krb5_with" != "x" -a "$krb5_with" != "$KRBDIR"; then AC_MSG_WARN(Using $KRBDIR instead of requested value of $krb5_with for Kerberos!) diff --git a/aclocal/libblkid.m4 b/aclocal/libblkid.m4 new file mode 100644 index 0000000..d751a8c --- /dev/null +++ b/aclocal/libblkid.m4 @@ -0,0 +1,20 @@ +dnl *************************** libblkid needs version 1.40 or later *********************** +AC_DEFUN([AC_BLKID_VERS], [ + AC_MSG_CHECKING(for suitable libblkid version) + AC_CACHE_VAL(libblkid_is_recent, + [ + saved_LIBS="$LIBS" + LIBS=-lblkid + AC_TRY_RUN([ + #include + int main() + { + int vers = blkid_get_library_version(0, 0); + return vers >= 140 ? 0 : 1; + } + ], libblkid_is_recent=yes, libblkid_is_recent=no, + libblkid_is_recent=unknown) + LIBS="$saved_LIBS" + ])dnl + AC_MSG_RESULT($libblkid_is_recent) +])dnl diff --git a/config.guess b/config.guess index 396482d..0f0fe71 100755 --- a/config.guess +++ b/config.guess @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. -timestamp='2006-07-02' +timestamp='2007-03-06' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -161,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -780,7 +781,7 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - i*:MINGW*:*) + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) @@ -790,12 +791,15 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; @@ -950,6 +954,9 @@ EOF x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; + xtensa:Linux:*:*) + echo xtensa-unknown-linux-gnu + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -1208,6 +1215,15 @@ EOF SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; diff --git a/config.sub b/config.sub index fab0aa3..5defff6 100755 --- a/config.sub +++ b/config.sub @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. -timestamp='2006-09-20' +timestamp='2007-01-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -245,12 +245,12 @@ case $basic_machine in | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ + | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -324,7 +324,7 @@ case $basic_machine in | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ @@ -925,6 +925,9 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -1219,7 +1222,7 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1414,6 +1417,9 @@ case $basic_machine in m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; diff --git a/configure b/configure index 85fb8c2..ee0f532 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for linux nfs-utils 1.1.0-rc2. +# Generated by GNU Autoconf 2.61 for linux nfs-utils 1.1.0. # # Report bugs to . # @@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='linux nfs-utils' PACKAGE_TARNAME='nfs-utils' -PACKAGE_VERSION='1.1.0-rc2' -PACKAGE_STRING='linux nfs-utils 1.1.0-rc2' +PACKAGE_VERSION='1.1.0' +PACKAGE_STRING='linux nfs-utils 1.1.0' PACKAGE_BUGREPORT='nfs@lists.sf.net' ac_default_prefix=/usr @@ -856,8 +856,6 @@ CONFIG_GSS_TRUE CONFIG_GSS_FALSE kprefix secure_statd -CONFIG_RQUOTAD_TRUE -CONFIG_RQUOTAD_FALSE RPCGEN_PATH CONFIG_RPCGEN_TRUE CONFIG_RPCGEN_FALSE @@ -1450,7 +1448,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures linux nfs-utils 1.1.0-rc2 to adapt to many kinds of systems. +\`configure' configures linux nfs-utils 1.1.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1520,7 +1518,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of linux nfs-utils 1.1.0-rc2:";; + short | recursive ) echo "Configuration of linux nfs-utils 1.1.0:";; esac cat <<\_ACEOF @@ -1534,7 +1532,6 @@ Optional Features: --enable-gss enable support for rpcsec_gss [default=yes] --enable-kprefix install progs as rpc.knfsd etc --enable-secure-statd Only lockd can use statd (security) - --enable-rquotad enable rquotad [default=yes] --without-uuid Exclude uuid support and so avoid possibly buggy libblkid --enable-mount Create mount.nfs and don't use the util-linux @@ -1654,7 +1651,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -linux nfs-utils configure 1.1.0-rc2 +linux nfs-utils configure 1.1.0 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1668,7 +1665,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by linux nfs-utils $as_me 1.1.0-rc2, which was +It was created by linux nfs-utils $as_me 1.1.0, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2442,7 +2439,7 @@ fi # Define the identity of the package. PACKAGE='nfs-utils' - VERSION='1.1.0-rc2' + VERSION='1.1.0' cat >>confdefs.h <<_ACEOF @@ -2762,26 +2759,6 @@ _ACEOF fi -# Check whether --enable-rquotad was given. -if test "${enable_rquotad+set}" = set; then - enableval=$enable_rquotad; enable_rquotad=$enableval -else - enable_rquotad=yes -fi - - if test "$enable_rquotad" = yes; then - RQUOTAD=rquotad - else - RQUOTAD= - fi - if test "$enable_rquotad" = "yes"; then - CONFIG_RQUOTAD_TRUE= - CONFIG_RQUOTAD_FALSE='#' -else - CONFIG_RQUOTAD_TRUE='#' - CONFIG_RQUOTAD_FALSE= -fi - # Check whether --with-rpcgen was given. if test "${with_rpcgen+set}" = set; then @@ -2808,16 +2785,11 @@ fi # Check whether --enable-uuid was given. if test "${enable_uuid+set}" = set; then - enableval=$enable_uuid; if test "$enableval" = "yes" ; then use_blkid=1; else use_blkid=0; fi + enableval=$enable_uuid; if test "$enableval" = "yes" ; then choose_blkid=yes; else choose_blkid=no; fi else - use_blkid=1 + choose_blkid=default fi - -cat >>confdefs.h <<_ACEOF -#define USE_BLKID $use_blkid -_ACEOF - # Check whether --enable-mount was given. if test "${enable_mount+set}" = set; then enableval=$enable_mount; enable_mount=$enableval @@ -6706,7 +6678,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6709 "configure"' > conftest.$ac_ext + echo '#line 6681 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8735,11 +8707,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8738: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8710: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8742: \$? = $ac_status" >&5 + echo "$as_me:8714: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9003,11 +8975,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9006: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8978: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9010: \$? = $ac_status" >&5 + echo "$as_me:8982: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9107,11 +9079,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9110: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9082: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9114: \$? = $ac_status" >&5 + echo "$as_me:9086: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11404,7 +11376,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13815: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13847: \$? = $ac_status" >&5 + echo "$as_me:13819: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13944,11 +13916,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13947: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13919: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13951: \$? = $ac_status" >&5 + echo "$as_me:13923: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15505,11 +15477,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15508: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15480: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15512: \$? = $ac_status" >&5 + echo "$as_me:15484: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15609,11 +15581,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15612: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15584: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15616: \$? = $ac_status" >&5 + echo "$as_me:15588: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17796,11 +17768,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17799: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17771: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17803: \$? = $ac_status" >&5 + echo "$as_me:17775: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -18064,11 +18036,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18067: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18039: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:18071: \$? = $ac_status" >&5 + echo "$as_me:18043: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -18168,11 +18140,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18171: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18143: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:18175: \$? = $ac_status" >&5 + echo "$as_me:18147: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -22655,10 +22627,11 @@ if test $ac_cv_lib_bsd_daemon = yes; then fi fi -if test "$use_blkid" = 1; then - { echo "$as_me:$LINENO: checking for blkid_get_cache in -lblkid" >&5 -echo $ECHO_N "checking for blkid_get_cache in -lblkid... $ECHO_C" >&6; } -if test "${ac_cv_lib_blkid_blkid_get_cache+set}" = set; then + +if test "$choose_blkid" != no; then + { echo "$as_me:$LINENO: checking for blkid_get_library_version in -lblkid" >&5 +echo $ECHO_N "checking for blkid_get_library_version in -lblkid... $ECHO_C" >&6; } +if test "${ac_cv_lib_blkid_blkid_get_library_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -22676,11 +22649,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char blkid_get_cache (); +char blkid_get_library_version (); int main () { -return blkid_get_cache (); +return blkid_get_library_version (); ; return 0; } @@ -22703,21 +22676,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_blkid_blkid_get_cache=yes + ac_cv_lib_blkid_blkid_get_library_version=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_blkid_blkid_get_cache=no + ac_cv_lib_blkid_blkid_get_library_version=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_blkid_blkid_get_cache" >&5 -echo "${ECHO_T}$ac_cv_lib_blkid_blkid_get_cache" >&6; } -if test $ac_cv_lib_blkid_blkid_get_cache = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_blkid_blkid_get_library_version" >&5 +echo "${ECHO_T}$ac_cv_lib_blkid_blkid_get_library_version" >&6; } +if test $ac_cv_lib_blkid_blkid_get_library_version = yes; then LIBBLKID="-lblkid" else { { echo "$as_me:$LINENO: error: libblkid needed" >&5 @@ -22858,12 +22831,95 @@ fi if test $ac_cv_header_blkid_blkid_h = yes; then : else - { { echo "$as_me:$LINENO: error: Cannot file libblkid header file blkid/blkid.h" >&5 -echo "$as_me: error: Cannot file libblkid header file blkid/blkid.h" >&2;} + { { echo "$as_me:$LINENO: error: Cannot find libblkid header file blkid/blkid.h" >&5 +echo "$as_me: error: Cannot find libblkid header file blkid/blkid.h" >&2;} { (exit 1); exit 1; }; } fi + + { echo "$as_me:$LINENO: checking for suitable libblkid version" >&5 +echo $ECHO_N "checking for suitable libblkid version... $ECHO_C" >&6; } + if test "${libblkid_is_recent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + saved_LIBS="$LIBS" + LIBS=-lblkid + if test "$cross_compiling" = yes; then + libblkid_is_recent=unknown +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + int main() + { + int vers = blkid_get_library_version(0, 0); + return vers >= 140 ? 0 : 1; + } + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + libblkid_is_recent=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +libblkid_is_recent=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + LIBS="$saved_LIBS" + +fi + { echo "$as_me:$LINENO: result: $libblkid_is_recent" >&5 +echo "${ECHO_T}$libblkid_is_recent" >&6; } + + if test $choose_blkid = yes; then + use_blkid=1 + test $libblkid_is_recent = no && { echo "$as_me:$LINENO: WARNING: libblkid is old and may cause mountd to leak memory" >&5 +echo "$as_me: WARNING: libblkid is old and may cause mountd to leak memory" >&2;} + else + if test $libblkid_is_recent = yes + then use_blkid=1 + else use_blkid=0 + { echo "$as_me:$LINENO: WARNING: uuid support disabled as libblkid is too old" >&5 +echo "$as_me: WARNING: uuid support disabled as libblkid is too old" >&2;} + fi + fi + +cat >>confdefs.h <<_ACEOF +#define USE_BLKID $use_blkid +_ACEOF + fi @@ -23616,6 +23672,78 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_KRB5_GET_ERROR_MESSAGE 1 _ACEOF +fi + + + as_ac_Lib=`echo "ac_cv_lib_$gssapi_lib''_krb5_get_init_creds_opt_set_addressless" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for krb5_get_init_creds_opt_set_addressless in -l$gssapi_lib" >&5 +echo $ECHO_N "checking for krb5_get_init_creds_opt_set_addressless in -l$gssapi_lib... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l$gssapi_lib $KRBLIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char krb5_get_init_creds_opt_set_addressless (); +int +main () +{ +return krb5_get_init_creds_opt_set_addressless (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_Lib=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS 1 +_ACEOF + fi @@ -29597,7 +29725,7 @@ AM_CFLAGS="$my_am_cflags" ACLOCAL_AMFLAGS="-I $ac_macro_dir \$(ACLOCAL_FLAGS)" -ac_config_files="$ac_config_files Makefile linux-nfs/Makefile support/Makefile support/export/Makefile support/include/nfs/Makefile support/include/rpcsvc/Makefile support/include/sys/fs/Makefile support/include/sys/Makefile support/include/Makefile support/misc/Makefile support/nfs/Makefile tools/Makefile tools/locktest/Makefile tools/nlmtest/Makefile tools/rpcdebug/Makefile tools/rpcgen/Makefile utils/Makefile utils/exportfs/Makefile utils/gssd/Makefile utils/idmapd/Makefile utils/mount/Makefile utils/mountd/Makefile utils/nfsd/Makefile utils/nfsstat/Makefile utils/rquotad/Makefile utils/showmount/Makefile utils/statd/Makefile" +ac_config_files="$ac_config_files Makefile linux-nfs/Makefile support/Makefile support/export/Makefile support/include/nfs/Makefile support/include/rpcsvc/Makefile support/include/sys/fs/Makefile support/include/sys/Makefile support/include/Makefile support/misc/Makefile support/nfs/Makefile tools/Makefile tools/locktest/Makefile tools/nlmtest/Makefile tools/rpcdebug/Makefile tools/rpcgen/Makefile utils/Makefile utils/exportfs/Makefile utils/gssd/Makefile utils/idmapd/Makefile utils/mount/Makefile utils/mountd/Makefile utils/nfsd/Makefile utils/nfsstat/Makefile utils/showmount/Makefile utils/statd/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -29716,13 +29844,6 @@ echo "$as_me: error: conditional \"CONFIG_GSS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${CONFIG_RQUOTAD_TRUE}" && test -z "${CONFIG_RQUOTAD_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"CONFIG_RQUOTAD\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"CONFIG_RQUOTAD\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi if test -z "${CONFIG_RPCGEN_TRUE}" && test -z "${CONFIG_RPCGEN_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"CONFIG_RPCGEN\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -30065,7 +30186,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by linux nfs-utils $as_me 1.1.0-rc2, which was +This file was extended by linux nfs-utils $as_me 1.1.0, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -30118,7 +30239,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -linux nfs-utils config.status 1.1.0-rc2 +linux nfs-utils config.status 1.1.0 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -30258,7 +30379,6 @@ do "utils/mountd/Makefile") CONFIG_FILES="$CONFIG_FILES utils/mountd/Makefile" ;; "utils/nfsd/Makefile") CONFIG_FILES="$CONFIG_FILES utils/nfsd/Makefile" ;; "utils/nfsstat/Makefile") CONFIG_FILES="$CONFIG_FILES utils/nfsstat/Makefile" ;; - "utils/rquotad/Makefile") CONFIG_FILES="$CONFIG_FILES utils/rquotad/Makefile" ;; "utils/showmount/Makefile") CONFIG_FILES="$CONFIG_FILES utils/showmount/Makefile" ;; "utils/statd/Makefile") CONFIG_FILES="$CONFIG_FILES utils/statd/Makefile" ;; @@ -30409,8 +30529,6 @@ CONFIG_GSS_TRUE!$CONFIG_GSS_TRUE$ac_delim CONFIG_GSS_FALSE!$CONFIG_GSS_FALSE$ac_delim kprefix!$kprefix$ac_delim secure_statd!$secure_statd$ac_delim -CONFIG_RQUOTAD_TRUE!$CONFIG_RQUOTAD_TRUE$ac_delim -CONFIG_RQUOTAD_FALSE!$CONFIG_RQUOTAD_FALSE$ac_delim RPCGEN_PATH!$RPCGEN_PATH$ac_delim CONFIG_RPCGEN_TRUE!$CONFIG_RPCGEN_TRUE$ac_delim CONFIG_RPCGEN_FALSE!$CONFIG_RPCGEN_FALSE$ac_delim @@ -30420,6 +30538,8 @@ CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -30461,8 +30581,6 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim @@ -30523,7 +30641,7 @@ ACLOCAL_AMFLAGS!$ACLOCAL_AMFLAGS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 60; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 58; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/configure.ac b/configure.ac index 3757208..0c4f4f0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. dnl -AC_INIT([linux nfs-utils],[1.1.0-rc2],[nfs@lists.sf.net],[nfs-utils]) +AC_INIT([linux nfs-utils],[1.1.0],[nfs@lists.sf.net],[nfs-utils]) AC_CANONICAL_BUILD([]) AC_CANONICAL_HOST([]) AC_CONFIG_MACRO_DIR(aclocal) @@ -104,17 +104,6 @@ AC_ARG_ENABLE(secure-statd, AC_DEFINE(RESTRICTED_STATD, 1, [Define this if you want to enable various security checks in statd. These checks basically keep anyone but lockd from using this service.]) fi AC_SUBST(secure_statd) -AC_ARG_ENABLE(rquotad, - [AC_HELP_STRING([--enable-rquotad], - [enable rquotad @<:@default=yes@:>@])], - enable_rquotad=$enableval, - enable_rquotad=yes) - if test "$enable_rquotad" = yes; then - RQUOTAD=rquotad - else - RQUOTAD= - fi - AM_CONDITIONAL(CONFIG_RQUOTAD, [test "$enable_rquotad" = "yes"]) AC_ARG_WITH(rpcgen, [AC_HELP_STRING([--with-rpcgen=internal], [use internal rpcgen instead of system one])], rpcgen_path=$withval, @@ -130,9 +119,8 @@ AC_ARG_WITH(rpcgen, AM_CONDITIONAL(CONFIG_RPCGEN, [test "$RPCGEN_PATH" == ""]) AC_ARG_ENABLE(uuid, [AC_HELP_STRING([--without-uuid], [Exclude uuid support and so avoid possibly buggy libblkid])], - if test "$enableval" = "yes" ; then use_blkid=1; else use_blkid=0; fi, - use_blkid=1) - AC_DEFINE_UNQUOTED(USE_BLKID, $use_blkid, [Define if you want to use blkid to find uuid of filesystems]) + if test "$enableval" = "yes" ; then choose_blkid=yes; else choose_blkid=no; fi, + choose_blkid=default) AC_ARG_ENABLE(mount, [AC_HELP_STRING([--enable-mount], [Create mount.nfs and don't use the util-linux mount(8) functionality. @<:@default=no@:>@])], @@ -204,9 +192,22 @@ fi if test "$knfsd_cv_glibc2" = no; then AC_CHECK_LIB(bsd, daemon, [LIBBSD="-lbsd"]) fi -if test "$use_blkid" = 1; then - AC_CHECK_LIB(blkid, blkid_get_cache, [LIBBLKID="-lblkid"], AC_MSG_ERROR([libblkid needed])) - AC_CHECK_HEADER(blkid/blkid.h, , AC_MSG_ERROR([Cannot file libblkid header file blkid/blkid.h])) + +if test "$choose_blkid" != no; then + AC_CHECK_LIB(blkid, blkid_get_library_version, [LIBBLKID="-lblkid"], AC_MSG_ERROR([libblkid needed])) + AC_CHECK_HEADER(blkid/blkid.h, , AC_MSG_ERROR([Cannot find libblkid header file blkid/blkid.h])) + AC_BLKID_VERS + if test $choose_blkid = yes; then + use_blkid=1 + test $libblkid_is_recent = no && AC_MSG_WARN([libblkid is old and may cause mountd to leak memory]) + else + if test $libblkid_is_recent = yes + then use_blkid=1 + else use_blkid=0 + AC_MSG_WARN([uuid support disabled as libblkid is too old]) + fi + fi + AC_DEFINE_UNQUOTED(USE_BLKID, $use_blkid, [Define if you want to use blkid to find uuid of filesystems]) fi AC_SUBST(LIBSOCKET) AC_SUBST(LIBCRYPT) @@ -365,7 +366,6 @@ AC_CONFIG_FILES([ utils/mountd/Makefile utils/nfsd/Makefile utils/nfsstat/Makefile - utils/rquotad/Makefile utils/showmount/Makefile utils/statd/Makefile]) AC_OUTPUT diff --git a/linux-nfs/Makefile.in b/linux-nfs/Makefile.in index a0e0b7d..4ee59c5 100644 --- a/linux-nfs/Makefile.in +++ b/linux-nfs/Makefile.in @@ -37,6 +37,7 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/support/Makefile.in b/support/Makefile.in index 2759d3d..c4b4b2f 100644 --- a/support/Makefile.in +++ b/support/Makefile.in @@ -36,6 +36,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/support/export/Makefile.in b/support/export/Makefile.in index 8effbc7..c16aede 100644 --- a/support/export/Makefile.in +++ b/support/export/Makefile.in @@ -39,6 +39,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/support/export/xtab.c b/support/export/xtab.c index 0ddb251..292087b 100644 --- a/support/export/xtab.c +++ b/support/export/xtab.c @@ -80,6 +80,12 @@ xtab_export_read(void) return xtab_read(_PATH_ETAB, 1); } +/* + * mountd now keeps an open fd for the etab at all times to make sure that the + * inode number changes when the xtab_export_write is done. If you change the + * routine below such that the files are edited in place, then you'll need to + * fix the auth_reload logic as well... + */ static int xtab_write(char *xtab, char *xtabtmp, int is_export) { diff --git a/support/include/Makefile.in b/support/include/Makefile.in index f5f9204..3693a60 100644 --- a/support/include/Makefile.in +++ b/support/include/Makefile.in @@ -38,6 +38,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/support/include/config.h.in b/support/include/config.h.in index 209d958..33fc547 100644 --- a/support/include/config.h.in +++ b/support/include/config.h.in @@ -123,6 +123,10 @@ /* Define this if the function krb5_get_error_message is available */ #undef HAVE_KRB5_GET_ERROR_MESSAGE +/* Define this if the function krb5_get_init_creds_opt_set_addressless is + available */ +#undef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS + /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H diff --git a/support/include/nfs/Makefile.in b/support/include/nfs/Makefile.in index 52289f5..2eeab4c 100644 --- a/support/include/nfs/Makefile.in +++ b/support/include/nfs/Makefile.in @@ -38,6 +38,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/support/include/rpcsvc/Makefile.in b/support/include/rpcsvc/Makefile.in index 787af32..c80884a 100644 --- a/support/include/rpcsvc/Makefile.in +++ b/support/include/rpcsvc/Makefile.in @@ -38,6 +38,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/support/include/sys/Makefile.in b/support/include/sys/Makefile.in index 0e1f114..abbf1d1 100644 --- a/support/include/sys/Makefile.in +++ b/support/include/sys/Makefile.in @@ -36,6 +36,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/support/include/sys/fs/Makefile.in b/support/include/sys/fs/Makefile.in index f21fcfa..3a25651 100644 --- a/support/include/sys/fs/Makefile.in +++ b/support/include/sys/fs/Makefile.in @@ -38,6 +38,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/support/misc/Makefile.in b/support/misc/Makefile.in index e5ffdad..ed3459e 100644 --- a/support/misc/Makefile.in +++ b/support/misc/Makefile.in @@ -37,6 +37,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/support/nfs/Makefile.in b/support/nfs/Makefile.in index d29596e..6915bff 100644 --- a/support/nfs/Makefile.in +++ b/support/nfs/Makefile.in @@ -37,6 +37,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/tools/Makefile.in b/tools/Makefile.in index 977651c..6e97504 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -37,6 +37,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/tools/locktest/Makefile.in b/tools/locktest/Makefile.in index 6c4cdb0..c6b28f8 100644 --- a/tools/locktest/Makefile.in +++ b/tools/locktest/Makefile.in @@ -38,6 +38,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/tools/nlmtest/Makefile.in b/tools/nlmtest/Makefile.in index d150c51..fc91e57 100644 --- a/tools/nlmtest/Makefile.in +++ b/tools/nlmtest/Makefile.in @@ -36,6 +36,7 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/tools/rpcdebug/Makefile.in b/tools/rpcdebug/Makefile.in index 1745ae6..5e65f4b 100644 --- a/tools/rpcdebug/Makefile.in +++ b/tools/rpcdebug/Makefile.in @@ -38,6 +38,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/tools/rpcgen/Makefile.in b/tools/rpcgen/Makefile.in index 27f2e2b..a1b3ae8 100644 --- a/tools/rpcgen/Makefile.in +++ b/tools/rpcgen/Makefile.in @@ -38,6 +38,7 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/utils/Makefile.am b/utils/Makefile.am index c1bc059..8665183 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -2,10 +2,6 @@ OPTDIRS = -if CONFIG_RQUOTAD -OPTDIRS += rquotad -endif - if CONFIG_NFSV4 OPTDIRS += idmapd endif diff --git a/utils/Makefile.in b/utils/Makefile.in index fb83360..5be695c 100644 --- a/utils/Makefile.in +++ b/utils/Makefile.in @@ -31,15 +31,15 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@CONFIG_RQUOTAD_TRUE@am__append_1 = rquotad -@CONFIG_NFSV4_TRUE@am__append_2 = idmapd -@CONFIG_GSS_TRUE@am__append_3 = gssd -@CONFIG_MOUNT_TRUE@am__append_4 = mount +@CONFIG_NFSV4_TRUE@am__append_1 = idmapd +@CONFIG_GSS_TRUE@am__append_2 = gssd +@CONFIG_MOUNT_TRUE@am__append_3 = mount subdir = utils DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac @@ -61,8 +61,8 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = exportfs mountd nfsd nfsstat showmount statd rquotad \ - idmapd gssd mount +DIST_SUBDIRS = exportfs mountd nfsd nfsstat showmount statd idmapd \ + gssd mount DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ @@ -211,8 +211,7 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -OPTDIRS = $(am__append_1) $(am__append_2) $(am__append_3) \ - $(am__append_4) +OPTDIRS = $(am__append_1) $(am__append_2) $(am__append_3) SUBDIRS = \ exportfs \ mountd \ diff --git a/utils/exportfs/Makefile.in b/utils/exportfs/Makefile.in index 7d5ef33..52822ee 100644 --- a/utils/exportfs/Makefile.in +++ b/utils/exportfs/Makefile.in @@ -38,6 +38,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/utils/gssd/Makefile.in b/utils/gssd/Makefile.in index 1132bc4..65dde52 100644 --- a/utils/gssd/Makefile.in +++ b/utils/gssd/Makefile.in @@ -39,6 +39,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c index 87bd7e4..bf8690e 100644 --- a/utils/gssd/krb5_util.c +++ b/utils/gssd/krb5_util.c @@ -323,7 +323,12 @@ gssd_get_single_krb5_cred(krb5_context context, krb5_keytab kt, struct gssd_k5_kt_princ *ple) { +#if HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS + krb5_get_init_creds_opt *init_opts = NULL; +#else krb5_get_init_creds_opt options; +#endif + krb5_get_init_creds_opt *opts; krb5_creds my_creds; krb5_ccache ccache = NULL; char kt_name[BUFSIZ]; @@ -351,16 +356,37 @@ gssd_get_single_krb5_cred(krb5_context context, if ((krb5_unparse_name(context, ple->princ, &pname))) pname = NULL; +#if HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS + code = krb5_get_init_creds_opt_alloc(context, &init_opts); + if (code) { + printerr(0, "ERROR: %s allocating gic options\n", + gssd_k5_err_msg(context, code)); + goto out; + } + if (krb5_get_init_creds_opt_set_addressless(context, init_opts, 1)) + printerr(0, "WARNING: Unable to set option for addressless " + "tickets. May have problems behind a NAT.\n"); +#ifdef TEST_SHORT_LIFETIME + /* set a short lifetime (for debugging only!) */ + printerr(0, "WARNING: Using (debug) short machine cred lifetime!\n"); + krb5_get_init_creds_opt_set_tkt_life(init_opts, 5*60); +#endif + opts = init_opts; + +#else /* HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS */ + krb5_get_init_creds_opt_init(&options); krb5_get_init_creds_opt_set_address_list(&options, NULL); - #ifdef TEST_SHORT_LIFETIME /* set a short lifetime (for debugging only!) */ printerr(0, "WARNING: Using (debug) short machine cred lifetime!\n"); krb5_get_init_creds_opt_set_tkt_life(&options, 5*60); #endif + opts = &options; +#endif + if ((code = krb5_get_init_creds_keytab(context, &my_creds, ple->princ, - kt, 0, NULL, &options))) { + kt, 0, NULL, opts))) { printerr(0, "WARNING: %s while getting initial ticket for " "principal '%s' using keytab '%s'\n", gssd_k5_err_msg(context, code), @@ -411,6 +437,10 @@ gssd_get_single_krb5_cred(krb5_context context, printerr(2, "Successfully obtained machine credentials for " "principal '%s' stored in ccache '%s'\n", pname, cc_name); out: +#if HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS + if (init_opts) + krb5_get_init_creds_opt_free(context, init_opts); +#endif if (pname) k5_free_unparsed_name(context, pname); if (ccache) diff --git a/utils/idmapd/Makefile.in b/utils/idmapd/Makefile.in index fc12c8e..911b1c6 100644 --- a/utils/idmapd/Makefile.in +++ b/utils/idmapd/Makefile.in @@ -38,6 +38,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/utils/mount/Makefile.in b/utils/mount/Makefile.in index 55da8fa..6d8b372 100644 --- a/utils/mount/Makefile.in +++ b/utils/mount/Makefile.in @@ -38,6 +38,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/utils/mount/nfs4mount.c b/utils/mount/nfs4mount.c index 8aa13c6..2a58d0a 100644 --- a/utils/mount/nfs4mount.c +++ b/utils/mount/nfs4mount.c @@ -352,6 +352,10 @@ int nfs4mount(const char *spec, const char *node, int *flags, /* * Give a warning if the rpc.idmapd daemon is not running */ +#if 0 + /* We shouldn't have these checks as nothing in this package + * creates the files that are checked + */ idmapd_check(); if (num_flavour == 0) @@ -362,6 +366,7 @@ int nfs4mount(const char *spec, const char *node, int *flags, */ gssd_check(); } +#endif data.auth_flavourlen = num_flavour; data.auth_flavours = pseudoflavour; diff --git a/utils/mountd/Makefile.in b/utils/mountd/Makefile.in index 29cd8c6..58e236e 100644 --- a/utils/mountd/Makefile.in +++ b/utils/mountd/Makefile.in @@ -38,6 +38,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c index 183c9ea..f7fe23d 100644 --- a/utils/mountd/auth.c +++ b/utils/mountd/auth.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "misc.h" #include "nfslib.h" #include "exportfs.h" @@ -46,24 +47,34 @@ auth_init(char *exports) xtab_mount_write(); } -time_t +unsigned int auth_reload() { struct stat stb; - static time_t last_modified = 0; - - if (stat(_PATH_ETAB, &stb) < 0) + static ino_t last_inode; + static int last_fd; + static unsigned int counter; + int fd; + + if ((fd = open(_PATH_ETAB, O_RDONLY)) < 0) { + xlog(L_FATAL, "couldn't open %s", _PATH_ETAB); + } else if (fstat(fd, &stb) < 0) { xlog(L_FATAL, "couldn't stat %s", _PATH_ETAB); - if (stb.st_mtime == last_modified) - return last_modified; - last_modified = stb.st_mtime; + } else if (stb.st_ino == last_inode) { + close(fd); + return counter; + } else { + close(last_fd); + last_fd = fd; + last_inode = stb.st_ino; + } export_freeall(); memset(&my_client, 0, sizeof(my_client)); - // export_read(export_file); xtab_export_read(); + ++counter; - return last_modified; + return counter; } static nfs_export * diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c index 04141d1..999f035 100644 --- a/utils/mountd/mountd.c +++ b/utils/mountd/mountd.c @@ -465,18 +465,18 @@ static exports get_exportlist(void) { static exports elist = NULL; - static time_t etime = 0; - time_t atime; struct exportnode *e, *ne; struct groupnode *g, *ng, *c, **cp; nfs_export *exp; int i; + static unsigned int ecounter; + unsigned int acounter; - atime = auth_reload(); - if (elist && atime == etime) + acounter = auth_reload(); + if (elist && acounter == ecounter) return elist; - etime = atime; + ecounter = acounter; for (e = elist; e != NULL; e = ne) { ne = e->ex_next; diff --git a/utils/mountd/mountd.h b/utils/mountd/mountd.h index b539278..31bacb5 100644 --- a/utils/mountd/mountd.h +++ b/utils/mountd/mountd.h @@ -40,7 +40,7 @@ bool_t mount_mnt_3_svc(struct svc_req *, dirpath *, mountres3 *); void mount_dispatch(struct svc_req *, SVCXPRT *); void auth_init(char *export_file); -time_t auth_reload(void); +unsigned int auth_reload(void); nfs_export * auth_authenticate(char *what, struct sockaddr_in *sin, char *path); void auth_export(nfs_export *exp); diff --git a/utils/mountd/mountd.man b/utils/mountd/mountd.man index f8646d4..4276663 100644 --- a/utils/mountd/mountd.man +++ b/utils/mountd/mountd.man @@ -125,6 +125,13 @@ If this option is not specified the default of .BR /var/lib/nfs is used. .TP +.BI "\-r," "" " \-\-reverse\-lookup" +mountd tracks IP addresses in the rmtab, and when a DUMP request is made (by +someone running showmount -a, for instance), it returns IP addresses instead +of hostnames by default. This option causes mountd to do a reverse +lookup on each IP address and return that hostname instead. Enabling this can +have a substantial negative effect on performance in some situations. +.TP .BR "\-t N" " or " "\-\-num\-threads=N" This option specifies the number of worker threads that rpc.mountd spawns. The default is 1 thread, which is probably enough. More diff --git a/utils/nfsd/Makefile.in b/utils/nfsd/Makefile.in index 0c234ff..b03fa34 100644 --- a/utils/nfsd/Makefile.in +++ b/utils/nfsd/Makefile.in @@ -38,6 +38,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/utils/nfsstat/Makefile.in b/utils/nfsstat/Makefile.in index e5da827..2a2c410 100644 --- a/utils/nfsstat/Makefile.in +++ b/utils/nfsstat/Makefile.in @@ -38,6 +38,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/utils/rquotad/Makefile.am b/utils/rquotad/Makefile.am deleted file mode 100644 index 4bc036f..0000000 --- a/utils/rquotad/Makefile.am +++ /dev/null @@ -1,87 +0,0 @@ -## Process this file with automake to produce Makefile.in - - -GENFILES_XDR = rquota_xdr.c -GENFILES_H = rquota.h - -BUILT_SOURCES = $(GENFILES_H) - -GENFILES = $(GENFILES_XDR) $(GENFILES_H) -man8_MANS = rquotad.man - -RPCPREFIX = rpc. -KPREFIX = @kprefix@ -sbin_PROGRAMS = rquotad - -EXTRA_DIST = rquota.x $(man8_MANS) NEW README.okir - -rquotad_SOURCES = rquota_server.c rquota_svc.c rquota_xdr.c quotactl.c \ - hasquota.c mntent.h rquota.h -rquotad_LDADD = ../../support/export/libexport.a \ - ../../support/nfs/libnfs.a \ - ../../support/misc/libmisc.a \ - $(LIBBSD) $(LIBWRAP) $(LIBNSL) -rquotad_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS) \ - -I$(top_srcdir)/support/export - -MAINTAINERCLEANFILES = Makefile.in - -if CONFIG_RPCGEN -RPCGEN = $(top_builddir)/tools/rpcgen/rpcgen -$(RPCGEN): - make -C $(top_srcdir)/tools/rpcgen all -else -RPCGEN = @RPCGEN_PATH@ -endif - -$(GENFILES_XDR): %_xdr.c: %.x $(RPCGEN) - test -f $@ && rm -rf $@ || true - $(RPCGEN) -c -o $@ $< - - -$(GENFILES_H): %.h: %.x $(RPCGEN) - test -f $@ && rm -rf $@ || true - $(RPCGEN) -h -o $@ $< - -CLEANFILES = $(GENFILES) - -####################################################################### -# The following allows the current practice of having -# daemons renamed during the install to include RPCPREFIX -# and the KPREFIX -# This could all be done much easier with program_transform_name -# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) -# but that also renames the man pages, which the current -# practice does not do. -install-exec-hook: - (cd $(DESTDIR)$(sbindir) && \ - for p in $(sbin_PROGRAMS); do \ - mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ - done) -uninstall-hook: - (cd $(DESTDIR)$(sbindir) && \ - for p in $(sbin_PROGRAMS); do \ - rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ - done) - - -# XXX This makes some assumptions about what automake does. -# XXX But there is no install-man-hook or install-man-local. -install-man: install-man8 install-man-links -uninstall-man: uninstall-man8 uninstall-man-links - -install-man-links: - (cd $(DESTDIR)$(man8dir) && \ - for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ - inst=`echo $$m | sed -e 's/man$$/8/'`; \ - rm -f $(RPCPREFIX)$$inst ; \ - $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ - done) - -uninstall-man-links: - (cd $(DESTDIR)$(man8dir) && \ - for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ - inst=`echo $$m | sed -e 's/man$$/8/'`; \ - rm -f $(RPCPREFIX)$$inst ; \ - done) - diff --git a/utils/rquotad/NEW b/utils/rquotad/NEW deleted file mode 100644 index 40c6fd2..0000000 --- a/utils/rquotad/NEW +++ /dev/null @@ -1,3 +0,0 @@ -This is Marco van Wieringen's rpc.rquotad in quotas-1.70 from - -ftp://ftp.cistron.nl/pub/people/mvw/quota diff --git a/utils/rquotad/README.okir b/utils/rquotad/README.okir deleted file mode 100644 index 08938b9..0000000 --- a/utils/rquotad/README.okir +++ /dev/null @@ -1,3 +0,0 @@ - -This is Marco van Wieringen's rpc.rquotad from quotas-1.55. - diff --git a/utils/rquotad/hasquota.c b/utils/rquotad/hasquota.c deleted file mode 100644 index d2d8115..0000000 --- a/utils/rquotad/hasquota.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * QUOTA An implementation of the diskquota system for the LINUX - * operating system. QUOTA is implemented using the BSD systemcall - * interface as the means of communication with the user level. - * Should work for all filesystems because of integration into the - * VFS layer of the operating system. - * This is based on the Melbourne quota system wich uses both user and - * group quota files. - * - * Determines if a filesystem has quota enabled and how the quotafile - * is named. - * - * Version: $Id: hasquota.c,v 2.6 1996/11/17 16:59:46 mvw Exp mvw $ - * - * Author: Marco van Wieringen - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#define _LINUX_QUOTA_VERSION 1 - -#include -#include -#include -#include -#include "mntent.h" -#include "xmalloc.h" - -#undef min -#define min(x,y) ((x) < (y)) ? (x) : (y) - -#define CORRECT_FSTYPE(type) \ -((!strcmp(type,MNTTYPE_EXT2)) || (!strcmp(type,MNTTYPE_EXT3))) - -char *qfextension[] = INITQFNAMES; - -/* - * Check to see if a particular quota is to be enabled. - */ -int -hasquota(struct mntent *mnt, int type, char **qfnamep) -{ - char *qfname = QUOTAFILENAME; - char *option, *pathname; - - if (!CORRECT_FSTYPE(mnt->mnt_type)) - return (0); - - if (((type == USRQUOTA) && (option = hasmntopt(mnt, MNTOPT_USRQUOTA)) != (char *)0) || - ((type == GRPQUOTA) && (option = hasmntopt(mnt, MNTOPT_GRPQUOTA)) != (char *)0)) { - if ((pathname = strchr(option, '=')) == (char *)0) { - *qfnamep=xmalloc(strlen(mnt->mnt_dir)+strlen(qfname)+strlen(qfextension[type])+3); - (void) sprintf(*qfnamep, "%s%s%s.%s", mnt->mnt_dir, - (mnt->mnt_dir[strlen(mnt->mnt_dir) - 1] == '/') ? "" : "/", - qfname, qfextension[type]); - } else { - if ((option = strchr(++pathname, ',')) != (char *)NULL) { - int len=option-pathname; - *qfnamep=xmalloc(len); - memcpy(*qfnamep, pathname, len-1); - (*qfnamep) [len-1] = '\0'; - } - else { - *qfnamep=xstrdup(pathname); - } - } - return (1); - } else - return (0); -} diff --git a/utils/rquotad/mntent.h b/utils/rquotad/mntent.h deleted file mode 100644 index 34ded5f..0000000 --- a/utils/rquotad/mntent.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef _MNTENT_H -#define _MNTENT_H - -#include - -#define MNTTAB "/etc/fstab" -#define MOUNTED "/etc/mtab" - -#define MNTMAXSTR 512 - -#define MNTTYPE_COHERENT "coherent" /* Coherent file system */ -#define MNTTYPE_EXT "ext" /* Extended file system */ -#define MNTTYPE_EXT2 "ext2" /* Second Extended file system */ -#define MNTTYPE_EXT3 "ext3" /* Journaled Second Extended file system */ -#define MNTTYPE_HPFS "hpfs" /* OS/2's high performance file system */ -#define MNTTYPE_ISO9660 "iso9660" /* ISO CDROM file system */ -#define MNTTYPE_MINIX "minix" /* MINIX file system */ -#define MNTTYPE_MSDOS "msdos" /* MS-DOS file system */ -#define MNTTYPE_SYSV "sysv" /* System V file system */ -#define MNTTYPE_UMSDOS "umsdos" /* U MS-DOS file system */ -#define MNTTYPE_XENIX "xenix" /* Xenix file system */ -#define MNTTYPE_XIAFS "xiafs" /* Frank Xia's file system */ -#define MNTTYPE_NFS "nfs" /* Network file system */ -#define MNTTYPE_PROC "proc" /* Linux process file system */ -#define MNTTYPE_IGNORE "ignore" /* Ignore this entry */ -#define MNTTYPE_SWAP "swap" /* Swap device */ - -/* generic mount options */ -#define MNTOPT_DEFAULTS "defaults" /* use all default opts */ -#define MNTOPT_RO "ro" /* read only */ -#define MNTOPT_RW "rw" /* read/write */ -#define MNTOPT_SUID "suid" /* set uid allowed */ -#define MNTOPT_NOSUID "nosuid" /* no set uid allowed */ -#define MNTOPT_NOAUTO "noauto" /* don't auto mount */ - -/* ext2 and msdos options */ -#define MNTOPT_CHECK "check" /* filesystem check level */ - -/* ext2 specific options */ -#define MNTOPT_BSDDF "bsddf" /* disable MINIX compatibility disk free counting */ -#define MNTOPT_BSDGROUPS "bsdgroups" /* set BSD group usage */ -#define MNTOPT_ERRORS "errors" /* set behaviour on error */ -#define MNTOPT_GRPID "grpid" /* set BSD group usage */ -#define MNTOPT_MINIXDF "minixdf" /* enable MINIX compatibility disk free counting */ -#define MNTOPT_NOCHECK "nocheck" /* reset filesystem checks */ -#define MNTOPT_NOGRPID "nogrpid" /* set SYSV group usage */ -#define MNTOPT_RESGID "resgid" /* group to consider like root for reserved blocks */ -#define MNTOPT_RESUID "resuid" /* user to consider like root for reserved blocks */ -#define MNTOPT_SB "sb" /* set used super block */ -#define MNTOPT_SYSVGROUPS "sysvgroups" /* set SYSV group usage */ - -/* options common to hpfs, isofs, and msdos */ -#define MNTOPT_CONV "conv" /* convert specified types of data */ -#define MNTOPT_GID "gid" /* use given gid */ -#define MNTOPT_UID "uid" /* use given uid */ -#define MNTOPT_UMASK "umask" /* use given umask, not isofs */ - -/* hpfs specific options */ -#define MNTOPT_CASE "case" /* case conversation */ - -/* isofs specific options */ -#define MNTOPT_BLOCK "block" /* use given block size */ -#define MNTOPT_CRUFT "cruft" /* ??? */ -#define MNTOPT_MAP "map" /* ??? */ -#define MNTOPT_NOROCK "norock" /* not rockwell format ??? */ - -/* msdos specific options */ -#define MNTOPT_FAT "fat" /* set FAT size */ -#define MNTOPT_QUIET "quiet" /* ??? */ - -/* swap specific options */ - -/* options common to ext, ext2, minix, xiafs, sysv, xenix, coherent */ -#define MNTOPT_NOQUOTA "noquota" /* don't use any quota on this partition */ -#define MNTOPT_USRQUOTA "usrquota" /* use userquota on this partition */ -#define MNTOPT_GRPQUOTA "grpquota" /* use groupquota on this partition */ -#define MNTOPT_RSQUASH "rsquash" /* threat root as an ordinary user */ - -/* none defined yet */ - -__BEGIN_DECLS - -struct mntent{ - char *mnt_fsname; - char *mnt_dir; - char *mnt_type; - char *mnt_opts; - int mnt_freq; - int mnt_passno; -}; - -__END_DECLS - -#define __need_file -#include - -__BEGIN_DECLS - -extern FILE *setmntent __P ((__const char *__filep, - __const char *__type)); -extern struct mntent - *getmntent __P ((FILE *__filep)); -extern int addmntent __P ((FILE *__filep, - __const struct mntent *__mnt)); -extern char *hasmntopt __P ((__const struct mntent *__mnt, - __const char *__opt)); -extern int endmntent __P ((FILE *__filep)); - -extern int hasquota __P ((struct mntent *, int, char **)); - -__END_DECLS - -#endif /* _MNTENT_H */ diff --git a/utils/rquotad/quotactl.c b/utils/rquotad/quotactl.c deleted file mode 100644 index 8966335..0000000 --- a/utils/rquotad/quotactl.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * QUOTA An implementation of the diskquota system for the LINUX - * operating system. QUOTA is implemented using the BSD systemcall - * interface as the means of communication with the user level. - * Should work for all filesystems because of integration into the - * VFS layer of the operating system. - * This is based on the Melbourne quota system wich uses both user and - * group quota files. - * - * System call interface. - * - * Version: $Id: quotactl.c,v 2.3 1995/07/23 09:58:06 mvw Exp mvw $ - * - * Author: Marco van Wieringen - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -int quotactl(int cmd, const char * special, int id, caddr_t addr) -{ - return syscall(SYS_quotactl, cmd, special, id, addr); -} diff --git a/utils/rquotad/rquota.x b/utils/rquotad/rquota.x deleted file mode 100644 index 120abe5..0000000 --- a/utils/rquotad/rquota.x +++ /dev/null @@ -1,84 +0,0 @@ -/* @(#)rquota.x 2.1 88/08/01 4.0 RPCSRC */ -/* @(#)rquota.x 1.2 87/09/20 Copyr 1987 Sun Micro */ - -/* - * Remote quota protocol - * Requires unix authentication - */ - -#ifdef RPC_CLNT -%#include -#endif - -const RQ_PATHLEN = 1024; - -struct getquota_args { - string gqa_pathp; /* path to filesystem of interest */ - int gqa_uid; /* Inquire about quota for uid */ -}; - -struct ext_getquota_args { - string gqa_pathp; /* path to filesystem of interest */ - int gqa_type; /* Type of quota info is needed about */ - int gqa_id; /* Inquire about quota for id */ -}; - -/* - * remote quota structure - */ -struct rquota { - int rq_bsize; /* block size for block counts */ - bool rq_active; /* indicates whether quota is active */ - unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */ - unsigned int rq_bsoftlimit; /* preferred limit on disk blks */ - unsigned int rq_curblocks; /* current block count */ - unsigned int rq_fhardlimit; /* absolute limit on allocated files */ - unsigned int rq_fsoftlimit; /* preferred file limit */ - unsigned int rq_curfiles; /* current # allocated files */ - unsigned int rq_btimeleft; /* time left for excessive disk use */ - unsigned int rq_ftimeleft; /* time left for excessive files */ -}; - -enum gqr_status { - Q_OK = 1, /* quota returned */ - Q_NOQUOTA = 2, /* noquota for uid */ - Q_EPERM = 3 /* no permission to access quota */ -}; - -union getquota_rslt switch (gqr_status status) { -case Q_OK: - rquota gqr_rquota; /* valid if status == Q_OK */ -case Q_NOQUOTA: - void; -case Q_EPERM: - void; -}; - -program RQUOTAPROG { - version RQUOTAVERS { - /* - * Get all quotas - */ - getquota_rslt - RQUOTAPROC_GETQUOTA(getquota_args) = 1; - - /* - * Get active quotas only - */ - getquota_rslt - RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2; - } = 1; - version EXT_RQUOTAVERS { - /* - * Get all quotas - */ - getquota_rslt - RQUOTAPROC_GETQUOTA(ext_getquota_args) = 1; - - /* - * Get active quotas only - */ - getquota_rslt - RQUOTAPROC_GETACTIVEQUOTA(ext_getquota_args) = 2; - } = 2; -} = 100011; diff --git a/utils/rquotad/rquota_server.c b/utils/rquotad/rquota_server.c deleted file mode 100644 index f8bd8f1..0000000 --- a/utils/rquotad/rquota_server.c +++ /dev/null @@ -1,283 +0,0 @@ -/* - * QUOTA An implementation of the diskquota system for the LINUX - * operating system. QUOTA is implemented using the BSD systemcall - * interface as the means of communication with the user level. - * Should work for all filesystems because of integration into the - * VFS layer of the operating system. - * This is based on the Melbourne quota system wich uses both user and - * group quota files. - * - * This part does the lookup of the info. - * - * Version: $Id: rquota_server.c,v 2.9 1996/11/17 16:59:46 mvw Exp mvw $ - * - * Author: Marco van Wieringen - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include "rquota.h" -#include -#include -#include -/* Unfortunately we cannot trust sys/quota.h to have - * what we need, either the old interface could be missing - * (SLES9) or the new (SLES8 and others). - * So we will just put it explicitly below - */ -#if 0 -#include -#endif -#include -#include -#include -#include -#include -#include -#include "mntent.h" -#include "xmalloc.h" - -#define TYPE_EXTENDED 0x01 -#define ACTIVE 0x02 - -#ifndef MNTTYPE_AUTOFS -#define MNTTYPE_AUTOFS "autofs" -#endif - -#ifndef BLOCK_SIZE -#define BLOCK_SIZE 1024 -#endif - -#define MAXQUOTAS 2 -#define USRQUOTA 0 /* element used for user quotas */ -#define GRPQUOTA 1 /* element used for group quotas */ - -struct dqblk { - u_int32_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ - u_int32_t dqb_bsoftlimit; /* preferred limit on disk blks */ - u_int32_t dqb_curblocks; /* current block count */ - u_int32_t dqb_ihardlimit; /* maximum # allocated inodes */ - u_int32_t dqb_isoftlimit; /* preferred inode limit */ - u_int32_t dqb_curinodes; /* current # allocated inodes */ - time_t dqb_btime; /* time limit for excessive disk use */ - time_t dqb_itime; /* time limit for excessive files */ -}; - -struct if_dqblk { - u_int64_t dqb_bhardlimit; - u_int64_t dqb_bsoftlimit; - u_int64_t dqb_curspace; - u_int64_t dqb_ihardlimit; - u_int64_t dqb_isoftlimit; - u_int64_t dqb_curinodes; - u_int64_t dqb_btime; - u_int64_t dqb_itime; - u_int32_t dqb_valid; -}; - -#define SUBCMDMASK 0x00ff -#define SUBCMDSHIFT 8 -#define QCMD(cmd, type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK)) - -#define Q_GETQUOTA 0x0300 /* get limits and usage */ -#define Q_SETQUOTA 0x0400 /* set limits and usage */ - -#define Q_GETFMT 0x800004 /* get quota format used on given filesystem */ -#define Q_GETQUOTA_NEW 0x800007 /* get user quota structure */ -#define Q_SETQUOTA_NEW 0x800008 /* set user quota structure */ -#define dqoff(UID) ((loff_t)((UID) * sizeof (struct dqblk))) - -extern int quotactl (int __cmd, const char *__special, int __id, - caddr_t __addr) __THROW; -/* - * Global unix authentication credentials. - */ -extern struct authunix_parms *unix_cred; - -int in_group (gid_t *gids, u_int len, gid_t gid) -{ - int cnt = 0; - - while (cnt < len) { - if (gids[cnt] == gid) - return 1; - cnt++; - } - return 0; -} - -getquota_rslt *getquotainfo(int flags, caddr_t *argp, struct svc_req *rqstp) -{ - static getquota_rslt result; - union { - getquota_args *args; - ext_getquota_args *ext_args; - } arguments; - FILE *fp; - struct mntent *mnt; - char *pathname, *qfpathname; - int fd, err, id, type; - struct stat stm, stn; - struct rquota *rquota; - struct if_dqblk dqb; - - /* - * First check authentication. - */ - if (flags & TYPE_EXTENDED) { - arguments.ext_args = (ext_getquota_args *)argp; - id = arguments.ext_args->gqa_id; - type = arguments.ext_args->gqa_type; - pathname = arguments.ext_args->gqa_pathp; - - if (type == USRQUOTA && unix_cred->aup_uid && unix_cred->aup_uid != id) { - result.status = Q_EPERM; - return(&result); - } - - if (type == GRPQUOTA && unix_cred->aup_uid && unix_cred->aup_gid != id && - !in_group((gid_t *)unix_cred->aup_gids, unix_cred->aup_len, id)) { - result.status = Q_EPERM; - return(&result); - } - } else { - arguments.args = (getquota_args *)argp; - id = arguments.args->gqa_uid; - type = USRQUOTA; - pathname = arguments.args->gqa_pathp; - - if (unix_cred->aup_uid && unix_cred->aup_uid != id) { - result.status = Q_EPERM; - return(&result); - } - } - - fp = setmntent(MNTTAB, "r"); - while ((mnt = getmntent(fp)) != (struct mntent *)0) { - if (stat(mnt->mnt_dir, &stm) == -1) - continue; - - if (stat(pathname, &stn) == -1) - break; - else if (stm.st_dev != stn.st_dev) - continue; - - if (mnt->mnt_fsname [0] != '/' - || strcasecmp (mnt->mnt_type, MNTTYPE_NFS) == 0 - || strcasecmp (mnt->mnt_type, MNTTYPE_AUTOFS) == 0 - || strcasecmp (mnt->mnt_type, MNTTYPE_SWAP) == 0 - || strcasecmp (mnt->mnt_type, MNTTYPE_IGNORE) == 0) - break; - - /* All blocks reported are in BLOCK_SIZE. */ - result.getquota_rslt_u.gqr_rquota.rq_bsize = BLOCK_SIZE; - - if (hasquota(mnt, type, &qfpathname)) { - int fmt; - if (quotactl(QCMD(Q_GETFMT, type), mnt->mnt_fsname, 0, (caddr_t)&fmt)==0) { - /* new style interface - * Don't bother trying to read from the file - */ - err = quotactl(QCMD(Q_GETQUOTA_NEW, type), - mnt->mnt_fsname, id, (caddr_t)&dqb); - if (err) memset(&dqb, 0, sizeof(dqb)); - } else { - /* old style */ - struct dqblk dq_dqb; - - if ((err = quotactl(QCMD(Q_GETQUOTA, type), mnt->mnt_fsname, - id, (caddr_t)&dq_dqb)) == -1 - && !(flags & ACTIVE)) { - if ((fd = open(qfpathname, O_RDONLY)) < 0) - { - free(qfpathname); - continue; - } - lseek(fd, (long) dqoff(id), L_SET); - switch (read(fd, &dq_dqb, sizeof(struct dqblk))) { - case 0:/* EOF */ - /* - * Convert implicit 0 quota (EOF) into an - * explicit one (zero'ed dqblk) - */ - memset((caddr_t)&dq_dqb, 0, sizeof(struct dqblk)); - break; - case sizeof(struct dqblk): /* OK */ - break; - default: /* ERROR */ - close(fd); - free(qfpathname); - continue; - } - close(fd); - } - dqb.dqb_bhardlimit = dq_dqb.dqb_bhardlimit; - dqb.dqb_bsoftlimit = dq_dqb.dqb_bsoftlimit; - dqb.dqb_curspace = dq_dqb.dqb_curblocks * 1024; - dqb.dqb_ihardlimit = dq_dqb.dqb_ihardlimit; - dqb.dqb_isoftlimit = dq_dqb.dqb_isoftlimit; - dqb.dqb_curinodes = dq_dqb.dqb_curinodes; - dqb.dqb_btime = dq_dqb.dqb_btime; - dqb.dqb_itime = dq_dqb.dqb_itime; - } - free(qfpathname); - endmntent(fp); - - if (err && (flags & ACTIVE)) { - result.status = Q_NOQUOTA; - return(&result); - } - - result.status = Q_OK; - result.getquota_rslt_u.gqr_rquota.rq_active = (err == 0) ? TRUE : FALSE; - /* - * Make a copy of the info into the last part of the remote quota - * struct might not be exactly the same on all architectures... - */ - - rquota = &result.getquota_rslt_u.gqr_rquota; - rquota->rq_bhardlimit = dqb.dqb_bhardlimit; - rquota->rq_bsoftlimit = dqb.dqb_bsoftlimit;; - rquota->rq_curblocks = dqb.dqb_curspace/1024; - rquota->rq_fhardlimit = dqb.dqb_ihardlimit; - rquota->rq_fsoftlimit = dqb.dqb_isoftlimit; - rquota->rq_curfiles = dqb.dqb_curinodes; - rquota->rq_btimeleft = dqb.dqb_btime; - rquota->rq_ftimeleft = dqb.dqb_itime; - - return(&result); - } - } - endmntent(fp); - - result.status = Q_NOQUOTA; - return(&result); -} - -getquota_rslt *rquotaproc_getquota_1_svc(getquota_args *argp, struct svc_req *rqstp) -{ - return(getquotainfo(0, (caddr_t *)argp, rqstp)); -} - -getquota_rslt *rquotaproc_getactivequota_1_svc(getquota_args *argp, struct svc_req *rqstp) -{ - return(getquotainfo(ACTIVE, (caddr_t *)argp, rqstp)); -} - -getquota_rslt *rquotaproc_getquota_2_svc(ext_getquota_args *argp, struct svc_req *rqstp) -{ - return(getquotainfo(TYPE_EXTENDED, (caddr_t *)argp, rqstp)); -} - -getquota_rslt *rquotaproc_getactivequota_2_svc(ext_getquota_args *argp, struct svc_req *rqstp) -{ - return(getquotainfo(TYPE_EXTENDED | ACTIVE, (caddr_t *)argp, rqstp)); -} diff --git a/utils/rquotad/rquota_svc.c b/utils/rquotad/rquota_svc.c deleted file mode 100644 index bd2038f..0000000 --- a/utils/rquotad/rquota_svc.c +++ /dev/null @@ -1,303 +0,0 @@ -/* - * QUOTA An implementation of the diskquota system for the LINUX - * operating system. QUOTA is implemented using the BSD systemcall - * interface as the means of communication with the user level. - * Should work for all filesystems because of integration into the - * VFS layer of the operating system. - * This is based on the Melbourne quota system wich uses both user and - * group quota files. - * - * This part accepts the rquota rpc-requests. - * - * Version: $Id: rquota_svc.c,v 2.6 1996/11/17 16:59:46 mvw Exp mvw $ - * - * Author: Marco van Wieringen - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef HAVE_TCP_WRAPPER -#include "tcpwrapper.h" -#endif - -#include -#include -#include -#include "rquota.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __STDC__ -#define SIG_PF void(*)(int) -#endif - -static struct option longopts[] = -{ - { "help", 0, 0, 'h' }, - { "version", 0, 0, 'v' }, - { "port", 1, 0, 'p' }, - { NULL, 0, 0, 0 } -}; - -/* - * Global authentication credentials. - */ -struct authunix_parms *unix_cred; - -static void rquotaprog_1(struct svc_req *rqstp, register SVCXPRT *transp) -{ - union { - getquota_args rquotaproc_getquota_1_arg; - getquota_args rquotaproc_getactivequota_1_arg; - } argument; - char *result; - xdrproc_t xdr_argument, xdr_result; - char *(*local)(char *, struct svc_req *); - -#ifdef HAVE_TCP_WRAPPER - /* remote host authorization check */ - if (!check_default("rquotad", svc_getcaller(transp), - rqstp->rq_proc, RQUOTAPROG)) { - svcerr_auth (transp, AUTH_FAILED); - return; - } -#endif - - /* - * Don't bother authentication for NULLPROC. - */ - if (rqstp->rq_proc == NULLPROC) { - (void) svc_sendreply(transp, (xdrproc_t) xdr_void, (char *)NULL); - return; - } - - /* - * First get authentication. - */ - switch (rqstp->rq_cred.oa_flavor) { - case AUTH_UNIX: - unix_cred = (struct authunix_parms *)rqstp->rq_clntcred; - break; - case AUTH_NULL: - default: - svcerr_weakauth(transp); - return; - } - - switch (rqstp->rq_proc) { - case RQUOTAPROC_GETQUOTA: - xdr_argument = (xdrproc_t) xdr_getquota_args; - xdr_result = (xdrproc_t) xdr_getquota_rslt; - local = (char *(*)(char *, struct svc_req *)) rquotaproc_getquota_1_svc; - break; - - case RQUOTAPROC_GETACTIVEQUOTA: - xdr_argument = (xdrproc_t) xdr_getquota_args; - xdr_result = (xdrproc_t) xdr_getquota_rslt; - local = (char *(*)(char *, struct svc_req *)) rquotaproc_getactivequota_1_svc; - break; - - default: - svcerr_noproc(transp); - return; - } - - (void) memset((char *)&argument, 0, sizeof (argument)); - if (!svc_getargs(transp, xdr_argument, (caddr_t) &argument)) { - svcerr_decode(transp); - return; - } - result = (*local)((char *)&argument, rqstp); - if (result != NULL && !svc_sendreply(transp, xdr_result, result)) { - svcerr_systemerr(transp); - } - - if (!svc_freeargs(transp, xdr_argument, (caddr_t) &argument)) { - syslog(LOG_ERR, "unable to free arguments"); - exit(1); - } - return; -} - -static void rquotaprog_2(struct svc_req *rqstp, register SVCXPRT *transp) -{ - union { - ext_getquota_args rquotaproc_getquota_2_arg; - ext_getquota_args rquotaproc_getactivequota_2_arg; - } argument; - char *result; - xdrproc_t xdr_argument, xdr_result; - char *(*local)(char *, struct svc_req *); - -#ifdef HAVE_TCP_WRAPPER - /* remote host authorization check */ - if (!check_default("rquotad", svc_getcaller(transp), - rqstp->rq_proc, RQUOTAPROG)) { - svcerr_auth (transp, AUTH_FAILED); - return; - } -#endif - - /* - * Don't bother authentication for NULLPROC. - */ - if (rqstp->rq_proc == NULLPROC) { - (void) svc_sendreply(transp, (xdrproc_t) xdr_void, (char *)NULL); - return; - } - - /* - * First get authentication. - */ - switch (rqstp->rq_cred.oa_flavor) { - case AUTH_UNIX: - unix_cred = (struct authunix_parms *)rqstp->rq_clntcred; - break; - case AUTH_NULL: - default: - svcerr_weakauth(transp); - return; - } - - switch (rqstp->rq_proc) { - case RQUOTAPROC_GETQUOTA: - xdr_argument = (xdrproc_t) xdr_ext_getquota_args; - xdr_result = (xdrproc_t) xdr_getquota_rslt; - local = (char *(*)(char *, struct svc_req *)) rquotaproc_getquota_2_svc; - break; - - case RQUOTAPROC_GETACTIVEQUOTA: - xdr_argument = (xdrproc_t) xdr_ext_getquota_args; - xdr_result = (xdrproc_t) xdr_getquota_rslt; - local = (char *(*)(char *, struct svc_req *)) rquotaproc_getactivequota_2_svc; - break; - - default: - svcerr_noproc(transp); - return; - } - - (void) memset((char *)&argument, 0, sizeof (argument)); - if (!svc_getargs(transp, xdr_argument, (caddr_t) &argument)) { - svcerr_decode(transp); - return; - } - result = (*local)((char *)&argument, rqstp); - if (result != NULL && !svc_sendreply(transp, xdr_result, result)) { - svcerr_systemerr(transp); - } - - if (!svc_freeargs(transp, xdr_argument, (caddr_t) &argument)) { - syslog(LOG_ERR, "unable to free arguments"); - exit(1); - } - return; -} - -static void -usage(const char *prog, int n) -{ - fprintf(stderr, "Usage: %s [-p|--port port] [-h|-?|--help] [-v|--version]\n", prog); - exit(n); -} - -static void -killer (int sig) -{ - (void) pmap_unset(RQUOTAPROG, RQUOTAVERS); - (void) pmap_unset(RQUOTAPROG, EXT_RQUOTAVERS); - syslog(LOG_ERR, "caught signal %d, un-registering and exiting.", sig); -} - -int main(int argc, char **argv) -{ - register SVCXPRT *transp; - int c; - int port = 0; - struct sigaction sa; - - (void) pmap_unset(RQUOTAPROG, RQUOTAVERS); - (void) pmap_unset(RQUOTAPROG, EXT_RQUOTAVERS); - - openlog("rquota", LOG_PID, LOG_DAEMON); - - while ((c = getopt_long(argc, argv, "hp:v", longopts, NULL)) != EOF) { - switch (c) { - case '?': - case 'h': - usage(argv[0], 0); - break; - case 'p': - port = atoi(optarg); - if (port < 1 || port > 65535) { - fprintf(stderr, "%s: bad port number: %s\n", - argv[0], optarg); - usage(argv[0], 1); - } - break; - case 'v': - printf("rquotad %s\n", VERSION); - exit(0); - default: - usage(argv[0], 1); - } - } - - if (chdir(NFS_STATEDIR)) { - fprintf(stderr, "%s: chdir(%s) failed: %s\n", - argv [0], NFS_STATEDIR, strerror(errno)); - - exit(1); - } - - /* WARNING: the following works on Linux and SysV, but not BSD! */ - sa.sa_handler = SIG_IGN; - sa.sa_flags = 0; - sigemptyset(&sa.sa_mask); - sigaction(SIGCHLD, &sa, NULL); - - sa.sa_handler = killer; - sigaction(SIGHUP, &sa, NULL); - sigaction(SIGINT, &sa, NULL); - sigaction(SIGTERM, &sa, NULL); - - if (port) - transp = svcudp_create(makesock(port, IPPROTO_UDP)); - else - transp = svcudp_create(svcudp_socket (RQUOTAPROG, 1)); - if (transp == NULL) { - syslog(LOG_ERR, "cannot create udp service."); - exit(1); - } - if (!svc_register(transp, RQUOTAPROG, RQUOTAVERS, rquotaprog_1, IPPROTO_UDP)) { - syslog(LOG_ERR, "unable to register (RQUOTAPROG, RQUOTAVERS, udp)."); - exit(1); - } - if (!svc_register(transp, RQUOTAPROG, EXT_RQUOTAVERS, rquotaprog_2, IPPROTO_UDP)) { - syslog(LOG_ERR, "unable to register (RQUOTAPROG, EXT_RQUOTAVERS, udp)."); - exit(1); - } - - daemon(1,1); - svc_run(); - - syslog(LOG_ERR, "svc_run returned"); - exit(1); - /* NOTREACHED */ -} diff --git a/utils/rquotad/rquotad.man b/utils/rquotad/rquotad.man deleted file mode 100644 index a9a1f74..0000000 --- a/utils/rquotad/rquotad.man +++ /dev/null @@ -1,86 +0,0 @@ -.\"@(#)rquotad.8" -.TH RQUOTAD 8 "8 Mar 2001" -.SH NAME -rquotad, rpc.rquotad \- remote quota server -.SH SYNOPSIS -.B /usr/etc/rpc.rquotad [-p " port "] " -.SH DESCRIPTION -.LP -.IX "rquotad daemon" "" "\fLrquotad\fP \(em remote quota server" -.IX daemons "rquotad daemon" "" "\fLrquotad\fP \(em remote quota server" -.IX "user quotas" "rquotad daemon" "" "\fLrquotad\fP \(em remote quota server" -.IX "disk quotas" "rquotad daemon" "" "\fLrquotad\fP \(em remote quota server" -.IX "quotas" "rquotad daemon" "" "\fLrquotad\fP \(em remote quota server" -.IX "file system" "rquotad daemon" "" "\fLrquotad\fP \(em remote quota server" -.IX "remote procedure call services" "rquotad" "" "\fLrquotad\fP \(em remote quota server" -.BR rquotad -is an -.BR rpc (3N) -server which returns quotas for a user of a local file system -which is mounted by a remote machine over the -.SM NFS\s0. -The results are used by -.BR quota (1) -to display user quotas for remote file systems. - -The -.BR rquotad -daemon is normally started at boottime from the -.BR rc.net -script (on systems with BSD'ish scripts, e.g. Slackware), or from the -.BR nfs -script in -.BR /etc/rc.d/init.d/ -or -.BR /etc/init.d/ -(on systems with SysV'ish scripts, e.g. RedHat, SuSE, etc). - -.SH OPTIONS -.TP -.BI "\-p," "" " \-\-port " port -specify a port for -.BR rpc.rquotad -to listen on. By default, -.BR rpc.rquotad -will ask -.BR portmap (8) -to assign it a port number. As of this writing, there is not -a standard port number that -.BR portmap -always or usually assigns. Specifying -a port may be useful when implementing a firewall. - -.SH TCP_WRAPPERS SUPPORT -This -.BR rpc.rquotad -version is protected by the -.BR tcp_wrapper -library. You have to give the clients access to -.BR rpc.rquotad -if they should be allowed to use it. To allow connects from clients of -the .bar.com domain you could use the following line in /etc/hosts.allow: - -mountd: .bar.com - -You have to use the daemon name -.BR rquotad -for the daemon name (even if the binary has a different name). - -For further information please have a look at the -.BR tcpd (8) -and -.BR hosts_access (5) -manual pages. - -.SH FILES -.BR quota.user , -.BR quota.group --- quota files locate in the file system's root -.PD -.SH "SEE ALSO" -.BR quota (8), -.BR rpc (3N), -.BR nfs (5), -.BR services (5), -.BR portmap(8), -.BR inetd (8) diff --git a/utils/showmount/Makefile.in b/utils/showmount/Makefile.in index 19b3338..f4be25a 100644 --- a/utils/showmount/Makefile.in +++ b/utils/showmount/Makefile.in @@ -38,6 +38,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/utils/showmount/showmount.man b/utils/showmount/showmount.man index 5162ba4..a2f510f 100644 --- a/utils/showmount/showmount.man +++ b/utils/showmount/showmount.man @@ -25,8 +25,10 @@ appear as though it were processed through ``sort \-u''. .SH OPTIONS .TP .BR \-a " or " \-\-all -List both the client hostname and mounted directory in -host:dir format. +List both the client hostname or IP address and mounted directory in +host:dir format. This info should not be considered reliable. See the notes +on rmtab in +.BR rpc.mountd (8). .TP .BR \-d " or " \-\-directories List only the directories mounted by some client. diff --git a/utils/statd/Makefile.in b/utils/statd/Makefile.in index 0527c08..41a7217 100644 --- a/utils/statd/Makefile.in +++ b/utils/statd/Makefile.in @@ -40,6 +40,7 @@ DIST_COMMON = $(dist_sbin_SCRIPTS) $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/aclocal/bsdsignals.m4 \ $(top_srcdir)/aclocal/kerberos5.m4 \ + $(top_srcdir)/aclocal/libblkid.m4 \ $(top_srcdir)/aclocal/nfs-utils.m4 \ $(top_srcdir)/aclocal/tcp-wrappers.m4 \ $(top_srcdir)/configure.ac diff --git a/utils/statd/monitor.c b/utils/statd/monitor.c index c447a26..e40ff7d 100644 --- a/utils/statd/monitor.c +++ b/utils/statd/monitor.c @@ -380,8 +380,8 @@ sm_unmon_1_svc(struct mon_id *argp, struct svc_req *rqstp) /* PRC: do the HA callout: */ ha_callout("del-client", mon_name, my_name, -1); + xunlink(SM_DIR, clnt->dns_name, 1); nlist_free(&rtnl, clnt); - xunlink(SM_DIR, mon_name, 1); return (&result); } else @@ -445,8 +445,8 @@ sm_unmon_all_1_svc(struct my_id *argp, struct svc_req *rqstp) temp = NL_NEXT(clnt); /* PRC: do the HA callout: */ ha_callout("del-client", mon_name, my_name, -1); + xunlink(SM_DIR, clnt->dns_name, 1); nlist_free(&rtnl, clnt); - xunlink(SM_DIR, mon_name, 1); ++count; clnt = temp; } else diff --git a/utils/statd/notlist.c b/utils/statd/notlist.c index b74d9df..1698c26 100644 --- a/utils/statd/notlist.c +++ b/utils/statd/notlist.c @@ -211,6 +211,7 @@ nlist_free(notify_list **head, notify_list *entry) free(NL_MY_NAME(entry)); if (NL_MON_NAME(entry)) free(NL_MON_NAME(entry)); + free(entry->dns_name); free(entry); }