summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-01-22 12:20:46 +0100
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:30 +0200
commita0920a5ee5f7b390b0177a0d2899bf7da43c17e1 (patch)
treefb18c1d3838589fa93bdfe2cc56de038fc13dca4 /source3/utils
parentd923907ced67b349013041327aef2d915c476102 (diff)
downloadsamba-a0920a5ee5f7b390b0177a0d2899bf7da43c17e1.tar.gz
samba-a0920a5ee5f7b390b0177a0d2899bf7da43c17e1.tar.bz2
samba-a0920a5ee5f7b390b0177a0d2899bf7da43c17e1.zip
s3:net sam provision: compose sid before getting uid for Guest
Michael
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_sam.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c
index bd88a52602..44a0b79e18 100644
--- a/source3/utils/net_sam.c
+++ b/source3/utils/net_sam.c
@@ -1853,6 +1853,8 @@ doma_done:
d_printf(_("Adding the Guest user.\n"));
+ sid_compose(&sid, get_global_sam_sid(), DOMAIN_RID_GUEST);
+
pwd = getpwnam_alloc(tc, lp_guestaccount());
if (!pwd) {
@@ -1882,8 +1884,6 @@ doma_done:
}
}
- sid_compose(&sid, get_global_sam_sid(), DOMAIN_RID_GUEST);
-
dn = talloc_asprintf(tc, "uid=%s,%s", pwd->pw_name, lp_ldap_user_suffix ());
uidstr = talloc_asprintf(tc, "%u", (unsigned int)pwd->pw_uid);
gidstr = talloc_asprintf(tc, "%u", (unsigned int)pwd->pw_gid);