+2012-05-18 Nicolas François <nicolas.francois@centraliens.net>
+
+ * NEWS, src/userdel.c: Fix segfault when userdel removes the
+ user's group.
+
2012-05-17 Nicolas François <nicolas.francois@centraliens.net>
* NEWS, src/login.c: Log in utmp / utmpx / wtmp also when PAM is
- login
* Log into utmp(x) when PAM is enabled, but do not log into wtmp.
This complete pam_lastlog which logs into wtmp and in into utmp(x).
+- userdel
+ * Fix segfault when userdel removes the user's group.
shadow-4.1.4.3 -> shadow-4.1.5 2012-02-12
* We can remove this group, it is not the primary
* group of any remaining user.
*/
- if (gr_remove (grp->gr_name) == 0) {
+ if (gr_remove (user_name) == 0) {
fprintf (stderr,
_("%s: cannot remove entry '%s' from %s\n"),
- Prog, grp->gr_name, gr_dbname ());
+ Prog, user_name, gr_dbname ());
fail_exit (E_GRP_UPDATE);
}
#ifdef WITH_AUDIT
audit_logger (AUDIT_DEL_GROUP, Prog,
"deleting group",
- grp->gr_name, AUDIT_NO_ID,
+ user_name, AUDIT_NO_ID,
SHADOW_AUDIT_SUCCESS);
#endif /* WITH_AUDIT */
SYSLOG ((LOG_INFO,
"removed group '%s' owned by '%s'\n",
- grp->gr_name, user_name));
+ user_name, user_name));
#ifdef SHADOWGRP
if (sgr_locate (user_name) != NULL) {
#ifdef WITH_AUDIT
audit_logger (AUDIT_DEL_GROUP, Prog,
"deleting shadow group",
- grp->gr_name, AUDIT_NO_ID,
+ user_name, AUDIT_NO_ID,
SHADOW_AUDIT_SUCCESS);
#endif /* WITH_AUDIT */
SYSLOG ((LOG_INFO,
"removed shadow group '%s' owned by '%s'\n",
- grp->gr_name, user_name));
+ user_name, user_name));
}
#endif /* SHADOWGRP */