From e23ec647cb219ec875f8e56cbc2b1d8cf4a9cacf Mon Sep 17 00:00:00 2001 From: lon Date: Thu, 7 Jun 2001 18:00:14 +0000 Subject: [PATCH 01/16] Fixes explicit path problem (since most logical directories are specified above, we can just call rpcinfo instead of /usr/sbin/rpcinfo) Also fixes the problem where we were disabling MNTv3 if NFSv3 _is_ present. --- etc/nodist/nfs-server | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/nodist/nfs-server b/etc/nodist/nfs-server index 65495e9..4517937 100755 --- a/etc/nodist/nfs-server +++ b/etc/nodist/nfs-server @@ -53,7 +53,9 @@ start) echo -n "Starting $NFSD: " startdaemon $PREFIX$NFSD $RPCNFSDCOUNT - if /usr/sbin/rpcinfo -u localhost nfs 3 &>/dev/null + # Disable NFSv3 on mountd if we don't have NFSv3 + rpcinfo -u localhost nfs 3 &>/dev/null + if [ "$?" != "0" ] then RPCMOUNTDOPTS="$RPCMOUNTDOPTS --no-nfs-version 3" fi -- 2.39.2 From 05c179231792bd2558cd2df75e13fe23fc33f082 Mon Sep 17 00:00:00 2001 From: lon Date: Thu, 7 Jun 2001 18:02:38 +0000 Subject: [PATCH 02/16] Updated. --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1229f1c..5cff8ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-06-07 Lon H. Hohberger + + * etc/nodist/nfs-server: Fixed a bug where the script would + disable mounts from NFSv3 clients if NFSv3 is present. + 2001-06-05 H.J. Lu * utils/mountd/mountd.c (longopts): Add "descriptors/o". -- 2.39.2 From 509cf23ffbe6075e6065d3b59db02bdec1c51f59 Mon Sep 17 00:00:00 2001 From: chip Date: Fri, 15 Jun 2001 23:08:35 +0000 Subject: [PATCH 03/16] 2001-06-15 Chip Salzenberg * debian/changelog: Version 0.3.2-2. * debian/*.init: Minor fixes. --- ChangeLog | 5 +++++ debian/changelog | 8 ++++++++ debian/nfs-common.init | 4 +--- debian/nfs-kernel-server.init | 6 ++---- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5cff8ab..423178a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-06-15 Chip Salzenberg + + * debian/changelog: Version 0.3.2-2. + * debian/*.init: Minor fixes. + 2001-06-07 Lon H. Hohberger * etc/nodist/nfs-server: Fixed a bug where the script would diff --git a/debian/changelog b/debian/changelog index ecb9197..6909446 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +nfs-utils (1:0.3.2-2) unstable; urgency=low + + * Rebuild with new libc. (closes: #97252, #97455, #99829, #100317) + * Fix typo in nfs-kernel-server init script. (closes: #100380) + * Start all daemons in root directory. + + -- Chip Salzenberg Fri, 15 Jun 2001 15:57:18 -0700 + nfs-utils (1:0.3.2-1) unstable; urgency=low * Upstream changes to statd: diff --git a/debian/nfs-common.init b/debian/nfs-common.init index 63bc29c..78edad1 100755 --- a/debian/nfs-common.init +++ b/debian/nfs-common.init @@ -25,12 +25,10 @@ fi # What is this? DESC="NFS common utilities" -# Make sure that daemon cwds are in root fs. -cd / - # See how we were called. case "$1" in start) + cd / # daemons should have root dir as cwd printf "Starting $DESC:" printf " statd" start-stop-daemon --start --quiet \ diff --git a/debian/nfs-kernel-server.init b/debian/nfs-kernel-server.init index 1626213..e95586b 100755 --- a/debian/nfs-kernel-server.init +++ b/debian/nfs-kernel-server.init @@ -21,12 +21,10 @@ DESC="NFS kernel daemon" RPCNFSDCOUNT=8 # Number of servers to be started up by default RPCMOUNTDOPTS= -# Make sure that daemon cwds are in root fs. -cd / - # See how we were called. case "$1" in start) + cd / # daemons should have root dir as cwd if grep -q '^/' /etc/exports; then printf "Exporting directories for $DESC..." $PREFIX/sbin/exportfs -r @@ -38,7 +36,7 @@ case "$1" in --exec $PREFIX/sbin/rpc.nfsd -- $RPCNFSDCOUNT printf " mountd" $PREFIX/bin/rpcinfo -u localhost nfs 3 > /dev/null 2>&1 || - RPCMOUNTDOPTS="$RPCMOUNDOPTS --no-nfs-version 3" + RPCMOUNTDOPTS="$RPCMOUNTDOPTS --no-nfs-version 3" start-stop-daemon --start --quiet \ --exec $PREFIX/sbin/rpc.mountd -- $RPCMOUNTDOPTS echo "." -- 2.39.2 From bbdfb3e9b3beace2b32947861144b01a9e6104f6 Mon Sep 17 00:00:00 2001 From: hjl Date: Wed, 27 Jun 2001 16:27:51 +0000 Subject: [PATCH 04/16] 2001-06-27 H.J. Lu * config.mk.in (CC_FOR_BUILD): Renamed from BUILD_CC. (CFLAGS_FOR_BUILD): New. Don't use @CFLAGS@. * configure.in (enable_nfsv3): Set to yes by default. (--enable-rquotad): Added (AC_PROG_CXX): Removed. (AC_OUTPUT): Add utils/Makefile. (CC_FOR_BUILD): Renamed from BUILD_CC. * configure: Regenerated. * utils/Makefile: Removed. * utils/Makefile.in: New. * nfs-utils.spec.in (rquotad): New. Set to 0 to disable rquotad. (CC_FOR_BUILD): Renamed from BUILD_CC. --- ChangeLog | 22 ++- config.mk.in | 18 ++- configure | 275 +++++++++----------------------- configure.in | 19 ++- nfs-utils.spec | 16 +- nfs-utils.spec.in | 14 +- utils/{Makefile => Makefile.in} | 2 +- 7 files changed, 146 insertions(+), 220 deletions(-) rename utils/{Makefile => Makefile.in} (61%) diff --git a/ChangeLog b/ChangeLog index 423178a..70651c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2001-06-27 H.J. Lu + + * config.mk.in (CC_FOR_BUILD): Renamed from BUILD_CC. + (CFLAGS_FOR_BUILD): New. Don't use @CFLAGS@. + + * configure.in (enable_nfsv3): Set to yes by default. + (--enable-rquotad): Added + (AC_PROG_CXX): Removed. + (AC_OUTPUT): Add utils/Makefile. + (CC_FOR_BUILD): Renamed from BUILD_CC. + * configure: Regenerated. + + * utils/Makefile: Removed. + + * utils/Makefile.in: New. + + * nfs-utils.spec.in (rquotad): New. Set to 0 to disable + rquotad. + (CC_FOR_BUILD): Renamed from BUILD_CC. + 2001-06-15 Chip Salzenberg * debian/changelog: Version 0.3.2-2. @@ -59,7 +79,7 @@ * config.guess: New. * config.mk.in (BUILD_CC): New. - (CC): Set to $(BUILD_CC) if BUILD is defined. + (CC): Set to $(BUILD_CC) if BUILD is defined. (AR): Set to @AR@. (LD): Set to @LD@. (RANLIB): Set to @RANLIB@. diff --git a/config.mk.in b/config.mk.in index 508c8a2..18d4f39 100644 --- a/config.mk.in +++ b/config.mk.in @@ -43,12 +43,6 @@ ifndef ARCHFLAGS .EXPORT: ARCHFLAGS endif -BUILD_CC = @BUILD_CC@ -ifdef BUILD -CC = $(BUILD_CC) -else -CC = @CC@ -endif AR = @AR@ LD = @LD@ RM = rm -f @@ -67,7 +61,17 @@ ifdef KERNEL_INCDIR AFLAGS += -I$(KERNEL_INCDIR) endif -CFLAGS = @CFLAGS@ $(AFLAGS) $(CCOPTS) -DVERSION="\"$(VERSION)\"" +ALL-CFLAGS = $(AFLAGS) $(CCOPTS) -DVERSION="\"$(VERSION)\"" +CC = @CC@ +CFLAGS = @CFLAGS@ $(ALL-CFLAGS) +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS_FOR_BUILD= -O2 $(ALL-CFLAGS) + +ifdef BUILD +CC = $(CC_FOR_BUILD) +CFLAGS = $(CFLAGS_FOR_BUILD) +endif + LDFLAGS = @LDFLAGS@ $(LDOPTS) -L$(TOP)support/lib ifdef NFSV3 diff --git a/configure b/configure index 224eb4a..2b09f83 100755 --- a/configure +++ b/configure @@ -22,6 +22,8 @@ ac_help="$ac_help --enable-kprefix install progs as rpc.knfsd etc" ac_help="$ac_help --enable-secure-statd Only lockd can use statd (security)" +ac_help="$ac_help + --enable-rquotad enable rquotad" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -561,7 +563,7 @@ if test "${enable_nfsv3+set}" = set; then enableval="$enable_nfsv3" enable_nfsv3=$enableval else - enable_nfsv3=no + enable_nfsv3=yes fi if test "$enable_nfsv3" = yes; then @@ -597,12 +599,26 @@ EOF fi +# Check whether --enable-rquotad or --disable-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 + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:606: checking for $ac_word" >&5 +echo "configure:622: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -632,7 +648,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:636: checking for $ac_word" >&5 +echo "configure:652: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -683,7 +699,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:687: checking for $ac_word" >&5 +echo "configure:703: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -715,7 +731,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:719: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:735: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -726,12 +742,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 730 "configure" +#line 746 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -757,12 +773,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:777: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:766: checking whether we are using GNU C" >&5 +echo "configure:782: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -771,7 +787,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -790,7 +806,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:794: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:810: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -821,151 +837,8 @@ else fi fi -for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:830: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CXX="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CXX="$ac_cv_prog_CXX" -if test -n "$CXX"; then - echo "$ac_t""$CXX" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$CXX" && break -done -test -n "$CXX" || CXX="gcc" - - -echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:862: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 - -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - -cat > conftest.$ac_ext << EOF - -#line 873 "configure" -#include "confdefs.h" - -int main(){return(0);} -EOF -if { (eval echo configure:878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cxx_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cxx_cross=no - else - ac_cv_prog_cxx_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cxx_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 -if test $ac_cv_prog_cxx_works = no; then - { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:904: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 -cross_compiling=$ac_cv_prog_cxx_cross - -echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:909: checking whether we are using GNU C++" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.C <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gxx=yes -else - ac_cv_prog_gxx=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gxx" 1>&6 - -if test $ac_cv_prog_gxx = yes; then - GXX=yes -else - GXX= -fi - -ac_test_CXXFLAGS="${CXXFLAGS+set}" -ac_save_CXXFLAGS="$CXXFLAGS" -CXXFLAGS= -echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:937: checking whether ${CXX-g++} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.cc -if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then - ac_cv_prog_cxx_g=yes -else - ac_cv_prog_cxx_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS="$ac_save_CXXFLAGS" -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:969: checking how to run the C preprocessor" >&5 +echo "configure:842: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -980,13 +853,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -997,13 +870,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1014,13 +887,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1075,7 +948,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1079: checking for a BSD compatible install" >&5 +echo "configure:952: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1128,7 +1001,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -test "${BUILD_CC+set}" = set || BUILD_CC="$CC" +test "${CC_FOR_BUILD+set}" = set || CC_FOR_BUILD="$CC" @@ -1138,7 +1011,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1142: checking host system type" >&5 +echo "configure:1015: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1159,7 +1032,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1163: checking build system type" >&5 +echo "configure:1036: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1185,7 +1058,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1189: checking for $ac_word" >&5 +echo "configure:1062: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1217,7 +1090,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1221: checking for $ac_word" >&5 +echo "configure:1094: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1252,7 +1125,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1256: checking for $ac_word" >&5 +echo "configure:1129: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1284,7 +1157,7 @@ fi # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. set dummy ${ac_tool_prefix}ld; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1288: checking for $ac_word" >&5 +echo "configure:1161: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1315,12 +1188,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1319: checking for ANSI C header files" >&5 +echo "configure:1192: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1328,7 +1201,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1345,7 +1218,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1363,7 +1236,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1384,7 +1257,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1395,7 +1268,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1419,12 +1292,12 @@ EOF fi echo $ac_n "checking for GNU libc2""... $ac_c" 1>&6 -echo "configure:1423: checking for GNU libc2" >&5 +echo "configure:1296: checking for GNU libc2" >&5 if eval "test \"`echo '$''{'knfsd_cv_glibc2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1433,7 +1306,7 @@ else #endif EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1456,7 +1329,7 @@ fi echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:1460: checking for main in -lsocket" >&5 +echo "configure:1333: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1464,14 +1337,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1492,7 +1365,7 @@ else fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:1496: checking for main in -lnsl" >&5 +echo "configure:1369: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1500,14 +1373,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1528,7 +1401,7 @@ else fi echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:1532: checking for crypt in -lcrypt" >&5 +echo "configure:1405: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1536,7 +1409,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1569,7 +1442,7 @@ fi if test "$knfsd_cv_glibc2" = no; then echo $ac_n "checking for daemon in -lbsd""... $ac_c" 1>&6 -echo "configure:1573: checking for daemon in -lbsd" >&5 +echo "configure:1446: checking for daemon in -lbsd" >&5 ac_lib_var=`echo bsd'_'daemon | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1577,7 +1450,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1615,14 +1488,14 @@ fi echo $ac_n "checking for the tcp wrapper library""... $ac_c" 1>&6 -echo "configure:1619: checking for the tcp wrapper library" >&5 +echo "configure:1492: checking for the tcp wrapper library" >&5 if eval "test \"`echo '$''{'knfsd_cv_tcp_wrapper'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else old_LIBS="$LIBS" LIBS="$LIBS -lwrap $LIBNSL" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* knfsd_cv_tcp_wrapper=yes else @@ -1657,12 +1530,12 @@ fi for ac_func in innetgr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1661: checking for $ac_func" >&5 +echo "configure:1534: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1819,7 +1692,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "config.mk nfs-utils.spec support/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "config.mk nfs-utils.spec utils/Makefile support/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then diff --git a/configure.in b/configure.in index c73e76f..fe6a724 100644 --- a/configure.in +++ b/configure.in @@ -23,7 +23,7 @@ AC_ARG_WITH(statedir, AC_ARG_ENABLE(nfsv3, [ --enable-nfsv3 enable support for NFSv3], enable_nfsv3=$enableval, - enable_nfsv3=no) + enable_nfsv3=yes) if test "$enable_nfsv3" = yes; then AC_DEFINE(NFS3_SUPPORTED) else @@ -43,16 +43,25 @@ AC_ARG_ENABLE(secure-statd, AC_DEFINE(RESTRICTED_STATD) fi AC_SUBST(secure_statd) +AC_ARG_ENABLE(rquotad, + [ --enable-rquotad enable rquotad], + enable_rquotad=$enableval, + enable_rquotad=yes) + if test "$enable_rquotad" = yes; then + RQUOTAD=rquotad + else + RQUOTAD= + fi + AC_SUBST(RQUOTAD) dnl AC_ARG_ENABLE(frob, enable frobnicator,, enable_frob=test) AC_CONFIG_HEADER(support/include/config.h) AC_PROG_CC -AC_PROG_CXX AC_PROG_CPP AC_PROG_INSTALL -test "${BUILD_CC+set}" = set || BUILD_CC="$CC" -AC_SUBST(BUILD_CC) +test "${CC_FOR_BUILD+set}" = set || CC_FOR_BUILD="$CC" +AC_SUBST(CC_FOR_BUILD) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(AR, ar) @@ -98,4 +107,4 @@ AC_DEFINE_UNQUOTED(NFS_STATEDIR, "$statedir") AC_SUBST(LDFLAGS) AC_SUBST(CXXFLAGS) AC_SUBST(CFLAGS) -AC_OUTPUT(config.mk nfs-utils.spec) +AC_OUTPUT(config.mk nfs-utils.spec utils/Makefile) diff --git a/nfs-utils.spec b/nfs-utils.spec index 57de9a4..e0bb303 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -1,10 +1,13 @@ +%define rquotad 0 +%{?do_rquotad:%define rquotad 1} + # We don't use libtool. %define __libtoolize : Summary: NFS utlilities and supporting daemons for the kernel NFS server. Name: nfs-utils Version: 0.3.2 -Release: 6 +Release: 7 Source0: ftp://nfs.sourceforge.net/pub/nfs/%{name}-%{version}.tar.gz Group: System Environment/Daemons Obsoletes: nfs-server @@ -36,8 +39,13 @@ clients which are mounted on that host. %build CC=%{__cc}; export CC -BUILD_CC=gcc; export BUILD_CC -%configure --build=%{_build_alias} +CC_FOR_BUILD=gcc; export CC_FOR_BUILD +%configure \ +%if !%{rquotad} + --disable-rquotad \ +%endif + --build=%{_build_alias} + make all %install @@ -90,7 +98,9 @@ fi /usr/sbin/nhfsstone /usr/sbin/rpc.mountd /usr/sbin/rpc.nfsd +%if %{rquotad} /usr/sbin/rpc.rquotad +%endif /usr/sbin/showmount %{_mandir}/man?/* %config /etc/rc.d/init.d/nfslock diff --git a/nfs-utils.spec.in b/nfs-utils.spec.in index 899528b..3a3d65f 100644 --- a/nfs-utils.spec.in +++ b/nfs-utils.spec.in @@ -1,3 +1,6 @@ +%define rquotad 0 +%{?do_rquotad:%define rquotad 1} + # We don't use libtool. %define __libtoolize : @@ -36,8 +39,13 @@ clients which are mounted on that host. %build CC=%{__cc}; export CC -BUILD_CC=gcc; export BUILD_CC -%configure --build=%{_build_alias} +CC_FOR_BUILD=gcc; export CC_FOR_BUILD +%configure \ +%if !%{rquotad} + --disable-rquotad \ +%endif + --build=%{_build_alias} + make all %install @@ -90,7 +98,9 @@ fi /usr/sbin/nhfsstone /usr/sbin/rpc.mountd /usr/sbin/rpc.nfsd +%if %{rquotad} /usr/sbin/rpc.rquotad +%endif /usr/sbin/showmount %{_mandir}/man?/* %config /etc/rc.d/init.d/nfslock diff --git a/utils/Makefile b/utils/Makefile.in similarity index 61% rename from utils/Makefile rename to utils/Makefile.in index 7e58325..fbd9b3d 100644 --- a/utils/Makefile +++ b/utils/Makefile.in @@ -2,7 +2,7 @@ # Makefile for linux-nfs/support # -SUBDIRS = exportfs mountd nfsd statd nfsstat rquotad showmount \ +SUBDIRS = exportfs mountd nfsd statd nfsstat @RQUOTAD@ showmount \ nhfsstone lockd include $(TOP)rules.mk -- 2.39.2 From b6eb550a30ed655bae0cd9a4124af462205b58fb Mon Sep 17 00:00:00 2001 From: hjl Date: Wed, 27 Jun 2001 16:45:54 +0000 Subject: [PATCH 05/16] 2001-06-27 H.J. Lu * utils/rquotad/rquota_server.c: Don't call statfs () for the block size. Use BLOCK_SIZE instead. --- ChangeLog | 5 +++++ utils/rquotad/rquota_server.c | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 70651c1..b04dcfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-06-27 H.J. Lu + + * utils/rquotad/rquota_server.c: Don't call statfs () for + the block size. Use BLOCK_SIZE instead. + 2001-06-27 H.J. Lu * config.mk.in (CC_FOR_BUILD): Renamed from BUILD_CC. diff --git a/utils/rquotad/rquota_server.c b/utils/rquotad/rquota_server.c index 8494790..2832974 100644 --- a/utils/rquotad/rquota_server.c +++ b/utils/rquotad/rquota_server.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -42,6 +42,10 @@ #define MNTTYPE_AUTOFS "autofs" #endif +#ifndef BLOCK_SIZE +#define BLOCK_SIZE 1024 +#endif + /* * Global unix authentication credentials. */ @@ -72,7 +76,6 @@ getquota_rslt *getquotainfo(int flags, caddr_t *argp, struct svc_req *rqstp) char *pathname, *qfpathname; int fd, err, id, type; struct stat stm, stn; - struct statfs stf; /* * First check authentication. @@ -122,11 +125,8 @@ getquota_rslt *getquotainfo(int flags, caddr_t *argp, struct svc_req *rqstp) || strcasecmp (mnt->mnt_type, MNTTYPE_IGNORE) == 0) break; - if (statfs(pathname, &stf) == -1) { - result.status = Q_EPERM; - return (&result); - } - result.getquota_rslt_u.gqr_rquota.rq_bsize = stf.f_bsize; + /* All blocks reported are in BLOCK_SIZE. */ + result.getquota_rslt_u.gqr_rquota.rq_bsize = BLOCK_SIZE; if (hasquota(mnt, type, &qfpathname)) { if ((err = quotactl(QCMD(Q_GETQUOTA, type), mnt->mnt_fsname, -- 2.39.2 From 3abfccd3e6d9d30c88132478ab2836ab1ffa0c5b Mon Sep 17 00:00:00 2001 From: hjl Date: Wed, 27 Jun 2001 16:58:55 +0000 Subject: [PATCH 06/16] 2001-06-27 H.J. Lu * etc/redhat/nfs.init: Run rpc.rquotad only if it exists. --- ChangeLog | 4 ++++ etc/redhat/nfs.init | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b04dcfc..f56756d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-06-27 H.J. Lu + + * etc/redhat/nfs.init: Run rpc.rquotad only if it exists. + 2001-06-27 H.J. Lu * utils/rquotad/rquota_server.c: Don't call statfs () for diff --git a/etc/redhat/nfs.init b/etc/redhat/nfs.init index 5a40f4f..4ef8d48 100755 --- a/etc/redhat/nfs.init +++ b/etc/redhat/nfs.init @@ -27,6 +27,8 @@ fi [ -x /usr/sbin/exportfs ] || exit 0 [ -s /etc/exports ] || exit 0 +RQUOTAD=`type -path rpc.rquotad` # Remote quota server + # Number of servers to be started up by default RPCNFSDCOUNT=8 # Default to NFS version 3. @@ -37,9 +39,11 @@ case "$1" in start) # Start daemons. action "Starting NFS services: " /usr/sbin/exportfs -r - echo -n "Starting NFS quotas: " - daemon rpc.rquotad - echo + if [ -n "$RQUOTAD" ]; then + echo -n "Starting NFS quotas: " + daemon rpc.rquotad + echo + fi echo -n "Starting NFS daemon: " daemon rpc.nfsd $RPCNFSDCOUNT echo -- 2.39.2 From 51560d4104d03ce4584f7ca45f66587525e7419a Mon Sep 17 00:00:00 2001 From: hjl Date: Wed, 27 Jun 2001 17:28:01 +0000 Subject: [PATCH 07/16] Updated. --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index f56756d..5363bd0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,7 @@ * nfs-utils.spec.in (rquotad): New. Set to 0 to disable rquotad. (CC_FOR_BUILD): Renamed from BUILD_CC. + * nfs-utils.spec: Regenerated. 2001-06-15 Chip Salzenberg -- 2.39.2 From 4f152504e44e75d77be302d830b87cf463df9b33 Mon Sep 17 00:00:00 2001 From: hjl Date: Wed, 25 Jul 2001 16:23:19 +0000 Subject: [PATCH 08/16] 2001-07-25 H.J. Lu * etc/redhat/nfs.init: Check if rpc.rquotad exists before doing anything about it. --- ChangeLog | 5 +++++ etc/redhat/nfs.init | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5363bd0..ac7ea2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-07-25 H.J. Lu + + * etc/redhat/nfs.init: Check if rpc.rquotad exists before doing + anything about it. + 2001-06-27 H.J. Lu * etc/redhat/nfs.init: Run rpc.rquotad only if it exists. diff --git a/etc/redhat/nfs.init b/etc/redhat/nfs.init index 4ef8d48..406fef1 100755 --- a/etc/redhat/nfs.init +++ b/etc/redhat/nfs.init @@ -67,9 +67,11 @@ case "$1" in echo -n "Shutting down NFS daemon: " killproc nfsd echo - echo -n "Shutting down NFS quotas: " - killproc rpc.rquotad - echo + if [ -n "$RQUOTAD" ]; then + echo -n "Shutting down NFS quotas: " + killproc rpc.rquotad + echo + fi # Do it the last so that clients can still access the server # when the server is running. action "Shutting down NFS services: " /usr/sbin/exportfs -au @@ -78,7 +80,9 @@ case "$1" in status) status rpc.mountd status nfsd - status rpc.rquotad + if [ -n "$RQUOTAD" ]; then + status rpc.rquotad + fi ;; restart) $0 stop -- 2.39.2 From c96c73993a752ba79a7c68c4aa639ce6af4dd1be Mon Sep 17 00:00:00 2001 From: hjl Date: Fri, 27 Jul 2001 05:21:03 +0000 Subject: [PATCH 09/16] 2001-07-26 H.J. Lu * nfs-utils.spec (Release): Set to 8. --- ChangeLog | 4 ++++ nfs-utils.spec | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ac7ea2d..7cc62a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-07-26 H.J. Lu + + * nfs-utils.spec (Release): Set to 8. + 2001-07-25 H.J. Lu * etc/redhat/nfs.init: Check if rpc.rquotad exists before doing diff --git a/nfs-utils.spec b/nfs-utils.spec index e0bb303..875abf1 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -7,7 +7,7 @@ Summary: NFS utlilities and supporting daemons for the kernel NFS server. Name: nfs-utils Version: 0.3.2 -Release: 7 +Release: 8 Source0: ftp://nfs.sourceforge.net/pub/nfs/%{name}-%{version}.tar.gz Group: System Environment/Daemons Obsoletes: nfs-server -- 2.39.2 From e7a90e99053a6c0575efcb19f3ddda3abd5f59cd Mon Sep 17 00:00:00 2001 From: hjl Date: Fri, 17 Aug 2001 16:12:05 +0000 Subject: [PATCH 10/16] =?utf8?q?2001-08-17=20=20Ragnar=20Kj=F8rstad=20=20=09=20=20=20=20H.J.=20Lu=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * etc/redhat/nfslock.init (STATDARG): New. Pass it to rpc.statd. * utils/statd/statd.c (longopts): Add "name". (usage): Add "-n/--name". (main): Set MY_NAME with "-n/--name". * utils/statd/state.c (change_state): Set MY_NAME only if it is NULL. * utils/statd/statd.man: Updated for "-n/--name". --- ChangeLog | 14 ++++++++++++++ etc/redhat/nfslock.init | 10 ++++++++-- utils/statd/statd.c | 10 +++++++++- utils/statd/statd.man | 13 ++++++++++++- utils/statd/state.c | 2 +- 5 files changed, 44 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7cc62a0..9bc2e69 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2001-08-17 Ragnar Kjørstad + H.J. Lu + + * etc/redhat/nfslock.init (STATDARG): New. Pass it to rpc.statd. + + * utils/statd/statd.c (longopts): Add "name". + (usage): Add "-n/--name". + (main): Set MY_NAME with "-n/--name". + + * utils/statd/state.c (change_state): Set MY_NAME only if it + is NULL. + + * utils/statd/statd.man: Updated for "-n/--name". + 2001-07-26 H.J. Lu * nfs-utils.spec (Release): Set to 8. diff --git a/etc/redhat/nfslock.init b/etc/redhat/nfslock.init index 401c614..48cea0f 100755 --- a/etc/redhat/nfslock.init +++ b/etc/redhat/nfslock.init @@ -25,6 +25,12 @@ fi [ -x /sbin/rpc.lockd ] || exit 0 [ -x /sbin/rpc.statd ] || exit 0 +if [ -n "${STATD_HOSTNAME}" ]; then + STATDARG="-n ${STATD_HOSTNAME}" +else + STATDARG="" +fi + # See how we were called. case "$1" in start) @@ -34,7 +40,7 @@ case "$1" in daemon rpc.lockd echo echo -n "Starting NFS statd: " - daemon rpc.statd + daemon rpc.statd ${STATDARG} echo touch /var/lock/subsys/nfslock ;; @@ -69,7 +75,7 @@ case "$1" in daemon rpc.lockd echo -n "rpc.statd " killproc rpc.statd - daemon rpc.statd + daemon rpc.statd ${STATDARG} touch /var/lock/subsys/nfslock echo "done." ;; diff --git a/utils/statd/statd.c b/utils/statd/statd.c index 3d90d64..4fc135a 100644 --- a/utils/statd/statd.c +++ b/utils/statd/statd.c @@ -42,6 +42,7 @@ static struct option longopts[] = { "version", 0, 0, 'v' }, { "outgoing-port", 1, 0, 'o' }, { "port", 1, 0, 'p' }, + { "name", 1, 0, 'n' }, { NULL, 0, 0, 0 } }; @@ -126,6 +127,7 @@ usage() fprintf(stderr," -p, --port Port to listen on\n"); fprintf(stderr," -o, --outgoing-port Port for outgoing connections\n"); fprintf(stderr," -V, -v, --version Display version information and exit.\n"); + fprintf(stderr," -n, --name Specify a local hostname.\n"); } /* @@ -155,8 +157,11 @@ int main (int argc, char **argv) version_p = VERSION; } + /* Set hostname */ + MY_NAME = NULL; + /* Process command line switches */ - while ((arg = getopt_long(argc, argv, "h?vVFdp:o:", longopts, NULL)) != EOF) { + while ((arg = getopt_long(argc, argv, "h?vVFdn:p:o:", longopts, NULL)) != EOF) { switch (arg) { case 'V': /* Version */ case 'v': @@ -186,6 +191,9 @@ int main (int argc, char **argv) exit(1); } break; + case 'n': /* Specify local hostname */ + MY_NAME = xstrdup(optarg); + break; case '?': /* heeeeeelllllllpppp? heh */ case 'h': usage(); diff --git a/utils/statd/statd.man b/utils/statd/statd.man index 84199e8..9f861b2 100644 --- a/utils/statd/statd.man +++ b/utils/statd/statd.man @@ -8,7 +8,7 @@ .SH NAME rpc.statd \- NSM status monitor .SH SYNOPSIS -.B "/sbin/rpc.statd [-F] [-d] [-?] [-o " port "] [-p " port "] [-V]" +.B "/sbin/rpc.statd [-F] [-d] [-?] [-n " name "] [-o " port "] [-p " port "] [-V]" .SH DESCRIPTION The .B rpc.statd @@ -52,6 +52,17 @@ be used in conjunction with the .B -F parameter. .TP +.BI "\-n," "" " \-\-name " name +specify a name for +.B rpc.statd +to use as the local hostname. By default, +.BR rpc.statd +will call +.BR gethostname (2) +to get the local hostname. Specifying +a local hostname may be useful for machines with more than one +interfaces. +.TP .BI "\-o," "" " \-\-outgoing\-port " port specify a port for .B rpc.statd diff --git a/utils/statd/state.c b/utils/statd/state.c index 101c00b..6becdc7 100644 --- a/utils/statd/state.c +++ b/utils/statd/state.c @@ -56,7 +56,7 @@ change_state (void) if (close (fd) == -1) log (L_ERROR, "close (%s): %s", SM_STAT_PATH, strerror (errno)); - if (!restart) { + if (MY_NAME == NULL) { char fullhost[SM_MAXSTRLEN + 1]; struct hostent *hostinfo; -- 2.39.2 From 5b9179e1d135ef4341516465222eaf9efb84c5f3 Mon Sep 17 00:00:00 2001 From: neilbrown Date: Wed, 12 Sep 2001 02:05:39 +0000 Subject: [PATCH 11/16] * utils/mountd/auth.c (auth_authenticate_internal): Reverse change from 2000-08-02: It causes problems if someone exports to both a hostname and IP addresses. nfs-utils must be consistant about the canonical name that it chooses. --- ChangeLog | 7 +++++++ utils/mountd/auth.c | 24 ++++++------------------ 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9bc2e69..95832a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-09-12 NeilBrown + + * utils/mountd/auth.c (auth_authenticate_internal): Reverse + change from 2000-08-02: It causes problems if someone exports + to both a hostname and IP addresses. nfs-utils must be + consistant about the canonical name that it chooses. + 2001-08-17 Ragnar Kjørstad H.J. Lu diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c index 6b6b7d7..d88c46f 100644 --- a/utils/mountd/auth.c +++ b/utils/mountd/auth.c @@ -78,20 +78,10 @@ auth_authenticate_internal(char *what, struct sockaddr_in *caller, } auth_fixpath(path); - /* First try it w/o doing a hostname lookup... */ - *hpp = get_hostent((const char *)&addr, sizeof(addr), AF_INET); - exp = export_find(*hpp, path); - - if (!exp) { - /* Ok, that didn't fly. Try it with a reverse lookup. */ - free (*hpp); - *hpp = gethostbyaddr((const char *)&addr, sizeof(addr), - AF_INET); - if (!(*hpp)) { - *error = no_entry; - *hpp = get_hostent((const char *)&addr, sizeof(addr), AF_INET); - return NULL; - } else { + if (!(*hpp = gethostbyaddr((const char *)&addr, sizeof(addr), AF_INET))) + *hpp = get_hostent((const char *)&addr, sizeof(addr), + AF_INET); + else { /* must make sure the hostent is authorative. */ char **sp; struct hostent *forward = NULL; @@ -123,14 +113,12 @@ auth_authenticate_internal(char *what, struct sockaddr_in *caller, *error = no_forward_dns; return NULL; } - } + } - if (!(exp = export_find(*hpp, path))) { + if (!(exp = export_find(*hpp, path))) { *error = no_entry; return NULL; - } } - if (!exp->m_mayexport) { *error = not_exported; return NULL; -- 2.39.2 From 8d53a2630763f8f639d2de2ddd26282bff1c7cad Mon Sep 17 00:00:00 2001 From: neilbrown Date: Wed, 12 Sep 2001 02:14:43 +0000 Subject: [PATCH 12/16] 2001-09-12 NeilBrown * support/nfs/exports.c (putexportent): \octal quote any spaces etc in a path name * support/nfs/xio.c (xgettok): recognise double-quote and \octal quoting in path names * utils/exportfs/exports.man: document quoting conventions for path names --- ChangeLog | 9 +++++++++ support/nfs/exports.c | 9 ++++++++- support/nfs/xio.c | 20 +++++++++++++++++++- utils/exportfs/exports.man | 5 ++++- 4 files changed, 40 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 95832a1..2dc842f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-09-12 NeilBrown + + * support/nfs/exports.c (putexportent): \octal quote any spaces + etc in a path name + * support/nfs/xio.c (xgettok): recognise double-quote and + \octal quoting in path names + * utils/exportfs/exports.man: document quoting conventions + for path names + 2001-09-12 NeilBrown * utils/mountd/auth.c (auth_authenticate_internal): Reverse diff --git a/support/nfs/exports.c b/support/nfs/exports.c index dbb2da0..eb1bf2c 100644 --- a/support/nfs/exports.c +++ b/support/nfs/exports.c @@ -135,12 +135,19 @@ putexportent(struct exportent *ep) { FILE *fp; int *id, i; + char *esc=ep->e_path; if (!efp) return; fp = efp->x_fp; - fprintf(fp, "%s\t%s(", ep->e_path, ep->e_hostname); + for (i=0; esc[i]; i++) + if (iscntrl(esc[i]) || esc[i] == '"' || esc[i] == '\\'|| isspace(esc[i])) + fprintf(fp, "\\%03o", esc[i]); + else + fprintf(fp, "%c", esc[i]); + + fprintf(fp, "\t%s(", ep->e_hostname); fprintf(fp, "%s,", (ep->e_flags & NFSEXP_READONLY)? "ro" : "rw"); fprintf(fp, "%ssync,", (ep->e_flags & NFSEXP_ASYNC)? "a" : ""); fprintf(fp, "%swdelay,", (ep->e_flags & NFSEXP_GATHERED_WRITES)? diff --git a/support/nfs/xio.c b/support/nfs/xio.c index cfdb1d1..9bb5100 100644 --- a/support/nfs/xio.c +++ b/support/nfs/xio.c @@ -83,14 +83,32 @@ xfunlock(int fd) close(fd); } +#define isoctal(x) (isdigit(x) && ((x)<'8')) int xgettok(XFILE *xfp, char sepa, char *tok, int len) { int i = 0; int c = 0; + int quoted=0; - while (i < len && (c = xgetc(xfp)) != EOF && c != sepa && !isspace(c)) + while (i < len && (c = xgetc(xfp)) != EOF && + (quoted || (c != sepa && !isspace(c)))) { + if (c == '"') { + quoted = !quoted; + continue; + } tok[i++] = c; + if (i >= 4 && + tok[i-4] == '\\' && + isoctal(tok[i-3]) && + isoctal(tok[i-2]) && + isoctal(tok[i-1]) && + ((tok[i]=0), + (c = strtol(tok+i-3,NULL, 8)) < 256)) { + i -= 4; + tok[i++] = c; + } + } if (c == '\n') xungetc(c, xfp); if (!i) diff --git a/utils/exportfs/exports.man b/utils/exportfs/exports.man index 8d08667..4b31ccf 100644 --- a/utils/exportfs/exports.man +++ b/utils/exportfs/exports.man @@ -22,7 +22,10 @@ contains an export point and a list of machine or netgroup names allowed to mount the file system at that point. An optional parenthesized list of export parameters may follow each machine name. Blank lines are ignored, and a # introduces a comment to the end of the line. Entries may -be continued across newlines using a backslash. +be continued across newlines using a backslash. If export name contains spaces +it should be quoted using double-quotes. You can also specify spaces +or any other unusual characters in the export path name using a +backslash followed by the character code as 3 octal digits. .PP .SS Machine Name Formats NFS clients may be specified in a number of ways: -- 2.39.2 From 4d961554071d2308017062c8bc39f37f5de55b5f Mon Sep 17 00:00:00 2001 From: neilbrown Date: Thu, 20 Sep 2001 00:10:49 +0000 Subject: [PATCH 13/16] call gethostbyaddr to make sure that we have canonical hostname for all exports --- ChangeLog | 8 ++++++++ support/export/client.c | 12 +++++++++++- utils/exportfs/exportfs.c | 9 ++++++++- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2dc842f..3826e5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-09020 NeilBrown + Anne Milicia + + * support/export/client.c (client_lookup) call gethostbyadd + to make sure that we have a canonical hostname, even for + dotted-quads + * utils/exportfs/exportfs.c (exportfs) Likewise + 2001-09-12 NeilBrown * support/nfs/exports.c (putexportent): \octal quote any spaces diff --git a/support/export/client.c b/support/export/client.c index 1fd4269..076b0c0 100644 --- a/support/export/client.c +++ b/support/export/client.c @@ -42,12 +42,22 @@ client_lookup(char *hname) htype = client_gettype(hname); if (htype == MCL_FQDN) { + struct hostent *hp2; hp = gethostbyname(hname); if (hp == NULL || hp->h_addrtype != AF_INET) { xlog(L_ERROR, "%s has non-inet addr", hname); return NULL; } - hp = hostent_dup (hp); + /* make sure we have canonical name */ + hp2 = hostent_dup(hp); + hp = gethostbyaddr(hp2->h_addr, hp2->h_length, + hp2->h_addrtype); + if (hp) { + free(hp2); + hp = hostent_dup(hp); + } else + hp = hp2; + hname = (char *) hp->h_name; for (clp = clientlist[htype]; clp; clp = clp->m_next) { diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index 0504709..c012961 100644 --- a/utils/exportfs/exportfs.c +++ b/utils/exportfs/exportfs.c @@ -228,7 +228,14 @@ exportfs(char *arg, char *options, int verbose) if ((htype = client_gettype(hname)) == MCL_FQDN && (hp = gethostbyname(hname)) != NULL) { - hp = hostent_dup (hp); + struct hostent *hp2 = hostent_dup (hp); + hp = gethostbyaddr(hp2->h_addr, hp2->h_length, + hp2->h_addrtype); + if (hp) { + free(hp2); + hp = hostent_dup(hp); + } else + hp = hp2; exp = export_find(hp, path); } else { exp = export_lookup(hname, path); -- 2.39.2 From 37e49789ab1cd849def25ba4c4d97ccdb11d1e61 Mon Sep 17 00:00:00 2001 From: neilbrown Date: Thu, 20 Sep 2001 00:37:14 +0000 Subject: [PATCH 14/16] make "exportfs -au" do no DNS lookup --- ChangeLog | 38 ++++++++++++++++++++++++- support/export/client.c | 8 ++++-- support/export/export.c | 12 ++++---- support/export/rmtab.c | 4 +-- support/export/xtab.c | 4 +-- support/include/exportfs.h | 6 ++-- utils/exportfs/exportfs.c | 57 +++++++++----------------------------- 7 files changed, 69 insertions(+), 60 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3826e5e..1c6b466 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,40 @@ -2001-09020 NeilBrown +2001-09-20 NeilBrown + + Arrange that "exportfs -au" never does DNS lookup: + + * support/export/client.c (client_lookup) : add "canonical" + flag which says that the hostname is known to be canonical, so + don't do a lookup + + * support/export/export.c (export_create) : add "canonical" + flag to be passed down to client_lookup + * support/export/export.c (export_lookup) : Likewise + + * support/export/xtab.c (xtab_read) : pass appropriate + "canonical" flag to export_lookup and export_create: + set if reading list of filesystems currently exports + (is_export != 1). + + * support/export/export.c (export_read) : pass 0 as + "canonical" flag to export_lookup and export_create + * support/export/rmtab.s (rmtab_read) : Likewise + + * support/include/exportfs.h : redeclare various routines + to have "canonical" flag + + * utils/exportfs/exportfs.c (main) : redo logic for + "-au" to read in what is currently exported, but never even + look at what "should" be exported. + + * utils/exportfs/exportfs.c (unexportall) : remove this + routine. Functionality is completely included in + exports_update + + * utils/exportfs/exportfs.c (exportfs) : set "canonical" + flag to zero in calls to export_lookup and export_create. + + +2001-09-20 NeilBrown Anne Milicia * support/export/client.c (client_lookup) call gethostbyadd diff --git a/support/export/client.c b/support/export/client.c index 076b0c0..da3a976 100644 --- a/support/export/client.c +++ b/support/export/client.c @@ -32,8 +32,12 @@ static int client_checkaddr(nfs_client *clp, struct in_addr addr); nfs_client *clientlist[MCL_MAXTYPES] = { NULL, }; +/* if canonical is set, then we *know* this is already a canonical name + * so hostname lookup is avoided. + * This is used when reading /proc/fs/nfs/exports + */ nfs_client * -client_lookup(char *hname) +client_lookup(char *hname, int canonical) { nfs_client *clp = NULL; int htype; @@ -41,7 +45,7 @@ client_lookup(char *hname) htype = client_gettype(hname); - if (htype == MCL_FQDN) { + if (htype == MCL_FQDN && !canonical) { struct hostent *hp2; hp = gethostbyname(hname); if (hp == NULL || hp->h_addrtype != AF_INET) { diff --git a/support/export/export.c b/support/export/export.c index ef12056..4cfb448 100644 --- a/support/export/export.c +++ b/support/export/export.c @@ -33,9 +33,9 @@ export_read(char *fname) setexportent(fname, "r"); while ((eep = getexportent()) != NULL) { - exp = export_lookup(eep->e_hostname, eep->e_path); + exp = export_lookup(eep->e_hostname, eep->e_path, 0); if (!exp) - export_create(eep); + export_create(eep,0); else { if (exp->m_export.e_flags != eep->e_flags) { xlog(L_ERROR, "incompatible duplicated export entries:"); @@ -61,12 +61,12 @@ export_read(char *fname) * Create an in-core export struct from an export entry. */ nfs_export * -export_create(struct exportent *xep) +export_create(struct exportent *xep, int canonical) { nfs_client *clp; nfs_export *exp; - if (!(clp = client_lookup(xep->e_hostname))) { + if (!(clp = client_lookup(xep->e_hostname, canonical))) { /* bad export entry; complaint already logged */ return NULL; } @@ -203,12 +203,12 @@ export_allowed(struct hostent *hp, char *path) } nfs_export * -export_lookup(char *hname, char *path) +export_lookup(char *hname, char *path, int canonical) { nfs_client *clp; nfs_export *exp; - if (!(clp = client_lookup(hname))) + if (!(clp = client_lookup(hname, canonical))) return NULL; for (exp = exportlist[clp->m_type]; exp; exp = exp->m_next) if (exp->m_client == clp && !strcmp(exp->m_export.e_path, path)) diff --git a/support/export/rmtab.c b/support/export/rmtab.c index 4e141c3..3c55267 100644 --- a/support/export/rmtab.c +++ b/support/export/rmtab.c @@ -37,12 +37,12 @@ rmtab_read(void) /* see if the entry already exists, otherwise this was an instantiated * wild card, and we must add it */ - exp = export_lookup(rep->r_client, xp->e_path); + exp = export_lookup(rep->r_client, xp->e_path, 0); if (!exp) { strncpy (xp->e_hostname, rep->r_client, sizeof (xp->e_hostname) - 1); xp->e_hostname[sizeof (xp->e_hostname) -1] = '\0'; - exp = export_create(xp); + exp = export_create(xp, 0); } free (hp); diff --git a/support/export/xtab.c b/support/export/xtab.c index b0c3095..54470c1 100644 --- a/support/export/xtab.c +++ b/support/export/xtab.c @@ -33,8 +33,8 @@ xtab_read(char *xtab, int is_export) return 0; setexportent(xtab, "r"); while ((xp = getexportent()) != NULL) { - if (!(exp = export_lookup(xp->e_hostname, xp->e_path)) && - !(exp = export_create(xp))) { + if (!(exp = export_lookup(xp->e_hostname, xp->e_path, is_export != 1)) && + !(exp = export_create(xp, is_export!=1))) { continue; } switch (is_export) { diff --git a/support/include/exportfs.h b/support/include/exportfs.h index 3ca248e..deb837c 100644 --- a/support/include/exportfs.h +++ b/support/include/exportfs.h @@ -45,7 +45,7 @@ typedef struct mexport { extern nfs_client * clientlist[MCL_MAXTYPES]; extern nfs_export * exportlist[MCL_MAXTYPES]; -nfs_client * client_lookup(char *hname); +nfs_client * client_lookup(char *hname, int canonical); nfs_client * client_find(struct hostent *); void client_add(nfs_client *); nfs_client * client_dup(nfs_client *, struct hostent *); @@ -58,10 +58,10 @@ void client_freeall(void); int export_read(char *fname); void export_add(nfs_export *); void export_reset(nfs_export *); -nfs_export * export_lookup(char *hname, char *path); +nfs_export * export_lookup(char *hname, char *path, int caconical); nfs_export * export_find(struct hostent *, char *path); struct exportent * export_allowed(struct hostent *, char *path); -nfs_export * export_create(struct exportent *); +nfs_export * export_create(struct exportent *, int canonical); nfs_export * export_dup(nfs_export *, struct hostent *); void export_freeall(void); int export_export(nfs_export *); diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index c012961..4c04098 100644 --- a/utils/exportfs/exportfs.c +++ b/utils/exportfs/exportfs.c @@ -24,7 +24,6 @@ #include "xlog.h" static void export_all(int verbose); -static void unexport_all(int verbose); static void exportfs(char *arg, char *options, int verbose); static void unexportfs(char *arg, int verbose); static void exports_update(int verbose); @@ -100,19 +99,21 @@ main(int argc, char **argv) for (i = optind; i < argc ; i++) exportfs(argv[i], options, f_verbose); } - /* note: xtab_*_read does not update entries if they already exist, - * so this will not lose new options + /* If we are unexporting everything, then + * don't care about what should be exported, as that + * may require DNS lookups.. */ - if (!f_reexport) - xtab_export_read(); - if (!f_export) { - if (f_all) - unexport_all(f_verbose); - else + if (! ( !f_export && f_all)) { + /* note: xtab_*_read does not update entries if they already exist, + * so this will not lose new options + */ + if (!f_reexport) + xtab_export_read(); + if (!f_export) for (i = optind ; i < argc ; i++) unexportfs(argv[i], f_verbose); + rmtab_read(); } - rmtab_read(); xtab_mount_read(); exports_update(f_verbose); xtab_export_write(); @@ -174,38 +175,6 @@ export_all(int verbose) } } } -/* - * unexport_all finds all entries that are mayexport, and - * marks them not xtabent and not mayexport - */ -static void -unexport_all(int verbose) -{ - nfs_export *exp; - int i; - - for (i = 0; i < MCL_MAXTYPES; i++) { - for (exp = exportlist[i]; exp; exp = exp->m_next) - if (exp->m_mayexport) { - if (verbose) { - if (exp->m_exported) { - printf("unexporting %s:%s from kernel\n", - exp->m_client->m_hostname, - exp->m_export.e_path); - } - else { - printf("unexporting %s:%s\n", - exp->m_client->m_hostname, - exp->m_export.e_path); - } - } - if (exp->m_exported && !export_unexport(exp)) - error(exp, errno); - exp->m_xtabent = 0; - exp->m_mayexport = 0; - } - } -} static void @@ -238,12 +207,12 @@ exportfs(char *arg, char *options, int verbose) hp = hp2; exp = export_find(hp, path); } else { - exp = export_lookup(hname, path); + exp = export_lookup(hname, path, 0); } if (!exp) { if (!(eep = mkexportent(hname, path, options)) || - !(exp = export_create(eep))) { + !(exp = export_create(eep, 0))) { if (hp) free (hp); return; } -- 2.39.2 From e997b2a740a77b3aed7fbf1c5d84b23c037b3430 Mon Sep 17 00:00:00 2001 From: neilbrown Date: Fri, 21 Sep 2001 00:53:25 +0000 Subject: [PATCH 15/16] missed an assignment for hp->h_name to hname... --- utils/exportfs/exportfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index 4c04098..8bd0b44 100644 --- a/utils/exportfs/exportfs.c +++ b/utils/exportfs/exportfs.c @@ -206,6 +206,7 @@ exportfs(char *arg, char *options, int verbose) } else hp = hp2; exp = export_find(hp, path); + hname = hp->h_name; } else { exp = export_lookup(hname, path, 0); } -- 2.39.2 From 26272cc6379200004274a883ad94c70ccf0d2256 Mon Sep 17 00:00:00 2001 From: hjl Date: Mon, 24 Sep 2001 18:43:42 +0000 Subject: [PATCH 16/16] 2001-09-24 H.J. Lu * configure.in (VERSION): Set to "0.3.3". * configure: Regenerated. * nfs-utils.spec: Likewise. * README: Updated for 0.3.3. --- ChangeLog | 8 ++++++++ README | 19 ++++++------------- configure | 2 +- configure.in | 2 +- nfs-utils.spec | 4 ++-- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1c6b466..2202394 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-09-24 H.J. Lu + + * configure.in (VERSION): Set to "0.3.3". + * configure: Regenerated. + * nfs-utils.spec: Likewise. + + * README: Updated for 0.3.3. + 2001-09-20 NeilBrown Arrange that "exportfs -au" never does DNS lookup: diff --git a/README b/README index e2295c8..a82914a 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -This is the Linux NFS utility package version 0.3.2. +This is the Linux NFS utility package version 0.3.3. The nfs-utils package is available via the Linux NFS web page is at @@ -13,26 +13,19 @@ To compile, just do will install the nfs-utils binaries. You have to install the NFS service scripts. There are 2 in etc/redhat provided for RedHat 6.x -and 7.0. They are tested on RedHat 6.2 and 7.0. +and 7.x. They are tested on RedHat 6.2 and 7.1. -On RedHat 6.2 and 7.0, you can use +On RedHat 6.2 and 7.1, you can use -# rpm -ta nfs-utils-0.3.2.tar.gz +# rpm -ta nfs-utils-0.3.3.tar.gz to build the source and binary RPMs. -util-linux 2.10m or above is required. But the following patches may -also be needed: - -ftp://nfs.sourceforge.net/pub/nfs/util-linux-2.10f-mount-tcp.patch -ftp://nfs.sourceforge.net/pub/nfs/util-linux-2.10m-mount-compat.patch -ftp://nfs.sourceforge.net/pub/nfs/util-linux-2.10m-mount-nfsv3.patch -ftp://nfs.sourceforge.net/pub/nfs/util-linux-2.10m-mount-rpc.patch - +mount in util-linux 2.11f or above is required. Thanks. H.J. hjl@lucon.org -03/10/2001 +09/24/2001 diff --git a/configure b/configure index 2b09f83..4c9a612 100755 --- a/configure +++ b/configure @@ -537,7 +537,7 @@ fi # The nfs-utils version -VERSION="0.3.2" +VERSION="0.3.3" # Check whether --with-release or --without-release was given. diff --git a/configure.in b/configure.in index fe6a724..af05244 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ AC_INIT(rules.mk) AC_PREFIX_DEFAULT(/usr) # The nfs-utils version -VERSION="0.3.2" +VERSION="0.3.3" AC_SUBST(VERSION) dnl ************************************************************* diff --git a/nfs-utils.spec b/nfs-utils.spec index 875abf1..5fb2da7 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -6,8 +6,8 @@ Summary: NFS utlilities and supporting daemons for the kernel NFS server. Name: nfs-utils -Version: 0.3.2 -Release: 8 +Version: 0.3.3 +Release: 1 Source0: ftp://nfs.sourceforge.net/pub/nfs/%{name}-%{version}.tar.gz Group: System Environment/Daemons Obsoletes: nfs-server -- 2.39.2