#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,
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;
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;
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"));
(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",