]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
utils: Fix "net rap password" return code
authorVolker Lendecke <vl@samba.org>
Sun, 18 Aug 2024 10:40:29 +0000 (12:40 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 20 Aug 2024 09:34:40 +0000 (09:34 +0000)
cli_oem_change_password() returns a bool, net_rap_password must return
0 for success

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/utils/net_rap.c

index 9818623a925cf47fa41361bf18340dd54fea8f31..ed4b2c72277f4c3f288016ef0f5e6698d5690882 100644 (file)
@@ -1251,7 +1251,7 @@ int net_rap_password(struct net_context *c, int argc, const char **argv)
        /* BB Add check for password lengths? */
        ret = cli_oem_change_password(cli, argv[0], argv[2], argv[1]);
        cli_shutdown(cli);
-       return ret;
+       return ret ? 0 : -1;
 }
 
 int net_rap_admin_usage(struct net_context *c, int argc, const char **argv)