The Samba-Bugzilla – Attachment 2763 Details for
Bug 4678
valid (NIS) users are no longer accepted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Replacement patch
look (text/plain), 1.64 KB, created by
Jeremy Allison
on 2007-06-17 00:41:41 UTC
(
hide
)
Description:
Replacement patch
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2007-06-17 00:41:41 UTC
Size:
1.64 KB
patch
obsolete
>Index: auth/auth_unix.c >=================================================================== >--- auth/auth_unix.c (revision 23527) >+++ auth/auth_unix.c (working copy) >@@ -113,10 +113,45 @@ > /* if a real user check pam account restrictions */ > /* only really perfomed if "obey pam restriction" is true */ > nt_status = smb_pam_accountcheck(pass->pw_name); >- if ( !NT_STATUS_IS_OK(nt_status)) { >+ if (!NT_STATUS_IS_OK(nt_status)) { > DEBUG(1, ("PAM account restriction prevents user login\n")); > } else { >- make_server_info_pw(server_info, pass->pw_name, pass); >+ char *qualified_name = NULL; >+ DOM_SID u_sid; >+ enum lsa_SidType type; >+ >+ nt_status = make_server_info_pw(server_info, pass->pw_name, pass); >+ if (!NT_STATUS_IS_OK(nt_status)) { >+ return nt_status; >+ } >+ >+ /* >+ * The SID returned in server_info->sam_account is based >+ * on our SAM sid even though for a UNIX account this should >+ * not be the case as it doesn't really exist in the SAM db. >+ * Change this to a "Unix Users" SID. >+ */ >+ >+ qualified_name = talloc_asprintf(mem_ctx, "%s\\%s", >+ unix_users_domain_name(), >+ pass->pw_name ); >+ if (!qualified_name) { >+ return NT_STATUS_NO_MEMORY; >+ } >+ >+ if (!lookup_name(mem_ctx, qualified_name, LOOKUP_NAME_ALL, >+ NULL, NULL, >+ &u_sid, &type)) { >+ return NT_STATUS_NO_SUCH_USER; >+ } >+ >+ if (type != SID_NAME_USER) { >+ return NT_STATUS_NO_SUCH_USER; >+ } >+ >+ if (!pdb_set_user_sid((*server_info)->sam_account, &u_sid, PDB_CHANGED)) { >+ return NT_STATUS_NO_SUCH_USER; >+ } > } > } else { > /* we need to do somthing more useful here */
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 4678
:
2732
|
2760
|
2761
|
2762
|
2763
|
2765