[Pkg-shadow-commits] r2202 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Fri Jul 11 21:50:06 UTC 2008
Author: nekral-guest
Date: 2008-07-11 21:50:05 +0000 (Fri, 11 Jul 2008)
New Revision: 2202
Modified:
upstream/trunk/ChangeLog
upstream/trunk/NEWS
upstream/trunk/src/usermod.c
Log:
* src/usermod.c: Do not call usr_update() if it will have no
effects. This avoid checking if the user exists in the local passwd
file if not necessary, and thus allow to add LDAP users to local
groups. (The user is already checked against the system
configuration with getpwnam()). Thanks to Dan Kopecek.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-07-11 20:52:44 UTC (rev 2201)
+++ upstream/trunk/ChangeLog 2008-07-11 21:50:05 UTC (rev 2202)
@@ -1,5 +1,13 @@
2008-07-11 Nicolas François <nicolas.francois at centraliens.net>
+ * src/usermod.c: Do not call usr_update() if it will have no
+ effects. This avoid checking if the user exists in the local passwd
+ file if not necessary, and thus allow to add LDAP users to local
+ groups. (The user is already checked against the system
+ configuration with getpwnam()). Thanks to Dan Kopecek.
+
+2008-07-11 Nicolas François <nicolas.francois at centraliens.net>
+
* src/usermod.c: Split update_files() into update_lastlog() and
update_faillog(). Report errors (but don't fail) if the file
exist, but open(), lseek(), read(), write(), or close() fails.
Modified: upstream/trunk/NEWS
===================================================================
--- upstream/trunk/NEWS 2008-07-11 20:52:44 UTC (rev 2201)
+++ upstream/trunk/NEWS 2008-07-11 21:50:05 UTC (rev 2202)
@@ -5,6 +5,9 @@
*** general:
- newusers
* Implement the -r, --system option.
+- usermod
+ * Allow adding LDAP users (or any user not present in the local passwd
+ file) to local groups
shadow-4.1.1 -> shadow-4.1.2 25-05-2008
Modified: upstream/trunk/src/usermod.c
===================================================================
--- upstream/trunk/src/usermod.c 2008-07-11 20:52:44 UTC (rev 2201)
+++ upstream/trunk/src/usermod.c 2008-07-11 21:50:05 UTC (rev 2202)
@@ -1649,7 +1649,10 @@
* change the home directory, then close and update the files.
*/
open_files ();
- usr_update ();
+ if ( cflg || dflg || eflg || fflg || gflg || Lflg || lflg || pflg
+ || sflg || uflg || Uflg) {
+ usr_update ();
+ }
if (Gflg || lflg) {
grp_update ();
}
More information about the Pkg-shadow-commits
mailing list