s3: Fix nss info substitution
authorBo Yang <boyang@samba.org>
Fri, 7 Aug 2009 22:10:37 +0000 (06:10 +0800)
committerBo Yang <boyang@samba.org>
Fri, 7 Aug 2009 22:26:43 +0000 (06:26 +0800)
Signed-off-by: Bo Yang <boyang@samba.org>
source3/winbindd/wb_getpwsid.c

index a823ba3953fa0dc17370954c5b06724ad5235a1e..fc696cb9a1884069547ab1e526f4116fa26e6484 100644 (file)
@@ -191,7 +191,7 @@ static void wb_getpwsid_sid2gid_done(struct tevent_req *subreq)
        fstrcpy(state->pw->pw_passwd, "*");
        fstrcpy(state->pw->pw_gecos, state->userinfo->full_name);
 
        fstrcpy(state->pw->pw_passwd, "*");
        fstrcpy(state->pw->pw_gecos, state->userinfo->full_name);
 
-       if (!fillup_pw_field(lp_template_homedir(), state->pw->pw_name,
+       if (!fillup_pw_field(lp_template_homedir(), username,
                             state->user_domain->name, state->pw->pw_uid,
                             state->pw->pw_gid, state->userinfo->homedir,
                             state->pw->pw_dir)) {
                             state->user_domain->name, state->pw->pw_uid,
                             state->pw->pw_gid, state->userinfo->homedir,
                             state->pw->pw_dir)) {
@@ -200,9 +200,9 @@ static void wb_getpwsid_sid2gid_done(struct tevent_req *subreq)
                return;
        }
 
                return;
        }
 
-       if (!fillup_pw_field(lp_template_homedir(), state->pw->pw_name,
+       if (!fillup_pw_field(lp_template_shell(), state->pw->pw_name,
                             state->user_domain->name, state->pw->pw_uid,
                             state->user_domain->name, state->pw->pw_uid,
-                            state->pw->pw_gid, state->userinfo->homedir,
+                            state->pw->pw_gid, state->userinfo->shell,
                             state->pw->pw_shell)) {
                DEBUG(5, ("Could not compose shell\n"));
                tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
                             state->pw->pw_shell)) {
                DEBUG(5, ("Could not compose shell\n"));
                tevent_req_nterror(req, NT_STATUS_NO_MEMORY);