summaryrefslogtreecommitdiff
path: root/source3/smbd/password.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-05-27 00:30:52 +0000
committerJeremy Allison <jra@samba.org>1998-05-27 00:30:52 +0000
commit9bd7e1e8870da87ea6f3c9e78933beeb08b65a0c (patch)
tree04a7bff5aa2db16fcaab1396e81e7caaeb6c900d /source3/smbd/password.c
parent1d16f750515bcf49e0dc87394479dc56e7192538 (diff)
downloadsamba-9bd7e1e8870da87ea6f3c9e78933beeb08b65a0c.tar.gz
samba-9bd7e1e8870da87ea6f3c9e78933beeb08b65a0c.tar.bz2
samba-9bd7e1e8870da87ea6f3c9e78933beeb08b65a0c.zip
loadparm.c: Added machine password timeout parameter - set to 7 days be default.
password.c: Added code to tell server.c when machine password needs changing. server.c: Change machine password in idle cycles if it needs it. smbpassfile.c: Fixed up length calculations for machine password file. smbpasswd.c: Moved domain joining code/machine password changing code. lib/rpc/client/cli_netlogon.c: And this is where it now lives. Jeremy. (This used to be commit b8fedca6191de96159df0d1d17082d82e8e44773)
Diffstat (limited to 'source3/smbd/password.c')
-rw-r--r--source3/smbd/password.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 0f2efcc1da..48fd7cbe24 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -28,6 +28,8 @@
extern int DEBUGLEVEL;
extern int Protocol;
+BOOL global_machine_pasword_needs_changing;
+
/* users from session setup */
static pstring session_users="";
@@ -1972,8 +1974,6 @@ BOOL domain_client_validate( char *user, char *domain,
}
}
- become_root(False);
-
/*
* Get the machine account password.
*/
@@ -1992,13 +1992,14 @@ machine %s in domain %s.\n", global_myname, global_myworkgroup ));
trust_password_unlock();
- unbecome_root(False);
-
/*
* Here we should check the last change time to see if the machine
* password needs changing..... TODO... JRA.
*/
+ if(time(NULL) > lct + lp_machine_password_timeout())
+ global_machine_pasword_needs_changing = True;
+
/*
* At this point, smb_apasswd points to the lanman response to
* the challenge in local_challenge, and smb_ntpasswd points to