summaryrefslogtreecommitdiff
path: root/source3/lib
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/lib
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/lib')
-rw-r--r--source3/lib/util_pwdb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/lib/util_pwdb.c b/source3/lib/util_pwdb.c
index 495193e571..a678e4b063 100644
--- a/source3/lib/util_pwdb.c
+++ b/source3/lib/util_pwdb.c
@@ -225,6 +225,7 @@ char *pwdb_encode_acct_ctrl(uint16 acct_ctrl, size_t length)
if (acct_ctrl & ACB_AUTOLOCK ) acct_str[i++] = 'L';
if (acct_ctrl & ACB_PWNOEXP ) acct_str[i++] = 'X';
if (acct_ctrl & ACB_DOMTRUST ) acct_str[i++] = 'I';
+ if (acct_ctrl & ACB_PWLOCK ) acct_str[i++] = 'P';
for ( ; i < length - 2 ; i++ )
{
@@ -273,6 +274,7 @@ uint16 pwdb_decode_acct_ctrl(const char *p)
case 'L': { acct_ctrl |= ACB_AUTOLOCK ; break; /* 'L'ocked account. */ }
case 'X': { acct_ctrl |= ACB_PWNOEXP ; break; /* No 'X'piry on password */ }
case 'I': { acct_ctrl |= ACB_DOMTRUST ; break; /* 'I'nterdomain trust account. */ }
+ case 'P': { acct_ctrl |= ACB_PWLOCK ; break; /* 'P'assword cannot be changed remotely */ }
case ' ': { break; }
case ':':
case '\n':