]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:rpcclient fix NULL - deref caused by misuse of chgpasswd3
authorAndrew Walker <awalker@ixsystems.com>
Wed, 28 Oct 2020 18:38:48 +0000 (14:38 -0400)
committerJeremy Allison <jra@samba.org>
Thu, 29 Oct 2020 03:31:56 +0000 (03:31 +0000)
Passing wrong number of arguments to chgpasswd3 will cause rpcclient to crash.

Signed-off-by: Andrew Walker <awalker@ixsystems.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct 29 03:31:56 UTC 2020 on sn-devel-184

source3/rpcclient/cmd_samr.c

index d30f4184cc62247c99a9a264fc5729409dd058cf..eb7f7fc8424b9644d342d10e7e99796bbb2e627e 100644 (file)
@@ -3033,7 +3033,7 @@ static NTSTATUS cmd_samr_chgpasswd3(struct rpc_pipe_client *cli,
        struct userPwdChangeFailureInformation *reject = NULL;
        struct dcerpc_binding_handle *b = cli->binding_handle;
 
-       if (argc < 3) {
+       if (argc < 4) {
                printf("Usage: %s username oldpass newpass\n", argv[0]);
                return NT_STATUS_INVALID_PARAMETER;
        }