* src/gpasswd.c: Change of group password enforces gshadow
password. Set /etc/group password to "x".
This commit is contained in:
parent
8f008f8319
commit
653d22c3e9
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
@ -941,6 +941,7 @@ static void change_passwd (struct group *gr)
|
||||
memzero (pass, sizeof pass);
|
||||
#ifdef SHADOWGRP
|
||||
if (is_shadowgrp) {
|
||||
gr->gr_passwd = SHADOW_PASSWD_STRING;
|
||||
sg->sg_passwd = cp;
|
||||
} else
|
||||
#endif
|
||||
@ -1041,20 +1042,30 @@ int main (int argc, char **argv)
|
||||
* field to a "".
|
||||
*/
|
||||
if (rflg) {
|
||||
grent.gr_passwd = ""; /* XXX warning: const */
|
||||
#ifdef SHADOWGRP
|
||||
if (is_shadowgrp) {
|
||||
grent.gr_passwd = SHADOW_PASSWD_STRING; /* XXX warning: const */
|
||||
sgent.sg_passwd = ""; /* XXX warning: const */
|
||||
#endif
|
||||
} 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
|
||||
if (is_shadowgrp) {
|
||||
grent.gr_passwd = SHADOW_PASSWD_STRING; /* XXX warning: const */
|
||||
sgent.sg_passwd = "!"; /* XXX warning: const */
|
||||
#endif
|
||||
} else
|
||||
#endif /* SHADOWGRP */
|
||||
{
|
||||
grent.gr_passwd = "!"; /* XXX warning: const */
|
||||
}
|
||||
goto output;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user