[Pkg-shadow-commits] r1177 - in trunk/debian: . patches

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Sun Apr 15 13:41:42 UTC 2007


Author: nekral-guest
Date: 2007-04-15 13:41:42 +0000 (Sun, 15 Apr 2007)
New Revision: 1177

Added:
   trunk/debian/patches/497_newgrp_primary_group
Modified:
   trunk/debian/changelog
   trunk/debian/patches/series
Log:
Do not request a password when a user uses newgrp to switch to her
primary group. Closes: #396691


Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2007-04-15 13:21:25 UTC (rev 1176)
+++ trunk/debian/changelog	2007-04-15 13:41:42 UTC (rev 1177)
@@ -23,6 +23,8 @@
       commented code (which is now enabled).
     - 406_vipw_resume_properly: Resume correctly after ^Z
       Thanks to Dean Gaudet for the patch and report. Closes: #414542
+    - 497_newgrp_primary_group: Do not request a password when a user uses
+      newgrp to switch to her primary group. Closes: #396691
   * Upstream bugs fixed in upstream releases or CVS:
     - 497_non_numerical_identifier moved as 397_non_numerical_identifier
       because upstream applied it

Added: trunk/debian/patches/497_newgrp_primary_group
===================================================================
--- trunk/debian/patches/497_newgrp_primary_group	2007-04-15 13:21:25 UTC (rev 1176)
+++ trunk/debian/patches/497_newgrp_primary_group	2007-04-15 13:41:42 UTC (rev 1177)
@@ -0,0 +1,24 @@
+Goal: Do not request a password when a user uses newgrp to switch to her
+      primary group.
+
+Fixes: #396691
+
+Status wrt upstream: not forwarded yet.
+
+Index: shadow-4.0.18.1/src/newgrp.c
+===================================================================
+--- shadow-4.0.18.1.orig/src/newgrp.c	2007-04-15 15:25:01.000000000 +0200
++++ shadow-4.0.18.1/src/newgrp.c	2007-04-15 15:34:01.000000000 +0200
+@@ -357,6 +357,12 @@
+ 		needspasswd = 1;
+ 
+ 	/*
++	 * If it's her primary group, do not request a password.
++	 */
++	if (grp->gr_gid == pwd->pw_gid)
++		needspasswd = 0;
++
++	/*
+ 	 * If she does not have either a shadowed password, or a regular
+ 	 * password, and the group has a password, she needs to give the
+ 	 * group password.

Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series	2007-04-15 13:21:25 UTC (rev 1176)
+++ trunk/debian/patches/series	2007-04-15 13:41:42 UTC (rev 1177)
@@ -51,3 +51,4 @@
 493_pwck_no_SHADOWPWD
 505_useradd_recommend_adduser
 406_vipw_resume_properly
+497_newgrp_primary_group




More information about the Pkg-shadow-commits mailing list