Avoid assigning 0 as primary group id for users in NSS calls.
Jerry, please check.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_0@21387
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
user_info->homedir = NULL;
user_info->shell = NULL;
+ user_info->primary_gid = (gid_t)-1;
SAFE_FREE(user);
&ctr->info.id21->uni_full_name);
user_info->homedir = NULL;
user_info->shell = NULL;
+ user_info->primary_gid = (gid_t)-1;
return NT_STATUS_OK;
}
call worked or not. --jerry */
if ( s->gid == (gid_t)-1 ) {
+
if (!success) {
DEBUG(5, ("Could not query user's %s\\%s\n gid",
s->domain->name, s->username));
s->gid = gid;
}
- /* allow the nss backend to override the primary group ID.
- If the gid has already been set, then keep it */
-
- if ( s->gid == (gid_t)-1 ) {
- s->gid = gid;
- }
-
pw = &s->state->response.data.pw;
pw->pw_uid = s->uid;
pw->pw_gid = s->gid;