summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_netlog.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-05-07 18:19:05 +0000
committerLuke Leighton <lkcl@samba.org>1998-05-07 18:19:05 +0000
commitd8d9f7723337c267a8740750fe19a6387cfbb1f6 (patch)
tree224590bcd9c5d6d60c5a519741c0662834ba4a1d /source3/rpc_server/srv_netlog.c
parent51f88b4f7c0b87dd4a8932168c512b29a4915045 (diff)
downloadsamba-d8d9f7723337c267a8740750fe19a6387cfbb1f6.tar.gz
samba-d8d9f7723337c267a8740750fe19a6387cfbb1f6.tar.bz2
samba-d8d9f7723337c267a8740750fe19a6387cfbb1f6.zip
created "passdb.c" which is an interface point to (at present) either
smbpasswd or ldap passwd, at compile-time (-DUSE_LDAP). _none_ of the functions in ldap.c or smbpass.c should be called directly: only those in passdb.c should be used. -DUSE_LDAP is unlikely to compile at the moment. (This used to be commit 57b01ad4ffb14ebd600d4e66602b54ed987f6106)
Diffstat (limited to 'source3/rpc_server/srv_netlog.c')
-rw-r--r--source3/rpc_server/srv_netlog.c60
1 files changed, 31 insertions, 29 deletions
diff --git a/source3/rpc_server/srv_netlog.c b/source3/rpc_server/srv_netlog.c
index 6229d5ea0b..76dd5dd74d 100644
--- a/source3/rpc_server/srv_netlog.c
+++ b/source3/rpc_server/srv_netlog.c
@@ -237,7 +237,7 @@ static BOOL get_md4pw(char *md4pw, char *mach_name, char *mach_acct)
}
become_root(True);
- smb_pass = getsmbpwnam(mach_acct);
+ smb_pass = getsampwnam(mach_acct);
unbecome_root(True);
if (smb_pass != NULL)
@@ -377,48 +377,50 @@ static void api_net_srv_pwset( int uid,
/* checks and updates credentials. creates reply credentials */
if (deal_with_creds(vuser->dc.sess_key, &(vuser->dc.clnt_cred),
- &(q_a.clnt_id.cred), &srv_cred))
+ &(q_a.clnt_id.cred), &srv_cred))
{
memcpy(&(vuser->dc.srv_cred), &(vuser->dc.clnt_cred), sizeof(vuser->dc.clnt_cred));
DEBUG(5,("api_net_srv_pwset: %d\n", __LINE__));
- pstrcpy(mach_acct, unistrn2(q_a.clnt_id.login.uni_acct_name.buffer,
- q_a.clnt_id.login.uni_acct_name.uni_str_len));
+ pstrcpy(mach_acct, unistrn2(q_a.clnt_id.login.uni_acct_name.buffer,
+ q_a.clnt_id.login.uni_acct_name.uni_str_len));
- DEBUG(3,("Server Password Set Wksta:[%s]\n", mach_acct));
+ DEBUG(3,("Server Password Set Wksta:[%s]\n", mach_acct));
- become_root(True);
- smb_pass = getsmbpwnam(mach_acct);
- unbecome_root(True);
+ become_root(True);
+ smb_pass = getsampwnam(mach_acct);
+ unbecome_root(True);
if (smb_pass != NULL)
{
- unsigned char pwd[16];
- int i;
+ unsigned char pwd[16];
+ int i;
- DEBUG(100,("Server password set : new given value was :\n"));
- for(i = 0; i < 16; i++)
- DEBUG(100,("%02X ", q_a.pwd[i]));
- DEBUG(100,("\n"));
+ DEBUG(100,("Server password set : new given value was :\n"));
+ for(i = 0; i < 16; i++)
+ {
+ DEBUG(100,("%02X ", q_a.pwd[i]));
+ }
+ DEBUG(100,("\n"));
- cred_hash3( pwd, q_a.pwd, vuser->dc.sess_key, 0);
+ cred_hash3( pwd, q_a.pwd, vuser->dc.sess_key, 0);
- /* 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;
+ /* 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,False);
- unbecome_root(True);
+ become_root(True);
+ ret = mod_sampwd_entry(smb_pass,False);
+ unbecome_root(True);
- if (ret)
- {
- /* hooray! */
- status = 0x0;
- }
- }
+ if (ret)
+ {
+ /* hooray! */
+ status = 0x0;
+ }
+ }
DEBUG(5,("api_net_srv_pwset: %d\n", __LINE__));
@@ -629,7 +631,7 @@ static void api_net_sam_logon( int uid,
DEBUG(3,("User:[%s]\n", samlogon_user));
become_root(True);
- smb_pass = getsmbpwnam(samlogon_user);
+ smb_pass = getsampwnam(samlogon_user);
unbecome_root(True);
if (smb_pass == NULL)