]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbclient: Use cli_chmod instead of cli_posix_chmod
authorVolker Lendecke <vl@samba.org>
Fri, 2 Aug 2024 11:06:58 +0000 (13:06 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 6 Aug 2024 16:29:33 +0000 (16:29 +0000)
Skip the smb1-only SERVER_HAS_UNIX_CIFS(), chmod now also does SMB2

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/client/client.c

index 2052eb5ed4c595bcc2656a03b44ebc6c3409e13a..49f9de84f264a9883d2f6f2a30b2de732dfabb6b 100644 (file)
@@ -3674,18 +3674,13 @@ static int cmd_chmod(void)
                return 1;
        }
 
-       if (!SERVER_HAS_UNIX_CIFS(targetcli)) {
-               d_printf("Server doesn't support UNIX CIFS calls.\n");
-               return 1;
-       }
-
        if (CLI_DIRSEP_CHAR != '/') {
                d_printf("Command \"posix\" must be issued before "
                         "the \"chmod\" command can be used.\n");
                return 1;
        }
 
-       status = cli_posix_chmod(targetcli, targetname, mode);
+       status = cli_chmod(targetcli, targetname, mode);
        if (!NT_STATUS_IS_OK(status)) {
                d_printf("%s chmod file %s 0%o\n",
                         nt_errstr(status), src, (unsigned int)mode);