diff options
author | Herb Lewis <herb@samba.org> | 2001-04-24 16:44:28 +0000 |
---|---|---|
committer | Herb Lewis <herb@samba.org> | 2001-04-24 16:44:28 +0000 |
commit | 57007050da6e45cc0f42b12c4b17812bfb423bcd (patch) | |
tree | c5cf32f70c798d118e326bb13841d15d719910ae /source3/utils | |
parent | a4ab60a616a10538c5ece7dea6ac91d08a935f14 (diff) | |
download | samba-57007050da6e45cc0f42b12c4b17812bfb423bcd.tar.gz samba-57007050da6e45cc0f42b12c4b17812bfb423bcd.tar.bz2 samba-57007050da6e45cc0f42b12c4b17812bfb423bcd.zip |
don't allow both add and delete user to be set at the same time
(This used to be commit 9db84de46a3823878c2a9356ac4ae4fd179d5847)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/smbpasswd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index 94bfe464e4..411d89f3f1 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/utils/smbpasswd.c @@ -319,10 +319,13 @@ static int process_root(int argc, char *argv[]) argv += optind; /* + * Ensure both add/delete user are not set * Ensure add/delete user and either remote machine or join domain are * not both set. */ - if((local_flags & (LOCAL_ADD_USER|LOCAL_DELETE_USER)) && ((remote_machine != NULL) || joining_domain)) { + if(((local__flags & (LOCAL_ADD_USER|LOCAL_DELETE_USER)) == (LOCAL_ADD_USER|LOCAL_DELETE_USER)) || + ((local_flags & (LOCAL_ADD_USER|LOCAL_DELETE_USER)) && + ((remote_machine != NULL) || joining_domain))) { usage(); } |