struct timespec *access_time,
struct timespec *write_time,
struct timespec *change_time,
- off_t *size, uint32_t *pattr,
- SMB_INO_T *ino)
+ off_t *size,
+ uint32_t *pattr,
+ SMB_INO_T *ino,
+ mode_t *mode)
{
struct cli_qpathinfo2_state *state = tevent_req_data(
req, struct cli_qpathinfo2_state);
if (ino) {
*ino = state->ino;
}
+ if (mode != NULL) {
+ *mode = 0;
+ }
return NT_STATUS_OK;
}
-NTSTATUS cli_qpathinfo2(struct cli_state *cli, const char *fname,
+NTSTATUS cli_qpathinfo2(struct cli_state *cli,
+ const char *fname,
struct timespec *create_time,
struct timespec *access_time,
struct timespec *write_time,
struct timespec *change_time,
- off_t *size, uint32_t *pattr,
- SMB_INO_T *ino)
+ off_t *size,
+ uint32_t *pattr,
+ SMB_INO_T *ino,
+ mode_t *mode)
{
TALLOC_CTX *frame = talloc_stackframe();
struct tevent_context *ev = NULL;
if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
- status = cli_qpathinfo2_recv(req, create_time, access_time,
- write_time, change_time, size, pattr, ino);
+ status = cli_qpathinfo2_recv(req,
+ create_time,
+ access_time,
+ write_time,
+ change_time,
+ size,
+ pattr,
+ ino,
+ mode);
fail:
TALLOC_FREE(frame);
return status;
* an intermediate attr variable as below but can
* pass pattr directly.
*/
- return cli_qpathinfo2(cli, fname,
- create_time, access_time, write_time, change_time,
- size, pattr, ino);
+ return cli_qpathinfo2(cli,
+ fname,
+ create_time,
+ access_time,
+ write_time,
+ change_time,
+ size,
+ pattr,
+ ino,
+ NULL);
}
if (create_time || access_time || write_time || change_time || pattr) {
struct timespec *access_time,
struct timespec *write_time,
struct timespec *change_time,
- off_t *size, uint32_t *pattr,
- SMB_INO_T *ino);
-NTSTATUS cli_qpathinfo2(struct cli_state *cli, const char *fname,
+ off_t *size,
+ uint32_t *pattr,
+ SMB_INO_T *ino,
+ mode_t *mode);
+NTSTATUS cli_qpathinfo2(struct cli_state *cli,
+ const char *fname,
struct timespec *create_time,
struct timespec *access_time,
struct timespec *write_time,
struct timespec *change_time,
- off_t *size, uint32_t *pattr,
- SMB_INO_T *ino);
+ off_t *size,
+ uint32_t *pattr,
+ SMB_INO_T *ino,
+ mode_t *mode);
NTSTATUS cli_qpathinfo3(struct cli_state *cli, const char *fname,
struct timespec *create_time,
struct timespec *access_time,
&change_time_ts,
&size,
&attr,
- &ino);
+ &ino,
+ NULL);
if (NT_STATUS_IS_OK(status)) {
goto setup_stat;
}
cli_openx(cli, fname,
O_RDWR | O_CREAT | O_TRUNC, DENY_NONE, &fnum);
cli_close(cli, fnum);
- status = cli_qpathinfo2(cli, fname, &c_time_ts, &a_time_ts, &w_time_ts,
- &m_time_ts, &size, NULL, &ino);
+ status = cli_qpathinfo2(cli,
+ fname,
+ &c_time_ts,
+ &a_time_ts,
+ &w_time_ts,
+ &m_time_ts,
+ &size,
+ NULL,
+ &ino,
+ NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("ERROR: qpathinfo2 failed (%s)\n", nt_errstr(status));
correct = False;
correct = False;
}
sleep(3);
- status = cli_qpathinfo2(cli, "\\trans2\\", &c_time_ts, &a_time_ts,
- &w_time_ts, &m_time_ts, &size, NULL, NULL);
+ status = cli_qpathinfo2(cli,
+ "\\trans2\\",
+ &c_time_ts,
+ &a_time_ts,
+ &w_time_ts,
+ &m_time_ts,
+ &size,
+ NULL,
+ NULL,
+ NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("ERROR: qpathinfo2 failed (%s)\n", nt_errstr(status));
correct = False;
O_RDWR | O_CREAT | O_TRUNC, DENY_NONE, &fnum);
cli_writeall(cli, fnum, 0, (uint8_t *)&fnum, 0, sizeof(fnum), NULL);
cli_close(cli, fnum);
- status = cli_qpathinfo2(cli, "\\trans2\\", &c_time_ts, &a_time_ts,
- &w_time_ts, &m_time2_ts, &size, NULL, NULL);
+ status = cli_qpathinfo2(cli,
+ "\\trans2\\",
+ &c_time_ts,
+ &a_time_ts,
+ &w_time_ts,
+ &m_time2_ts,
+ &size,
+ NULL,
+ NULL,
+ NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("ERROR: qpathinfo2 failed (%s)\n", nt_errstr(status));
correct = False;
goto out;
}
- status = cli_qpathinfo2(cli, dname, &create_time, NULL, NULL, NULL,
- NULL, NULL, &ino);
+ status = cli_qpathinfo2(cli,
+ dname,
+ &create_time,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &ino,
+ NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("cli_qpathinfo2 returned %s\n",
nt_errstr(status));
goto out;
}
- status = cli_qpathinfo2(cli, dname, &create_time1, NULL, NULL, NULL,
- NULL, NULL, NULL);
+ status = cli_qpathinfo2(cli,
+ dname,
+ &create_time1,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("cli_qpathinfo2 (2) returned %s\n",
nt_errstr(status));