- Added support to rpcgssd.init and rpcsvcgssd.init scripts to insmod

security modules.
- Changed the nfs.init script to bring rpc.svcgssd up and down, since
    rpc.svcgssd is only needed with the NFS server is running.
This commit is contained in:
Steve Dickson 2005-02-14 19:29:31 +00:00
parent db806f5c97
commit 3f418c2b9f
5 changed files with 48 additions and 19 deletions

View File

@ -1,7 +1,7 @@
Summary: NFS utlilities and supporting daemons for the kernel NFS server. Summary: NFS utlilities and supporting daemons for the kernel NFS server.
Name: nfs-utils Name: nfs-utils
Version: 1.0.6 Version: 1.0.6
Release: 49 Release: 52
# group all 32bit related archs # group all 32bit related archs
%define all_32bit_archs i386 i686 athlon %define all_32bit_archs i386 i686 athlon
@ -231,25 +231,23 @@ fi
%preun %preun
if [ "$1" = "0" ]; then if [ "$1" = "0" ]; then
/etc/rc.d/init.d/nfs stop /etc/rc.d/init.d/nfs stop
/etc/rc.d/init.d/rpcgssd stop
/etc/rc.d/init.d/rpcidmapd stop
/etc/rc.d/init.d/nfslock stop /etc/rc.d/init.d/nfslock stop
/sbin/chkconfig --del rpcidmapd
/sbin/chkconfig --del rpcgssd
/sbin/chkconfig --del rpcsvcgssd
/sbin/chkconfig --del nfs /sbin/chkconfig --del nfs
/sbin/chkconfig --del nfslock /sbin/chkconfig --del nfslock
/usr/sbin/userdel rpcuser 2>/dev/null || : /usr/sbin/userdel rpcuser 2>/dev/null || :
/usr/sbin/groupdel rpcuser 2>/dev/null || : /usr/sbin/groupdel rpcuser 2>/dev/null || :
/usr/sbin/userdel nfsnobody 2>/dev/null || : /usr/sbin/userdel nfsnobody 2>/dev/null || :
/etc/rc.d/init.d/rpcidmapd stop
/etc/rc.d/init.d/rpcgssd stop
/etc/rc.d/init.d/rpcsvcgssd stop
/sbin/chkconfig --del rpcidmapd
/sbin/chkconfig --del rpcgssd
/sbin/chkconfig --del rpcsvcgssd
fi fi
%postun %postun
if [ "$1" -ge 1 ]; then if [ "$1" -ge 1 ]; then
/etc/rc.d/init.d/rpcidmapd condrestart > /dev/null /etc/rc.d/init.d/rpcidmapd condrestart > /dev/null
/etc/rc.d/init.d/rpcgssd condrestart > /dev/null /etc/rc.d/init.d/rpcgssd condrestart > /dev/null
/etc/rc.d/init.d/rpcsvcgssd condrestart > /dev/null
/etc/rc.d/init.d/nfs condrestart > /dev/null /etc/rc.d/init.d/nfs condrestart > /dev/null
fi fi
@ -294,6 +292,12 @@ fi
%config /etc/rc.d/init.d/nfslock %config /etc/rc.d/init.d/nfslock
%changelog %changelog
* Mon Feb 14 2005 Steve Dickson <SteveD@RedHat.com>
- Added support to rpcgssd.init and rpcsvcgssd.init scripts
to insmod security modules.
- Changed the nfs.init script to bring rpc.svcgssd up and down,
since rpc.svcgssd is only needed with the NFS server is running.
* Tue Dec 14 2004 Steve Dickson <SteveD@RedHat.com> * Tue Dec 14 2004 Steve Dickson <SteveD@RedHat.com>
- Fix problem in idmapd that was causing "xdr error 10008" - Fix problem in idmapd that was causing "xdr error 10008"
errors (bz 142813) errors (bz 142813)

View File

@ -48,6 +48,8 @@ fi
case "$1" in case "$1" in
start) start)
# Start daemons. # Start daemons.
[ -x /usr/sbin/rpc.svcgssd ] && /sbin/service rpcsvcgssd start
action $"Starting NFS services: " /usr/sbin/exportfs -r action $"Starting NFS services: " /usr/sbin/exportfs -r
# Set the ports lockd should listen on # Set the ports lockd should listen on
@ -87,13 +89,13 @@ case "$1" in
echo echo
touch /var/lock/subsys/nfs touch /var/lock/subsys/nfs
# See if rpc.imapd and rpc.svcgssd need to be started. # Let rpc.idmapd know that rpc.mountd just started
[ -x /usr/sbin/rpc.idmapd ] && /sbin/service rpcidmapd condstart [ -x /usr/sbin/rpc.idmapd ] && /sbin/service rpcidmapd condstart
[ -x /usr/sbin/rpc.svcgssd ] && /sbin/service rpcsvcgssd condstart
;; ;;
stop) stop)
# Stop daemons. # Stop daemons.
[ -x /usr/sbin/rpc.svcgssd ] && /sbin/service rpcsvcgssd stop
echo -n $"Shutting down NFS mountd: " echo -n $"Shutting down NFS mountd: "
killproc rpc.mountd killproc rpc.mountd
echo echo
@ -118,6 +120,8 @@ case "$1" in
rm -f /var/lock/subsys/nfs rm -f /var/lock/subsys/nfs
;; ;;
status) status)
[ -x /usr/sbin/rpc.svcgssd ] && /sbin/service rpcsvcgssd status
echo -n $"Shutting down NFS mountd: "
status rpc.mountd status rpc.mountd
status nfsd status nfsd
if [ -n "$RQUOTAD" -a "$RQUOTAD" != "no" ]; then if [ -n "$RQUOTAD" -a "$RQUOTAD" != "no" ]; then
@ -146,6 +150,7 @@ case "$1" in
fi fi
;; ;;
condrestart) condrestart)
[ -x /usr/sbin/rpc.svcgssd ] && /sbin/service rpcsvcgssd condrestart
[ -f /var/lock/subsys/nfs ] && { [ -f /var/lock/subsys/nfs ] && {
$0 stop $0 stop
$0 start $0 start

View File

@ -4,7 +4,7 @@
# #
# Authors: Chuck Lever <cel@netapp.com> # Authors: Chuck Lever <cel@netapp.com>
# #
# chkconfig: 345 18 68 # chkconfig: 345 19 69
# description: Starts user-level daemon that manages RPCSEC GSS contexts \ # description: Starts user-level daemon that manages RPCSEC GSS contexts \
# for the NFSv4 client. # for the NFSv4 client.
@ -26,6 +26,9 @@ fi
[ -f /etc/sysconfig/nfs ] && . /etc/sysconfig/nfs [ -f /etc/sysconfig/nfs ] && . /etc/sysconfig/nfs
[ "${SECURE_NFS}" != "yes" ] && exit 0 [ "${SECURE_NFS}" != "yes" ] && exit 0
# List of kernel modules to load
[ -z "${SECURE_NFS_MODS}" ] && SECURE_NFS_MODS="des rpcsec_gss_krb5"
# Try to use machine credentials by default # Try to use machine credentials by default
OPTIONS="-m" OPTIONS="-m"
@ -40,13 +43,20 @@ case "$1" in
fi fi
rm -f /var/lock/subsys/$prog rm -f /var/lock/subsys/$prog
echo -n $"Starting NFS4 gssd: " echo -n $"Starting RPC gssd: "
# Load sunrpc which mounts the rpc_pipes fs. # Load sunrpc which mounts the rpc_pipes fs.
[ -x /sbin/lsmod -a -x /sbin/modprobe ] && { [ -x /sbin/lsmod -a -x /sbin/modprobe ] && {
if ! /sbin/lsmod | grep sunrpc > /dev/null ; then if ! /sbin/lsmod | grep sunrpc > /dev/null ; then
/sbin/modprobe sunrpc || exit 1 /sbin/modprobe sunrpc || exit 1
fi fi
# Load rpcsec modules
for i in ${SECURE_NFS_MODS}
do
if ! /sbin/lsmod | grep $i > /dev/null ; then
/sbin/modprobe $i || exit 1
fi
done
} }
# Make sure the mount worked. # Make sure the mount worked.
[ -z "${RPCMTAB}" ] && RPCMTAB=`grep -v '^#' /proc/mounts | \ [ -z "${RPCMTAB}" ] && RPCMTAB=`grep -v '^#' /proc/mounts | \
@ -64,7 +74,7 @@ case "$1" in
;; ;;
stop) stop)
# Stop daemon. # Stop daemon.
echo -n $"Shutting down NFS4 gssd: " echo -n $"Shutting down RPC gssd: "
killproc $prog killproc $prog
RETVAL=$? RETVAL=$?
echo echo

View File

@ -4,7 +4,7 @@
# #
# Authors: Chuck Lever <cel@netapp.com> # Authors: Chuck Lever <cel@netapp.com>
# #
# chkconfig: 345 19 69 # chkconfig: 345 18 68
# description: Starts user-level daemon for NFSv4 that maps user \ # description: Starts user-level daemon for NFSv4 that maps user \
# names to UID and GID numbers. # names to UID and GID numbers.
@ -35,7 +35,7 @@ case "$1" in
fi fi
rm -f /var/lock/subsys/$prog rm -f /var/lock/subsys/$prog
echo -n $"Starting NFS4 idmapd: " echo -n $"Starting RPC idmapd: "
# Load sunrpc which mounts the rpc_pipes fs. # Load sunrpc which mounts the rpc_pipes fs.
[ -x /sbin/lsmod -a -x /sbin/modprobe ] && { [ -x /sbin/lsmod -a -x /sbin/modprobe ] && {
@ -60,7 +60,7 @@ case "$1" in
;; ;;
stop) stop)
# Stop daemon. # Stop daemon.
echo -n $"Shutting down NFS4 idmapd: " echo -n $"Shutting down RPC idmapd: "
killproc $prog killproc $prog
RETVAL=$? RETVAL=$?
echo echo

View File

@ -4,7 +4,7 @@
# #
# Authors: Chuck Lever <cel@netapp.com> # Authors: Chuck Lever <cel@netapp.com>
# #
# chkconfig: 345 19 69 # chkconfig: - 19 69
# description: Starts user-level daemon that manages RPCSEC GSS contexts \ # description: Starts user-level daemon that manages RPCSEC GSS contexts \
# for the NFSv4 server. # for the NFSv4 server.
@ -26,6 +26,9 @@ fi
[ -f /etc/sysconfig/nfs ] && . /etc/sysconfig/nfs [ -f /etc/sysconfig/nfs ] && . /etc/sysconfig/nfs
[ "${SECURE_NFS}" != "yes" ] && exit 0 [ "${SECURE_NFS}" != "yes" ] && exit 0
# List of kernel modules to load
[ -z "${SECURE_NFS_MODS}" ] && SECURE_NFS_MODS="des rpcsec_gss_krb5"
OPTIONS="" OPTIONS=""
RETVAL=0 RETVAL=0
prog="rpc.svcgssd" prog="rpc.svcgssd"
@ -38,13 +41,20 @@ case "$1" in
fi fi
rm -f /var/lock/subsys/$prog rm -f /var/lock/subsys/$prog
echo -n $"Starting NFS4 svcgssd: " echo -n $"Starting RPC svcgssd: "
# Load sunrpc which mounts the rpc_pipes fs. # Load sunrpc which mounts the rpc_pipes fs.
[ -x /sbin/lsmod -a -x /sbin/modprobe ] && { [ -x /sbin/lsmod -a -x /sbin/modprobe ] && {
if ! /sbin/lsmod | grep sunrpc > /dev/null ; then if ! /sbin/lsmod | grep sunrpc > /dev/null ; then
/sbin/modprobe sunrpc || exit 1 /sbin/modprobe sunrpc || exit 1
fi fi
# Load rpcsec modules
for i in ${SECURE_NFS_MODS}
do
if ! /sbin/lsmod | grep $i > /dev/null ; then
/sbin/modprobe $i || exit 1
fi
done
} }
# Make sure the mount worked. # Make sure the mount worked.
@ -63,7 +73,7 @@ case "$1" in
;; ;;
stop) stop)
# Stop daemon. # Stop daemon.
echo -n $"Shutting down NFS4 svcgssd: " echo -n $"Shutting down RPC svcgssd: "
killproc $prog killproc $prog
RETVAL=$? RETVAL=$?
echo echo