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 | 9db84de46a3823878c2a9356ac4ae4fd179d5847 (patch) | |
tree | 808f2b7cf13bac7242bc379922708472334fcdd2 /source | |
parent | 93034985e02bdb9a00a9c509b851442561f4ad68 (diff) | |
download | samba-9db84de46a3823878c2a9356ac4ae4fd179d5847.tar.gz samba-9db84de46a3823878c2a9356ac4ae4fd179d5847.tar.xz samba-9db84de46a3823878c2a9356ac4ae4fd179d5847.zip |
don't allow both add and delete user to be set at the same time
Diffstat (limited to 'source')
-rw-r--r-- | source/utils/smbpasswd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index 94bfe464e4e..411d89f3f14 100644 --- a/source/utils/smbpasswd.c +++ b/source/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(); } |