From 57007050da6e45cc0f42b12c4b17812bfb423bcd Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 24 Apr 2001 16:44:28 +0000 Subject: don't allow both add and delete user to be set at the same time (This used to be commit 9db84de46a3823878c2a9356ac4ae4fd179d5847) --- source3/utils/smbpasswd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3/utils') 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(); } -- cgit