summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6ca1642)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
they exist:
• If the local group ‘nss-nonlocal-users’ exists, then nonlocal users
they exist:
• If the local group ‘nss-nonlocal-users’ exists, then nonlocal users
- will be automatically added to it.
+ will be automatically added to it. Furthermore, if a local user is
+ added to this group, then that user will inherit any nonlocal
+ supplementary gids from a nonlocal user of the same name.
• If the local group ‘nss-local-users’ exists, then local users will
be automatically added to it.
• If the local group ‘nss-local-users’ exists, then local users will
be automatically added to it.
/*
* If the MAGIC_NONLOCAL_GROUPNAME local group exists, then nonlocal
/*
* If the MAGIC_NONLOCAL_GROUPNAME local group exists, then nonlocal
- * users will be automatically added to it.
+ * users will be automatically added to it. Furthermore, if a local
+ * user is added to this group, then that user will inherit any
+ * nonlocal supplementary gids from a nonlocal user of the same name.
*/
#define MAGIC_NONLOCAL_GROUPNAME "nss-nonlocal-users"
*/
#define MAGIC_NONLOCAL_GROUPNAME "nss-nonlocal-users"
char *buffer;
int in, out, i;
char *buffer;
int in, out, i;
- /* Check that the user is a nonlocal user before adding any groups. */
+ /* Check that the user is a nonlocal user, or a member of the
+ * MAGIC_NONLOCAL_GROUPNAME group, before adding any groups. */
status = check_nonlocal_user(user, errnop);
if (status == NSS_STATUS_TRYAGAIN) {
return status;
status = check_nonlocal_user(user, errnop);
if (status == NSS_STATUS_TRYAGAIN) {
return status;
if (!add_group(nonlocal_users_group.gr_gid, start, size, groupsp,
limit, errnop, &status))
return status;
if (!add_group(nonlocal_users_group.gr_gid, start, size, groupsp,
limit, errnop, &status))
return status;
+ } else {
+ int i;
+ for (i = 0; i < *start; ++i) {
+ if ((*groupsp)[i] == nonlocal_users_group.gr_gid) {
+ is_nonlocal = true;
+ break;
+ }
+ }
}
} else if (status == NSS_STATUS_TRYAGAIN) {
if (is_nonlocal)
}
} else if (status == NSS_STATUS_TRYAGAIN) {
if (is_nonlocal)