diff options
author | Andreas Schneider <asn@samba.org> | 2010-07-29 13:16:09 +0200 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2010-08-16 12:48:27 +0200 |
commit | 66b6a8cf62c2fe9b1eafeb094916e6046f686359 (patch) | |
tree | f7ea7068a1a6d63ccefc804128d7cd640bf03ec4 /source3/auth/auth_unix.c | |
parent | f03ac22770ef96d4b0fec81d94efefcddd8b310b (diff) | |
download | samba-66b6a8cf62c2fe9b1eafeb094916e6046f686359.tar.gz samba-66b6a8cf62c2fe9b1eafeb094916e6046f686359.tar.bz2 samba-66b6a8cf62c2fe9b1eafeb094916e6046f686359.zip |
s3-auth: Remove obsolete 'update encrypted' option.
Diffstat (limited to 'source3/auth/auth_unix.c')
-rw-r--r-- | source3/auth/auth_unix.c | 58 |
1 files changed, 1 insertions, 57 deletions
diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c index a9a4c53704..8668a2f579 100644 --- a/source3/auth/auth_unix.c +++ b/source3/auth/auth_unix.c @@ -23,60 +23,6 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_AUTH -/** - * update the encrypted smbpasswd file from the plaintext username and password - * - * this ugly hack needs to die, but not quite yet, I think people still use it... - **/ -static bool update_smbpassword_file(const char *user, const char *password) -{ - struct samu *sampass; - bool ret; - - if ( !(sampass = samu_new( NULL )) ) { - return False; - } - - become_root(); - ret = pdb_getsampwnam(sampass, user); - unbecome_root(); - - if(ret == False) { - DEBUG(0,("pdb_getsampwnam returned NULL\n")); - TALLOC_FREE(sampass); - return False; - } - - /* - * Remove the account disabled flag - we are updating the - * users password from a login. - */ - if (!pdb_set_acct_ctrl(sampass, pdb_get_acct_ctrl(sampass) & ~ACB_DISABLED, PDB_CHANGED)) { - TALLOC_FREE(sampass); - return False; - } - - if (!pdb_set_plaintext_passwd (sampass, password)) { - TALLOC_FREE(sampass); - return False; - } - - /* Now write it into the file. */ - become_root(); - - ret = NT_STATUS_IS_OK(pdb_update_sam_account (sampass)); - - unbecome_root(); - - if (ret) { - DEBUG(3,("pdb_update_sam_account returned %d\n",ret)); - } - - TALLOC_FREE(sampass); - return ret; -} - - /** Check a plaintext username/password * * Cannot deal with an encrupted password in any manner whatsoever, @@ -102,9 +48,7 @@ static NTSTATUS check_unix_security(const struct auth_context *auth_context, nt_status = pass_check(pass, pass ? pass->pw_name : user_info->mapped.account_name, user_info->password.plaintext, - lp_update_encrypted() ? - update_smbpassword_file : NULL, - True); + true); unbecome_root(); |