The Samba-Bugzilla – Attachment 2320 Details for
Bug 4438
net sam provision fails when guest user's posix account has no shell set in /etc/passwd
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix for 4438/4440
samba3_net_sam_provision_fixes.patch (text/plain), 1.58 KB, created by
Simo Sorce
on 2007-03-09 09:28:44 UTC
(
hide
)
Description:
fix for 4438/4440
Filename:
MIME Type:
Creator:
Simo Sorce
Created:
2007-03-09 09:28:44 UTC
Size:
1.58 KB
patch
obsolete
>Index: utils/net_sam.c >=================================================================== >--- utils/net_sam.c (revision 21774) >+++ utils/net_sam.c (working copy) >@@ -1043,6 +1043,7 @@ > d_fprintf(stderr, "Failed to add Domain Users group to ldap directory\n"); > } > } else { >+ domusers_gid = gmap->gid; > d_printf("found!\n"); > } > >@@ -1096,6 +1097,7 @@ > d_fprintf(stderr, "Failed to add Domain Admins group to ldap directory\n"); > } > } else { >+ domadmins_gid = gmap->gid; > d_printf("found!\n"); > } > >@@ -1238,8 +1240,12 @@ > smbldap_set_mod(&mods, LDAP_MOD_ADD, "displayName", pwd->pw_name); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "uidNumber", uidstr); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "gidNumber", gidstr); >- smbldap_set_mod(&mods, LDAP_MOD_ADD, "homeDirectory", pwd->pw_dir); >- smbldap_set_mod(&mods, LDAP_MOD_ADD, "loginShell", pwd->pw_shell); >+ if ((pwd->pw_dir != NULL) && (pwd->pw_dir[0] != '\0')) { >+ smbldap_set_mod(&mods, LDAP_MOD_ADD, "homeDirectory", pwd->pw_dir); >+ } >+ if ((pwd->pw_shell != NULL) && (pwd->pw_shell[0] != '\0')) { >+ smbldap_set_mod(&mods, LDAP_MOD_ADD, "loginShell", pwd->pw_shell); >+ } > smbldap_set_mod(&mods, LDAP_MOD_ADD, "sambaSID", sid_string_static(&sid)); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "sambaAcctFlags", > pdb_encode_acct_ctrl(ACB_NORMAL|ACB_DISABLED, >@@ -1261,7 +1267,7 @@ > pwd = getpwnam_alloc(NULL, lp_guestaccount()); > if (!pwd) { > d_fprintf(stderr, "Failed to find just created Guest account!\n" >- " Is nssswitch properly configured?!\n"); >+ " Is nss properly configured?!\n"); > goto failed; > } >
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
Actions:
View
Attachments on
bug 4438
:
2320
|
2321