From: Volker Lendecke Date: Fri, 2 Aug 2024 11:06:58 +0000 (+0200) Subject: smbclient: Use cli_chmod instead of cli_posix_chmod X-Git-Tag: tdb-1.4.13~1419 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3fcb5f740479cdc9edd55a532fed376fda8fd41;p=thirdparty%2Fsamba.git smbclient: Use cli_chmod instead of cli_posix_chmod Skip the smb1-only SERVER_HAS_UNIX_CIFS(), chmod now also does SMB2 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/client/client.c b/source3/client/client.c index 2052eb5ed4c..49f9de84f26 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -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);