The Samba-Bugzilla – Attachment 6301 Details for
Bug 8022
net sam provision uses uninitialized uid for administrator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 3.5
0001-s3-net-Find-uid-before-using-it.patch (text/plain), 1.44 KB, created by
Guenther Deschner
on 2011-03-17 13:00:32 UTC
(
hide
)
Description:
patch for 3.5
Filename:
MIME Type:
Creator:
Guenther Deschner
Created:
2011-03-17 13:00:32 UTC
Size:
1.44 KB
patch
obsolete
>From 7634107632a32c5088696b89d4b57a2e3de9b499 Mon Sep 17 00:00:00 2001 >From: Sumit Bose <sbose@redhat.com> >Date: Thu, 17 Mar 2011 12:35:35 +0100 >Subject: [PATCH] s3:net Find uid before using it > >--- > source3/utils/net_sam.c | 14 +++++++------- > 1 files changed, 7 insertions(+), 7 deletions(-) > >diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c >index 8a9ca8a..af8aaa4 100644 >--- a/source3/utils/net_sam.c >+++ b/source3/utils/net_sam.c >@@ -1781,6 +1781,13 @@ doma_done: > "Admins group not available!\n")); > goto done; > } >+ if (!winbind_allocate_uid(&uid)) { >+ d_fprintf(stderr, >+ _("Unable to allocate a new uid to create " >+ "the Administrator user!\n")); >+ goto done; >+ } >+ > name = talloc_strdup(tc, "Administrator"); > dn = talloc_asprintf(tc, "uid=Administrator,%s", lp_ldap_user_suffix()); > uidstr = talloc_asprintf(tc, "%u", (unsigned int)uid); >@@ -1801,13 +1808,6 @@ doma_done: > > sid_compose(&sid, get_global_sam_sid(), DOMAIN_RID_ADMINISTRATOR); > >- if (!winbind_allocate_uid(&uid)) { >- d_fprintf(stderr, >- _("Unable to allocate a new uid to create " >- "the Administrator user!\n")); >- goto done; >- } >- > smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_ACCOUNT); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_POSIXACCOUNT); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_SAMBASAMACCOUNT); >-- >1.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
idra
:
review+
Actions:
View
Attachments on
bug 8022
: 6301