summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-10-15 23:51:07 +0000
committerLuke Leighton <lkcl@samba.org>1998-10-15 23:51:07 +0000
commitc404bb775414139a4b07a73f79cf069a083acb26 (patch)
tree259eeef5e467083c0b7b29bec846bab90c522bf7 /source3/smbd
parent0d5ff90bffe1a5d2bf03412ef0bd12996cbc2f09 (diff)
downloadsamba-c404bb775414139a4b07a73f79cf069a083acb26.tar.gz
samba-c404bb775414139a4b07a73f79cf069a083acb26.tar.bz2
samba-c404bb775414139a4b07a73f79cf069a083acb26.zip
rpcclient interactive login (with trust account changing if you are root)
cli_session_setup handles null sessions correctly (This used to be commit 60c0f22a4e84703467006dfe1971384a6294a9aa)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/password.c25
-rw-r--r--source3/smbd/process.c2
2 files changed, 3 insertions, 24 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 761313b688..45d4d72863 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -24,8 +24,6 @@
extern int DEBUGLEVEL;
extern int Protocol;
-BOOL global_machine_pasword_needs_changing;
-
/* users from session setup */
static pstring session_users="";
@@ -1136,7 +1134,6 @@ BOOL domain_client_validate( char *user, char *domain,
unsigned char local_lm_response[24];
unsigned char local_nt_reponse[24];
unsigned char trust_passwd[16];
- time_t lct;
fstring remote_machine;
char *p;
struct in_addr dest_ip;
@@ -1193,29 +1190,11 @@ BOOL domain_client_validate( char *user, char *domain,
/*
* Get the machine account password.
*/
- if(!trust_password_lock( global_myworkgroup, global_myname, False)) {
- DEBUG(0,("domain_client_validate: unable to open the machine account password file for \
-machine %s in domain %s.\n", global_myname, global_myworkgroup ));
- return False;
- }
-
- if(get_trust_account_password( trust_passwd, &lct) == False) {
- DEBUG(0,("domain_client_validate: unable to read the machine account password for \
-machine %s in domain %s.\n", global_myname, global_myworkgroup ));
- trust_password_unlock();
+ if (!trust_get_passwd( trust_passwd, global_myworkgroup, global_myname))
+ {
return False;
}
- trust_password_unlock();
-
- /*
- * Here we check the last change time to see if the machine
- * password needs changing. 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
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 6e1bdc941a..9c00d6fc00 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -49,7 +49,7 @@ extern char *InBuffer;
extern char *OutBuffer;
extern int smb_read_error;
extern BOOL reload_after_sighup;
-extern BOOL global_machine_pasword_needs_changing;
+extern BOOL global_machine_password_needs_changing;
extern fstring global_myworkgroup;
extern pstring global_myname;
extern int max_send;