From 242e7ae4d66dffe73e427871d9626c7f49231d2d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 24 Mar 1998 21:04:36 +0000 Subject: Updated smbpasswd to allow root to add machine accounts, and allow root to disable users and set them to "NO PASSWORD". Not quite finished with machine account stuff yet, but everything compiles. Jeremy. (This used to be commit c66966ff00b0968f765e62b679279b7417988df9) --- source3/passdb/smbpass.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/passdb') diff --git a/source3/passdb/smbpass.c b/source3/passdb/smbpass.c index a1913c4959..6d23fd62e6 100644 --- a/source3/passdb/smbpass.c +++ b/source3/passdb/smbpass.c @@ -187,6 +187,8 @@ struct smb_passwd *getsmbpwent(FILE *fp) return NULL; } + pw_buf.acct_ctrl = ACB_NORMAL; + /* * Scan the file, a line at a time and check if the name matches. */ @@ -406,10 +408,10 @@ struct smb_passwd *getsmbpwent(FILE *fp) * password file as 'normal accounts'. If this changes * we will have to fix this code. JRA. */ - if(pw_buf.smb_name[strlen(pw_buf.smb_name) - 1] == '$') - pw_buf.acct_ctrl = ACB_WSTRUST; - else - pw_buf.acct_ctrl = ACB_NORMAL; + if(pw_buf.smb_name[strlen(pw_buf.smb_name) - 1] == '$') { + pw_buf.acct_ctrl &= ~ACB_NORMAL; + pw_buf.acct_ctrl |= ACB_WSTRUST; + } } return &pw_buf; -- cgit