Do not request a password when a user uses newgrp to switch to her primary
group. Debian patch 497_newgrp_primary_group.
This commit is contained in:
parent
90ef765c2e
commit
5d2ca8b240
@ -1,3 +1,9 @@
|
|||||||
|
2007-11-17 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* src/newgrp.c: Do not request a password when a user uses newgrp
|
||||||
|
to switch to her primary group.
|
||||||
|
Debian patch 497_newgrp_primary_group.
|
||||||
|
|
||||||
2007-11-17 Nicolas François <nicolas.francois@centraliens.net>
|
2007-11-17 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* src/login.c: Log an error if the password entry could not be
|
* src/login.c: Log an error if the password entry could not be
|
||||||
|
11
src/newgrp.c
11
src/newgrp.c
@ -348,12 +348,15 @@ int main (int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* see if she is a member of this group. If she isn't a member, she
|
* see if she is a member of this group (i.e. in the list of
|
||||||
* needs to provide the group password. If there is no group
|
* members of the group, or if the group is her primary group).
|
||||||
* password, she will be denied access anyway.
|
*
|
||||||
|
* If she isn't a member, she needs to provide the group password.
|
||||||
|
* If there is no group password, she will be denied access
|
||||||
|
* anyway.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if (!is_on_list (grp->gr_mem, name))
|
if (grp->gr_gid != pwd->pw_gid && !is_on_list (grp->gr_mem, name))
|
||||||
needspasswd = 1;
|
needspasswd = 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user