The Samba-Bugzilla – Attachment 1920 Details for
Bug 3800
pam_winbind does not work on a Samba PDC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
lookup password policies when on a PDC
diff (text/plain), 1.77 KB, created by
Guenther Deschner
on 2006-05-30 06:38:48 UTC
(
hide
)
Description:
lookup password policies when on a PDC
Filename:
MIME Type:
Creator:
Guenther Deschner
Created:
2006-05-30 06:38:48 UTC
Size:
1.77 KB
patch
obsolete
>Index: source/nsswitch/winbindd_passdb.c >=================================================================== >--- source/nsswitch/winbindd_passdb.c (revision 15953) >+++ source/nsswitch/winbindd_passdb.c (working copy) >@@ -455,8 +455,51 @@ > TALLOC_CTX *mem_ctx, > SAM_UNK_INFO_1 *policy) > { >- /* actually we have that */ >- return NT_STATUS_NOT_IMPLEMENTED; >+ uint32 min_pass_len,pass_hist,password_properties; >+ time_t u_expire, u_min_age; >+ NTTIME nt_expire, nt_min_age; >+ uint32 account_policy_temp; >+ >+ if ((policy = TALLOC_ZERO_P(mem_ctx, SAM_UNK_INFO_1)) == NULL) { >+ return NT_STATUS_NO_MEMORY; >+ } >+ >+ if (!pdb_get_account_policy(AP_MIN_PASSWORD_LEN, &account_policy_temp)) { >+ return NT_STATUS_ACCESS_DENIED; >+ } >+ min_pass_len = account_policy_temp; >+ >+ if (!pdb_get_account_policy(AP_PASSWORD_HISTORY, &account_policy_temp)) { >+ return NT_STATUS_ACCESS_DENIED; >+ } >+ pass_hist = account_policy_temp; >+ >+ if (!pdb_get_account_policy(AP_USER_MUST_LOGON_TO_CHG_PASS, &account_policy_temp)) { >+ return NT_STATUS_ACCESS_DENIED; >+ } >+ password_properties = account_policy_temp; >+ >+ if (account_policy_temp & DOMAIN_PASSWORD_NO_ANON_CHANGE) { >+ password_properties |= DOMAIN_PASSWORD_NO_ANON_CHANGE; >+ } >+ >+ if (!pdb_get_account_policy(AP_MAX_PASSWORD_AGE, &account_policy_temp)) { >+ return NT_STATUS_ACCESS_DENIED; >+ } >+ u_expire = account_policy_temp; >+ >+ if (!pdb_get_account_policy(AP_MIN_PASSWORD_AGE, &account_policy_temp)) { >+ return NT_STATUS_ACCESS_DENIED; >+ } >+ u_min_age = account_policy_temp; >+ >+ unix_to_nt_time_abs(&nt_expire, u_expire); >+ unix_to_nt_time_abs(&nt_min_age, u_min_age); >+ >+ init_unk_info1(policy, (uint16)min_pass_len, (uint16)pass_hist, >+ password_properties, nt_expire, nt_min_age); >+ >+ return NT_STATUS_OK; > } > > /* get a list of trusted domains */
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 3800
: 1920 |
1933
|
1934
|
1935