diff options
author | Jeremy Allison <jra@samba.org> | 1998-03-31 20:55:14 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-03-31 20:55:14 +0000 |
commit | 10fe54befa10b283269001fdf779b9938c9a3a2c (patch) | |
tree | e607595022ff7dd77ab3609097a09dff045aaa86 /source3/rpc_server | |
parent | 5efec4e1b3300bd8f1792d1aaf1e758032a8d4fc (diff) | |
download | samba-10fe54befa10b283269001fdf779b9938c9a3a2c.tar.gz samba-10fe54befa10b283269001fdf779b9938c9a3a2c.tar.bz2 samba-10fe54befa10b283269001fdf779b9938c9a3a2c.zip |
includes.h: Added semaphore fix for HPUX10.x
server.c trans2.c: Added oplock deadlock bug fix.
lib/rpc/server/srv_netlog.c: Made code that changes machine account password the default.
Jeremy.
(This used to be commit 3b56fbc11e9d1cb7d4930d9782238c2610cac30d)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_netlog.c | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/source3/rpc_server/srv_netlog.c b/source3/rpc_server/srv_netlog.c index d7a1b9e421..cb3616e4af 100644 --- a/source3/rpc_server/srv_netlog.c +++ b/source3/rpc_server/srv_netlog.c @@ -367,11 +367,9 @@ static void api_net_srv_pwset( int uid, NET_Q_SRV_PWSET q_a; uint32 status = NT_STATUS_WRONG_PASSWORD|0xC0000000; DOM_CRED srv_cred; -#ifdef ALLOW_SRV_PWSET - pstring mach_acct; + pstring mach_acct; struct smb_passwd *smb_pass; BOOL ret; -#endif user_struct *vuser; if ((vuser = get_valid_user_struct(uid)) == NULL) return; @@ -387,8 +385,6 @@ static void api_net_srv_pwset( int uid, DEBUG(5,("api_net_srv_pwset: %d\n", __LINE__)); -#ifdef ALLOW_SRV_PWSET - pstrcpy(mach_acct, unistrn2(q_a.clnt_id.login.uni_acct_name.buffer, q_a.clnt_id.login.uni_acct_name.uni_str_len)); @@ -401,33 +397,26 @@ static void api_net_srv_pwset( int uid, if (smb_pass != NULL) { unsigned char pwd[16]; - uint8 mode = 2; memcpy(pwd, q_a.pwd, 16); - if (obfuscate_pwd(pwd, vuser->dc.sess_key, mode)) + /* lies! nt and lm passwords are _not_ the same: don't care */ + smb_pass->smb_passwd = pwd; + smb_pass->smb_nt_passwd = pwd; + smb_pass->acct_ctrl = ACB_WSTRUST; + + become_root(True); + ret = mod_smbpwd_entry(smb_pass); + unbecome_root(True); + + if (ret) { - /* lies! nt and lm passwords are _not_ the same: don't care */ - smb_pass->smb_passwd = pwd; - smb_pass->smb_nt_passwd = pwd; - smb_pass->acct_ctrl = ACB_WSTRUST; - - become_root(True); - ret = mod_smbpwd_entry(smb_pass); - unbecome_root(True); - - if (ret) - { - /* hooray! */ - status = 0x0; - } + /* hooray! */ + status = 0x0; } } DEBUG(5,("api_net_srv_pwset: %d\n", __LINE__)); -#else - DEBUG(5,("api_net_srv_pwset: server password set being denied\n")); -#endif } else |