summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-03-19 05:00:39 +0000
committerLuke Leighton <lkcl@samba.org>1999-03-19 05:00:39 +0000
commitfda194255c156ce373d5f195e960bf8712fe4d67 (patch)
tree923128bdd81be1be598fb4224a2fb74820ffa8f1 /source3/smbd
parent6cc71c5354bc352daab0b76f9298c13ad0715c71 (diff)
downloadsamba-fda194255c156ce373d5f195e960bf8712fe4d67.tar.gz
samba-fda194255c156ce373d5f195e960bf8712fe4d67.tar.bz2
samba-fda194255c156ce373d5f195e960bf8712fe4d67.zip
Beau Kuiper: provided patch so that passwords could only be changed by
root if the ACB_PWLOCK bit is set (on a per-user basis). he also added an extra smbpasswd option so that this bit can be modified from command-line. (This used to be commit 534fe319d9de8da2ed7e911dbba3c7df08193efa)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/chgpasswd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c
index 167fce6e8c..852d6aa618 100644
--- a/source3/smbd/chgpasswd.c
+++ b/source3/smbd/chgpasswd.c
@@ -571,6 +571,14 @@ BOOL pass_oem_change(char *user,
&sampw,
new_passwd, sizeof(new_passwd));
+ /* now we check to see if we are actually allowed to change the
+ password. */
+
+ if (ret && (sampw->acct_ctrl & ACB_PWLOCK))
+ {
+ ret = False;
+ }
+
/*
* At this point we have the new case-sensitive plaintext
* password in the fstring new_passwd. If we wanted to synchronise