s3: libsmb: Change cli_qpathinfo1() and async version to return a 32-bit attribute.
authorJeremy Allison <jra@samba.org>
Wed, 3 Jun 2020 20:42:58 +0000 (13:42 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 4 Jun 2020 17:11:38 +0000 (17:11 +0000)
Only used in torture.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/libsmb/clirap.c
source3/libsmb/clirap.h
source3/torture/torture.c

index 35064feac4c8ca3ff298e8ade3ecb25043750601..85d1327650a141822063be9634475efb11445ae3 100644 (file)
@@ -608,7 +608,7 @@ NTSTATUS cli_qpathinfo1_recv(struct tevent_req *req,
                             time_t *access_time,
                             time_t *write_time,
                             off_t *size,
-                            uint16_t *pattr)
+                            uint32_t *pattr)
 {
        struct cli_qpathinfo1_state *state = tevent_req_data(
                req, struct cli_qpathinfo1_state);
@@ -650,7 +650,7 @@ NTSTATUS cli_qpathinfo1(struct cli_state *cli,
                        time_t *access_time,
                        time_t *write_time,
                        off_t *size,
-                       uint16_t *pattr)
+                       uint32_t *pattr)
 {
        TALLOC_CTX *frame = talloc_stackframe();
        struct tevent_context *ev;
index bbd585f23a0bcfc6260ddfa478379df2f31fb593..d93cc838889004c4423db966d0dbb336057552bf 100644 (file)
@@ -49,14 +49,14 @@ NTSTATUS cli_qpathinfo1_recv(struct tevent_req *req,
                             time_t *access_time,
                             time_t *write_time,
                             off_t *size,
-                            uint16_t *pattr);
+                            uint32_t *pattr);
 NTSTATUS cli_qpathinfo1(struct cli_state *cli,
                        const char *fname,
                        time_t *change_time,
                        time_t *access_time,
                        time_t *write_time,
                        off_t *size,
-                       uint16_t *pattr);
+                       uint32_t *pattr);
 NTSTATUS cli_setpathinfo_ext(struct cli_state *cli, const char *fname,
                             struct timespec create_time,
                             struct timespec access_time,
index cf1f2fd8e00981626d026960cc6d32156a8b027c..094fdcb2434650c2eb5756a9d02e6efc5569957c 100644 (file)
@@ -10851,7 +10851,7 @@ static bool run_mangle1(int dummy)
        NTSTATUS status;
        time_t change_time, access_time, write_time;
        off_t size;
-       uint16_t mode;
+       uint32_t attr;
 
        printf("starting mangle1 test\n");
        if (!torture_open_connection(&cli, 0)) {
@@ -10886,7 +10886,7 @@ static bool run_mangle1(int dummy)
        cli_close(cli, fnum);
 
        status = cli_qpathinfo1(cli, alt_name, &change_time, &access_time,
-                               &write_time, &size, &mode);
+                               &write_time, &size, &attr);
        if (!NT_STATUS_IS_OK(status)) {
                d_printf("cli_qpathinfo1(%s) failed: %s\n", alt_name,
                         nt_errstr(status));
@@ -12330,7 +12330,8 @@ static bool run_streamerror(int dummy)
        NTSTATUS status;
        time_t change_time, access_time, write_time;
        off_t size;
-       uint16_t mode, fnum;
+       uint16_t fnum;
+       uint32_t attr;
        bool ret = true;
 
        if (!torture_open_connection(&cli, 0)) {
@@ -12347,7 +12348,7 @@ static bool run_streamerror(int dummy)
        }
 
        status = cli_qpathinfo1(cli, streamname, &change_time, &access_time,
-                               &write_time, &size, &mode);
+                               &write_time, &size, &attr);
        if (!NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
                printf("pathinfo returned %s, expected "
                       "NT_STATUS_OBJECT_NAME_NOT_FOUND\n",