From a3fcb5f740479cdc9edd55a532fed376fda8fd41 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 2 Aug 2024 13:06:58 +0200 Subject: [PATCH] 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 --- source3/client/client.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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); -- 2.47.3