From 731c7f2ecfe17651506ba05b88358360e4654a37 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 13 Jun 1999 04:14:24 +0000 Subject: Moved code that changes the pw_passwd entry (i.e shadow password and weird unixware stuff) into _Get_Pwnam() to fix a memory allocation bug. Note that the Get_Pwnam() function now returns a const struct passwd * as a hint to other developers not to change entries in the struct passwd. (This used to be commit 36d7cb4ccc42268e8e6a7b783c945d1853624958) --- source3/smbd/password.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/smbd/password.c') diff --git a/source3/smbd/password.c b/source3/smbd/password.c index daead8bb82..c05b82ef15 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -415,7 +415,7 @@ BOOL pass_check_smb(char *user, char *domain, uchar *chal, uchar *lm_pwd, uchar *nt_pwd, struct passwd *pwd, uchar user_sess_key[16]) { - struct passwd *pass; + const struct passwd *pass; struct smb_passwd *smb_pass; if (!lm_pwd || !nt_pwd) @@ -877,7 +877,7 @@ BOOL check_hosts_equiv(char *user) { char *fname = NULL; pstring rhostsfile; - struct passwd *pass = Get_Pwnam(user,True); + const struct passwd *pass = Get_Pwnam(user,True); if (!pass) return(False); -- cgit