* 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>
|
2011-11-16 Peter Vrabec <pvrabec@redhat.com>
|
||||||
|
|
||||||
* NEWS, src/userdel.c, man/userdel.8.xml: Add option -Z/--selinux-user.
|
* 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);
|
memzero (pass, sizeof pass);
|
||||||
#ifdef SHADOWGRP
|
#ifdef SHADOWGRP
|
||||||
if (is_shadowgrp) {
|
if (is_shadowgrp) {
|
||||||
|
gr->gr_passwd = SHADOW_PASSWD_STRING;
|
||||||
sg->sg_passwd = cp;
|
sg->sg_passwd = cp;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@ -1041,20 +1042,30 @@ int main (int argc, char **argv)
|
|||||||
* field to a "".
|
* field to a "".
|
||||||
*/
|
*/
|
||||||
if (rflg) {
|
if (rflg) {
|
||||||
grent.gr_passwd = ""; /* XXX warning: const */
|
|
||||||
#ifdef SHADOWGRP
|
#ifdef SHADOWGRP
|
||||||
sgent.sg_passwd = ""; /* XXX warning: const */
|
if (is_shadowgrp) {
|
||||||
#endif
|
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;
|
goto output;
|
||||||
} else if (Rflg) {
|
} else if (Rflg) {
|
||||||
/*
|
/*
|
||||||
* Same thing for restricting the group. Set the password
|
* Same thing for restricting the group. Set the password
|
||||||
* field to "!".
|
* field to "!".
|
||||||
*/
|
*/
|
||||||
grent.gr_passwd = "!"; /* XXX warning: const */
|
|
||||||
#ifdef SHADOWGRP
|
#ifdef SHADOWGRP
|
||||||
sgent.sg_passwd = "!"; /* XXX warning: const */
|
if (is_shadowgrp) {
|
||||||
#endif
|
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;
|
goto output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user