diff options
author | Volker Lendecke <vlendec@samba.org> | 2003-02-07 08:02:18 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2003-02-07 08:02:18 +0000 |
commit | 6b703fc40acec1bf99c2f437327d279ddcbb3006 (patch) | |
tree | b2a0e231f6854435d0409b5cdcb51a0d630b0fb6 /source3 | |
parent | 5eac9f60cc99d912254ff79e42c06ac161923a2c (diff) | |
download | samba-6b703fc40acec1bf99c2f437327d279ddcbb3006.tar.gz samba-6b703fc40acec1bf99c2f437327d279ddcbb3006.tar.bz2 samba-6b703fc40acec1bf99c2f437327d279ddcbb3006.zip |
Revert Flag testing upon abartlet's request ;-)
Volker
(This used to be commit e8f751fe84cbd20934116d5213f9bb1850aa9dfa)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/pdbedit.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 4d2df74dd6..ee269114c9 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -260,17 +260,19 @@ static int set_user_info (struct pdb_context *in, const char *username, pdb_set_profile_path (sam_pwent, profile, PDB_CHANGED); if (account_control) { - uint16 types = ACB_NORMAL|ACB_MNS|ACB_DOMTRUST|ACB_WSTRUST|ACB_SVRTRUST; + uint16 not_settable = ~(ACB_DISABLED|ACB_HOMDIRREQ|ACB_PWNOTREQ| + ACB_PWNOEXP|ACB_AUTOLOCK); + uint16 newflag = pdb_decode_acct_ctrl(account_control); - if (newflag & types) { + if (newflag & not_settable) { fprintf(stderr, "Can only set [NDHLX] flags\n"); pdb_free_sam(&sam_pwent); return -1; } pdb_set_acct_ctrl(sam_pwent, - (pdb_get_acct_ctrl(sam_pwent) & types) | newflag, + (pdb_get_acct_ctrl(sam_pwent) & not_settable) | newflag, PDB_CHANGED); } |