rpms/rpcbind/devel rpcbind-0.1.5-setgid.patch, NONE, 1.1 rpcbind.spec, 1.27, 1.28

Steve Dickson (steved) fedora-extras-commits at redhat.com
Mon Jun 23 16:40:45 UTC 2008


Author: steved

Update of /cvs/pkgs/rpms/rpcbind/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30341

Modified Files:
	rpcbind.spec 
Added Files:
	rpcbind-0.1.5-setgid.patch 
Log Message:
rpcbind needs to downgrade to non-priviledgied group



rpcbind-0.1.5-setgid.patch:

--- NEW FILE rpcbind-0.1.5-setgid.patch ---
commit f7d18d511767e892e52932f8c6f6e49755a8e5bc
Author: Guillaume Rousse <Guillaume.Rousse at inria.fr>
Date:   Mon Jun 23 12:30:29 2008 -0400

    rpcbind needs to also downgrade its gid to a non-priviledgied group
    
    Signed-off-by: Andreas Hasenack <andreas at mandriva.com>
    Signed-off-by: Guillaume Rousse <Guillaume.Rousse at inria.fr>
    Signed-off-by: Steve Dickson <steved at redhat.com>

diff --git a/src/rpcbind.c b/src/rpcbind.c
index 949ece2..fb75517 100644
--- a/src/rpcbind.c
+++ b/src/rpcbind.c
@@ -216,8 +216,12 @@ main(int argc, char *argv[])
 			syslog(LOG_ERR, "cannot get uid of '%s': %m", id);
 			exit(1);
 		}
+                if (setgid(p->pw_gid) == -1) {
+                        syslog(LOG_ERR, "setgid to '%s' (%d) failed: %m", id, p->pw_gid);
+                        exit(1);
+                }
 		if (setuid(p->pw_uid) == -1) {
-			syslog(LOG_ERR, "setuid to '%s' failed: %m", id);
+			syslog(LOG_ERR, "setuid to '%s' (%d) failed: %m", id, p->pw_uid);
 			exit(1);
 		}
 	}


Index: rpcbind.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rpcbind/devel/rpcbind.spec,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- rpcbind.spec	23 Jun 2008 15:26:48 -0000	1.27
+++ rpcbind.spec	23 Jun 2008 16:39:59 -0000	1.28
@@ -2,7 +2,7 @@
 
 Name:           rpcbind
 Version:        0.1.5
-Release: 		1%{?dist}
+Release: 		2%{?dist}
 Summary:        Universal Addresses to RPC Program Number Mapper
 Group:          System Environment/Daemons
 License:        GPL
@@ -26,6 +26,7 @@
 Obsoletes: portmap <= 4.0-65.3
 
 Patch1: rpcbind-0.1.4-iff_up.patch
+Patch2: rpcbind-0.1.5-setgid.patch
 
 %description
 The rpcbind utility is a server that converts RPC program numbers into
@@ -36,6 +37,7 @@
 %setup -q
 
 %patch1 -p1
+%patch2 -p1
 
 %build
 %ifarch s390 s390x
@@ -116,6 +118,9 @@
 
 %changelog
 * Mon Jun 23 2008 Steve Dickson <steved at redhat.com> 0.1.5-1
+- rpcbind needs to downgrade to non-priviledgied group.
+
+* Mon Jun 23 2008 Steve Dickson <steved at redhat.com> 0.1.5-1
 - Updated to latest upstream release 0.1.5
 
 * Mon Feb 11 2008 Steve Dickson <steved at redhat.com> 0.1.4-14




More information about the fedora-extras-commits mailing list