diff --git a/.cvsignore b/.cvsignore index c7a30ef..f191f68 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -nfs-utils-1.0.1.tar.gz +nfs-utils-1.0.6.tar.gz nfs.doc.tar.gz diff --git a/nfs-utils-1.0.5-statdpath.patch b/nfs-utils-1.0.5-statdpath.patch new file mode 100644 index 0000000..8c1586e --- /dev/null +++ b/nfs-utils-1.0.5-statdpath.patch @@ -0,0 +1,16 @@ +--- ./utils/statd/statd.h.orig 2002-09-01 22:31:23.000000000 -0400 ++++ ./utils/statd/statd.h 2003-07-21 10:45:54.000000000 -0400 +@@ -13,10 +13,11 @@ + /* + * Paths and filenames. + */ ++#define STATD_PATH_XTN "statd/" + #if defined(NFS_STATEDIR) +-# define DEFAULT_DIR_BASE NFS_STATEDIR "/" ++# define DEFAULT_DIR_BASE NFS_STATEDIR "/" STATD_PATH_XTN + #else +-# define DEFAULT_DIR_BASE "/var/lib/nfs/" ++# define DEFAULT_DIR_BASE "/var/lib/nfs/" STATD_PATH_XTN + #endif + + #define DEFAULT_SM_DIR DEFAULT_DIR_BASE "sm" diff --git a/nfs-utils.spec b/nfs-utils.spec index dcf09a9..cbe03a1 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -1,20 +1,16 @@ Summary: NFS utlilities and supporting daemons for the kernel NFS server. Name: nfs-utils -Version: 1.0.1 -Release: 3.9 -Source0: http://prdownloads.sourceforge.net/nfs/nfs-utils-1.0.1.tar.gz +Version: 1.0.6 +Release: 1 +Source0: http://prdownloads.sourceforge.net/nfs/nfs-utils-1.0.6.tar.gz Source1: ftp://nfs.sourceforge.net/pub/nfs/nfs.doc.tar.gz Source10: nfs.init Source11: nfslock.init -Patch0: nfs-utils-0.3.3.drop-privs.patch -Patch1: nfs-utils-0.2beta-nowrap.patch -Patch2: no-chroot.patch +Patch0: nfs-utils-0.2beta-nowrap.patch +Patch1: install-prefix.patch +Patch2: nfs-utils-1.0.5-statdpath.patch Patch3: nfs-utils-0.3.3.statd-manpage.patch -Patch4: eepro-support.patch -Patch5: time-h.patch -Patch6: nfs-utils-sigpipe.patch -Patch7: install-prefix.patch -Patch8: nfs-utils-1.0.3-mountd.secfix.patch +Patch4: nfs-utils-1.0.3-aclexport.patch Group: System Environment/Daemons Obsoletes: nfs-server Obsoletes: knfsd @@ -43,15 +39,11 @@ clients which are mounted on that host. %prep %setup -q -a 1 -%patch -p1 -b .drop-privs -%patch1 -p0 -%patch2 -p1 -b .no-chroot +%patch0 -p0 +%patch1 -p1 -b .prefix +%patch2 -p1 -b .statdpath %patch3 -p1 -b .statd-manpage -%patch4 -p1 -b .eepro-support -%patch5 -p1 -b .time-h -%patch6 -p1 -b .sigpipe -%patch7 -p1 -b .prefix -%patch8 -p1 -b .secfix +#%patch4 -p1 -b .aclexp %build # @@ -100,6 +92,7 @@ fi %preun if [ "$1" = "0" ]; then + /etc/rc.d/init.d/nfs stop /sbin/chkconfig --del nfs /sbin/chkconfig --del nfslock /usr/sbin/userdel rpcuser 2>/dev/null || : @@ -124,6 +117,7 @@ fi %config(noreplace) /var/lib/nfs/xtab %config(noreplace) /var/lib/nfs/etab %config(noreplace) /var/lib/nfs/rmtab +%config(noreplace) /var/lib/nfs/state %doc nfs/*.html nfs/*.ps linux-nfs/* /sbin/rpcdebug /sbin/rpc.lockd @@ -138,8 +132,39 @@ fi %config /etc/rc.d/init.d/nfslock %changelog -* Fri Jun 20 2003 Steve Dickson -- Added mountd security fix +* Wed Oct 22 2003 Steve Dickson +- Upgrated to 1.0.6 +- Commented out the acl path for fedora + +* Thu Aug 27 2003 Steve Dickson +- Added the setting of lockd ports via sysclt interface +- Removed queue setting code since its no longer needed + +* Thu Aug 7 2003 Steve Dickson +- Added back the acl patch Taroon b2 + +* Wed Jul 23 2003 Steve Dickson +- Commented out the acl patch (for now) + +* Wed Jul 21 2003 Steve Dickson +- Upgrated to 1.0.5 + +* Wed Jun 18 2003 Steve Dickson +- Added security update +- Fixed the drop-privs.patch which means the chroot +patch could be removed. + +* Mon Jun 9 2003 Steve Dickson +- Defined the differ kinds of debugging avaliable for mountd in +the mountd man page. + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Tue Jun 3 2003 Steve Dickson +- Upgraded to 1.0.3 +- Fixed numerous bugs in init scrips +- Added nfsstat overflow patch * Thu Jan 23 2003 Tim Powers 1.0.1-2.9 - rebuild diff --git a/nfs.init b/nfs.init index 0b400e0..c3639fc 100755 --- a/nfs.init +++ b/nfs.init @@ -33,7 +33,6 @@ fi { echo "/etc/exports does not exist" ; exit 0 ; } # Check for and source configuration file otherwise set defaults -# TUNE_QUEUE: controls whether to up the size of input queues [ -f /etc/sysconfig/nfs ] && . /etc/sysconfig/nfs [ -z "$MOUNTD_NFS_V2" ] && MOUNTD_NFS_V2=auto @@ -45,27 +44,22 @@ fi # Remote quota server [ -z "$RQUOTAD" ] && RQUOTAD=`type -path rpc.rquotad` -# Get the initial values for the input sock queues -# at the time of running the script. -if [ "$TUNE_QUEUE" = "yes" ]; then - RMEM_DEFAULT=`/sbin/sysctl -n net.core.rmem_default` - RMEM_MAX=`/sbin/sysctl -n net.core.rmem_max` - # 256kb recommended minimum size based on SPECsfs NFS benchmarks - [ -z "$NFS_QS" ] && NFS_QS=262144 -fi - # See how we were called. case "$1" in start) # Start daemons. - # Apply input queue increase for nfs server - if [ "$TUNE_QUEUE" = "yes" ]; then - /sbin/sysctl -w net.core.rmem_default=$NFSD_QS >/dev/null 2>&1 - /sbin/sysctl -w net.core.rmem_max=$NFSD_QS >/dev/null 2>&1 + + # Set the ports lockd should listen on + if [ -n "LOCKD_TCPPORT" ]; then + /sbin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT >/dev/null 2>&1 fi + if [ -n "LOCKD_UDPPORT" ]; then + /sbin/sysctl -w fs.nfs.nlm_udpport=$LOCKD_UDPPORT >/dev/null 2>&1 + fi + action $"Starting NFS services: " /usr/sbin/exportfs -r if [ -n "$RQUOTAD" -a "$RQUOTAD" != "no" ]; then - echo -n "Starting NFS quotas: " + echo -n $"Starting NFS quotas: " daemon rpc.rquotad echo fi @@ -112,11 +106,6 @@ case "$1" in daemon rpc.mountd $RPCMOUNTDOPTS echo touch /var/lock/subsys/nfs - # reset input queue for rest of network services - if [ "$TUNE_QUEUE" = "yes" ]; then - /sbin/sysctl -w net.core.rmem_default=$RMEM_DEFAULT >/dev/null 2>&1 - /sbin/sysctl -w net.core.rmem_max=$RMEM_MAX >/dev/null 2>&1 - fi ;; stop) # Stop daemons. @@ -127,10 +116,17 @@ case "$1" in killproc nfsd echo if [ -n "$RQUOTAD" ]; then - echo -n "Shutting down NFS quotas: " + echo -n $"Shutting down NFS quotas: " killproc rpc.rquotad echo fi + # Reset the lockd ports if they were set + if [ -n "LOCKD_TCPPORT" ]; then + /sbin/sysctl -w fs.nfs.nlm_tcpport=0 >/dev/null 2>&1 + fi + if [ -n "LOCKD_UDPPORT" ]; then + /sbin/sysctl -w fs.nfs.nlm_udpport=0 >/dev/null 2>&1 + 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 @@ -164,8 +160,14 @@ case "$1" in echo $"reload"; exit 0 fi ;; + condrestart) + [ -f /var/lock/subsys/nfs ] && { + $0 stop + $0 start + } + ;; *) - echo $"Usage: nfs {start|stop|status|restart|reload}" + echo $"Usage: nfs {start|stop|status|restart|reload|condrestart}" exit 1 esac diff --git a/nfslock.init b/nfslock.init index 2e84949..e7e9ea7 100755 --- a/nfslock.init +++ b/nfslock.init @@ -17,6 +17,9 @@ if [ ! -f /etc/sysconfig/network ]; then exit 0 fi +# Check for and source configuration file +[ -f /etc/sysconfig/nfs ] && . /etc/sysconfig/nfs + . /etc/sysconfig/network # Check that networking is up. @@ -41,6 +44,12 @@ fi [ -x /sbin/rpc.statd ] || exit 0 RETVAL=0 +if [ -n "${STATD_HOSTNAME}" ]; then + STATDARG="-n ${STATD_HOSTNAME}" +else + STATDARG="" +fi + start() { if [ ! -f /var/lock/subsys/nfslock ]; then @@ -51,7 +60,11 @@ start() { echo fi echo -n $"Starting NFS statd: " - daemon rpc.statd + # See if a statd's ports has been defined + [ -n "$STATD_PORT" ] && STATDARG="$STATDARG -p $STATD_PORT" + [ -n "$STATD_OUTGOING_PORT" ] \ + && STATDARG="$STATDARG -o $STATD_OUTGOING_PORT" + daemon rpc.statd "$STATDARG" RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nfslock @@ -94,7 +107,7 @@ case "$1" in ;; probe) if [ ! -f /var/lock/subsys/nfslock ] ; then - echo start; exit 0 + echo $"start"; exit 0 fi /sbin/pidof rpc.statd >/dev/null 2>&1; STATD="$?" if [ "$USERLAND_LOCKD" ]; then @@ -103,11 +116,17 @@ case "$1" in LOCKD=0 fi if [ $STATD = 1 -o $LOCKD = 1 ] ; then - echo restart; exit 0 + echo $"restart"; exit 0 fi ;; + condrestart) + [ -f /var/lock/subsys/nfslock ] && { + stop + start + } + ;; *) - echo $"Usage: $0 {start|stop|status|restart}" + echo $"Usage: $0 {start|stop|status|restart|probe|condrestart}" exit 1 esac diff --git a/sources b/sources index 4b891b8..d1d0d0b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -7a9f802911cf2a79942338b1269b3d5b nfs-utils-1.0.1.tar.gz +f17e9983457e1cf61c37f0be4493fce6 nfs-utils-1.0.6.tar.gz ae7db9c61c5ad04f83bb99e5caed73da nfs.doc.tar.gz