diff options
author | Jeremy Allison <jra@samba.org> | 2006-07-11 18:01:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:19:14 -0500 |
commit | fbdcf2663b56007a438ac4f0d8d82436b1bfe688 (patch) | |
tree | 4e42c1f061391cea3d640152fd240682cbf4fd9a /source3/nsswitch/winbindd_user.c | |
parent | 5bf62a0c3cc95abe918f3e772bb10e0a90fdce22 (diff) | |
download | samba-fbdcf2663b56007a438ac4f0d8d82436b1bfe688.tar.gz samba-fbdcf2663b56007a438ac4f0d8d82436b1bfe688.tar.bz2 samba-fbdcf2663b56007a438ac4f0d8d82436b1bfe688.zip |
r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....
Jeremy.
(This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
Diffstat (limited to 'source3/nsswitch/winbindd_user.c')
-rw-r--r-- | source3/nsswitch/winbindd_user.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c index a73b5c394c..8a0ebbafa5 100644 --- a/source3/nsswitch/winbindd_user.c +++ b/source3/nsswitch/winbindd_user.c @@ -28,8 +28,6 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND -extern userdom_struct current_user_info; - static BOOL fillup_pw_field(const char *lp_template, const char *username, const char *domname, @@ -53,15 +51,16 @@ static BOOL fillup_pw_field(const char *lp_template, shell. */ /* The substitution of %U and %D in the 'template homedir' is done - by alloc_sub_specified() below. */ + by talloc_sub_specified() below. */ - templ = alloc_sub_specified(lp_template, username, domname, uid, gid); + templ = talloc_sub_specified(NULL, lp_template, username, domname, + uid, gid); if (!templ) return False; safe_strcpy(out, templ, sizeof(fstring) - 1); - SAFE_FREE(templ); + TALLOC_FREE(templ); return True; @@ -109,11 +108,6 @@ static BOOL winbindd_fill_pwent(char *dom_name, char *user_name, defaults are /tmp for the home directory and /bin/false for shell. */ - /* The substitution of %U and %D in the 'template homedir' is done - by alloc_sub_specified() below. */ - - fstrcpy(current_user_info.domain, dom_name); - if (!fillup_pw_field(lp_template_homedir(), user_name, dom_name, pw->pw_uid, pw->pw_gid, homedir, pw->pw_dir)) return False; @@ -293,8 +287,6 @@ static void getpwsid_sid2gid_recv(void *private_data, BOOL success, gid_t gid) safe_strcpy(pw->pw_name, output_username, sizeof(pw->pw_name) - 1); safe_strcpy(pw->pw_gecos, s->fullname, sizeof(pw->pw_gecos) - 1); - fstrcpy(current_user_info.domain, s->domain->name); - if (!fillup_pw_field(lp_template_homedir(), s->username, s->domain->name, pw->pw_uid, pw->pw_gid, s->homedir, pw->pw_dir)) { DEBUG(5, ("Could not compose homedir\n")); @@ -407,7 +399,7 @@ void winbindd_getpwuid(struct winbindd_cli_state *state) (unsigned long)state->request.data.uid)); status = idmap_uid_to_sid(&user_sid, state->request.data.uid, - ID_QUERY_ONLY | ID_CACHE_ONLY); + IDMAP_FLAG_QUERY_ONLY | IDMAP_FLAG_CACHE_ONLY); if (!NT_STATUS_IS_OK(status)) { DEBUG(5, ("Could not find SID for uid %lu\n", |