]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:client: Improve error message on cli_setatr() failure
authorAndreas Schneider <asn@samba.org>
Wed, 17 Jul 2024 08:38:47 +0000 (10:38 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 27 Sep 2024 07:54:34 +0000 (07:54 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Sep 27 07:54:34 UTC 2024 on atb-devel-224

source3/client/clitar.c

index 7e54b7bc2e8d5ac85cfd1afeb1048ab9cf5b483b..e034a4cb2619f3a91cd5fc29f1e9d42a35e54720 100644 (file)
@@ -1220,8 +1220,14 @@ close_out:
 
        status = cli_setatr(cli, full_path, mode, mtime);
        if (!NT_STATUS_IS_OK(status)) {
-               d_printf("Error setting attributes on remote file %s: %s\n",
-                               full_path, nt_errstr(status));
+               char *timestr = timestring(talloc_tos(), mtime);
+               d_printf("Error setting attributes (mode: %3o, mtime: %s) on "
+                        "remote file %s: %s\n",
+                        mode & 0777,
+                        timestr,
+                        full_path,
+                        nt_errstr(status));
+               TALLOC_FREE(timestr);
                err = 1;
        }