[nfs-utils] Correctly search for the existence of nfsnobody (bz 816149) Correctly change the default group id fo

Steve Dickson steved at fedoraproject.org
Fri May 25 14:49:10 UTC 2012


commit 40c2a71d4398a48d3b72d662933c980c23a3314e
Author: Steve Dickson <steved at redhat.com>
Date:   Fri May 25 10:47:10 2012 -0400

    Correctly search for the existence of nfsnobody (bz 816149)
    Correctly change the default group id for nfsnobody (bz 816149)
    
    Signed-off-by: Steve Dickson <steved at redhat.com>

 nfs-utils.spec |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/nfs-utils.spec b/nfs-utils.spec
index 906b9e5..4aeb8ae 100644
--- a/nfs-utils.spec
+++ b/nfs-utils.spec
@@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
 Name: nfs-utils
 URL: http://sourceforge.net/projects/nfs
 Version: 1.2.6
-Release: 0%{?dist}
+Release: 1%{?dist}
 Epoch: 1
 
 # group all 32bit related archs
@@ -179,7 +179,7 @@ done
 %define nfsnobody_uid   65534
 
 # Create nfsnobody gid as long as it does not already exist
-cat /etc/group | cut -d':' -f 3 | grep --quiet %{nfsnobody_uid} 2>/dev/null
+cat /etc/group | cut -d':' -f 3 | grep --quiet nfsnobody 2>/dev/null
 if [ "$?" -eq 1 ]; then
     /usr/sbin/groupadd -g %{nfsnobody_uid} nfsnobody 2>/dev/null || :
 else
@@ -187,13 +187,13 @@ else
 fi
 
 # Create nfsnobody uid as long as it does not already exist.
-cat /etc/passwd | cut -d':' -f 3 | grep --quiet %{nfsnobody_uid} 2>/dev/null
+cat /etc/passwd | cut -d':' -f 3 | grep --quiet nfsnobody 2>/dev/null
 if [ "$?" -eq 1 ]; then
     /usr/sbin/useradd -l -c "Anonymous NFS User" -r -g %{nfsnobody_uid} \
         -s /sbin/nologin -u %{nfsnobody_uid} -d /var/lib/nfs nfsnobody 2>/dev/null || :
 else
 
-   /usr/sbin/usermod -u %{nfsnobody_uid} nfsnobody 2>/dev/null || :
+   /usr/sbin/usermod -u %{nfsnobody_uid} -g %{nfsnobody_uid} nfsnobody 2>/dev/null || :
 fi
 
 %post
@@ -293,6 +293,10 @@ fi
 %attr(4755,root,root)   /sbin/umount.nfs4
 
 %changelog
+* Fri May 25 2012 Steve Dickson <steved at redhat.com> 1.2.6-1
+- Correctly search for the existence of nfsnobody (bz 816149)
+- Correctly change the default group id for nfsnobody (bz 816149)
+
 * Tue May 15 2012 Steve Dickson <steved at redhat.com> 1.2.6-0
 - Update to the latest upstream release: nfs-utils-1.2.6 (bz 821673)
 - Split out NFS server daemons into individual service files (bz 769879) 


More information about the scm-commits mailing list