[Pkg-shadow-commits] r2215 - in upstream/trunk: . src

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sun Jul 27 00:35:05 UTC 2008


Author: nekral-guest
Date: 2008-07-27 00:35:04 +0000 (Sun, 27 Jul 2008)
New Revision: 2215

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/groupmems.c
Log:
	* src/groupmems.c: Remove isgroup(), which always returns TRUE.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-07-27 00:21:42 UTC (rev 2214)
+++ upstream/trunk/ChangeLog	2008-07-27 00:35:04 UTC (rev 2215)
@@ -1,5 +1,9 @@
 2008-07-27  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* src/groupmems.c: Remove isgroup(), which always returns TRUE.
+
+2008-07-27  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* src/groupmems.c: Reuse the functions from libmisc/list.c to deal
 	with user lists. addtogroup() was broken when realloc() move the
 	memory area.

Modified: upstream/trunk/src/groupmems.c
===================================================================
--- upstream/trunk/src/groupmems.c	2008-07-27 00:21:42 UTC (rev 2214)
+++ upstream/trunk/src/groupmems.c	2008-07-27 00:35:04 UTC (rev 2215)
@@ -71,14 +71,6 @@
 
 #define isroot()		(getuid () == 0)
 
-static int isgroup (void)
-{
-	gid_t g = getgid ();
-	struct group *grp = getgrgid (g); /* local, no need for xgetgrgid */
-
-	return TRUE;
-}
-
 static char *whoami (void)
 {
 	/* local, no need for xgetgrgid */
@@ -189,9 +181,6 @@
 		exit (EXIT_NOT_ROOT);
 	} else if (isroot () && NULL != thisgroup) {
 		name = thisgroup;
-	} else if (!isgroup ()) {
-		fputs (_("Group access is required\n"), stderr);
-		exit (EXIT_NOT_EROOT);
 	} else if (NULL == (name = whoami ())) {
 		fputs (_("Not primary owner of current group\n"), stderr);
 		exit (EXIT_NOT_PRIMARY);




More information about the Pkg-shadow-commits mailing list