Merge pull request #437 from ikerexxe/newgrp_segfault
newgrp: fix segmentation fault
This commit is contained in:
commit
126fbe57bc
@ -163,8 +163,8 @@ static void check_perms (const struct group *grp,
|
||||
spwd = xgetspnam (pwd->pw_name);
|
||||
if (NULL != spwd) {
|
||||
pwd->pw_passwd = xstrdup (spwd->sp_pwdp);
|
||||
}
|
||||
spw_free (spwd);
|
||||
}
|
||||
|
||||
if ((pwd->pw_passwd[0] == '\0') && (grp->gr_passwd[0] != '\0')) {
|
||||
needspasswd = true;
|
||||
|
Loading…
Reference in New Issue
Block a user