Author: vlendec Date: 2006-05-07 21:48:01 +0000 (Sun, 07 May 2006) New Revision: 15506
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15506 Log: Remove a reference to current_user_info. This is not needed as alloc_sub_specified takes the domain name as an argument, and before it reaches alloc_sub_basic all %D are consumed. Tested by writing garbage into current_user_info.domain instead of the real domain name. Only committing to trunk, I'd like someone else to take a look. Thanks, Volker Modified: trunk/source/nsswitch/winbindd_user.c Changeset: Modified: trunk/source/nsswitch/winbindd_user.c =================================================================== --- trunk/source/nsswitch/winbindd_user.c 2006-05-07 20:53:45 UTC (rev 15505) +++ trunk/source/nsswitch/winbindd_user.c 2006-05-07 21:48:01 UTC (rev 15506) @@ -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, @@ -109,11 +107,6 @@ 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 +286,6 @@ 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"));
