+2011-11-16 Nicolas François <nicolas.francois@centraliens.net>
+
+ * src/gpasswd.c: Change of group password enforces gshadow
+ password. Set /etc/group password to "x".
+
2011-11-16 Peter Vrabec <pvrabec@redhat.com>
* NEWS, src/userdel.c, man/userdel.8.xml: Add option -Z/--selinux-user.
memzero (pass, sizeof pass);
#ifdef SHADOWGRP
if (is_shadowgrp) {
+ gr->gr_passwd = SHADOW_PASSWD_STRING;
sg->sg_passwd = cp;
} else
#endif
* field to a "".
*/
if (rflg) {
- grent.gr_passwd = ""; /* XXX warning: const */
#ifdef SHADOWGRP
- sgent.sg_passwd = ""; /* XXX warning: const */
-#endif
+ if (is_shadowgrp) {
+ grent.gr_passwd = SHADOW_PASSWD_STRING; /* XXX warning: const */
+ sgent.sg_passwd = ""; /* XXX warning: const */
+ } else
+#endif /* SHADOWGRP */
+ {
+ grent.gr_passwd = ""; /* XXX warning: const */
+ }
goto output;
} else if (Rflg) {
/*
* Same thing for restricting the group. Set the password
* field to "!".
*/
- grent.gr_passwd = "!"; /* XXX warning: const */
#ifdef SHADOWGRP
- sgent.sg_passwd = "!"; /* XXX warning: const */
-#endif
+ if (is_shadowgrp) {
+ grent.gr_passwd = SHADOW_PASSWD_STRING; /* XXX warning: const */
+ sgent.sg_passwd = "!"; /* XXX warning: const */
+ } else
+#endif /* SHADOWGRP */
+ {
+ grent.gr_passwd = "!"; /* XXX warning: const */
+ }
goto output;
}