1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

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 <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2024-08-02 13:06:58 +02:00 committed by Jeremy Allison
parent 70da8f7d62
commit a3fcb5f740

View 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);