]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: libsmb: Change cli_setatr() and async version to use 32-bit attributes.
authorJeremy Allison <jra@samba.org>
Wed, 3 Jun 2020 21:12:38 +0000 (14:12 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 4 Jun 2020 17:11:38 +0000 (17:11 +0000)
Fix the callers. Only sets 16 bits on the wire for this level.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/libsmb/clifile.c
source3/libsmb/libsmb_dir.c
source3/libsmb/libsmb_file.c
source3/libsmb/proto.h

index 308aaedc6e6203dd3f06bcad85dc886155572042..5ae7779192c2aa81baf89c54ebf752102089731b 100644 (file)
@@ -4497,7 +4497,7 @@ struct tevent_req *cli_setatr_send(TALLOC_CTX *mem_ctx,
                                struct tevent_context *ev,
                                struct cli_state *cli,
                                const char *fname,
-                               uint16_t attr,
+                               uint32_t attr,
                                time_t mtime)
 {
        struct tevent_req *req = NULL, *subreq = NULL;
@@ -4572,7 +4572,7 @@ NTSTATUS cli_setatr_recv(struct tevent_req *req)
 
 NTSTATUS cli_setatr(struct cli_state *cli,
                const char *fname,
-               uint16_t attr,
+               uint32_t attr,
                time_t mtime)
 {
        TALLOC_CTX *frame = NULL;
index cb0378290f8b64c71297570242a51496dc070d8d..12abb734c2df797bd9ed7c33f71d6092dcdb2d16 100644 (file)
@@ -1957,7 +1957,7 @@ SMBC_chmod_ctx(SMBCCTX *context,
        char *targetpath = NULL;
        struct cli_state *targetcli = NULL;
        char *path = NULL;
-       uint16_t attr;
+       uint32_t attr;
        uint16_t port = 0;
        TALLOC_CTX *frame = talloc_stackframe();
         NTSTATUS status;
index d1fa3cb10acf658acba8c3fb204f437c50bb0ffc..5f50439c41be76746126ad4c18271bfc0850730e 100644 (file)
@@ -644,7 +644,7 @@ SMBC_setatr(SMBCCTX * context, SMBCSRV *srv, char *path,
                  * seems to work on win98.
                  */
                 if (ret && attr != (uint16_t) -1) {
-                        ret = NT_STATUS_IS_OK(cli_setatr(srv->cli, path, attr, 0));
+                        ret = NT_STATUS_IS_OK(cli_setatr(srv->cli, path, (uint32_t)attr, 0));
                 }
 
                 if (! ret) {
index bbc3d6efa03c02cd8d342cc6db9bc34d04b14678..d0d15d31b9b689a08a2e864eb6dcd8381a52c3e9 100644 (file)
@@ -560,12 +560,12 @@ struct tevent_req *cli_setatr_send(TALLOC_CTX *mem_ctx,
                                struct tevent_context *ev,
                                struct cli_state *cli,
                                const char *fname,
-                               uint16_t attr,
+                               uint32_t attr,
                                time_t mtime);
 NTSTATUS cli_setatr_recv(struct tevent_req *req);
 NTSTATUS cli_setatr(struct cli_state *cli,
                 const char *fname,
-                uint16_t attr,
+                uint32_t attr,
                 time_t mtime);
 struct tevent_req *cli_chkpath_send(TALLOC_CTX *mem_ctx,
                                  struct tevent_context *ev,