mirror of
https://github.com/samba-team/samba.git
synced 2025-02-25 17:57:42 +03:00
libsmb: Add placeholder "mode" parameter to cli_qpathinfo2()
Unused so far: Patch stripped out to not clutter the real patches that follow. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
214eef0ff3
commit
30f4129e86
@ -893,8 +893,10 @@ NTSTATUS cli_qpathinfo2_recv(struct tevent_req *req,
|
||||
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);
|
||||
@ -925,16 +927,22 @@ NTSTATUS cli_qpathinfo2_recv(struct tevent_req *req,
|
||||
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;
|
||||
@ -959,8 +967,15 @@ NTSTATUS cli_qpathinfo2(struct cli_state *cli, const char *fname,
|
||||
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;
|
||||
@ -1693,9 +1708,16 @@ NTSTATUS cli_qpathinfo3(struct cli_state *cli, const char *fname,
|
||||
* 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) {
|
||||
|
@ -74,15 +74,20 @@ NTSTATUS cli_qpathinfo2_recv(struct tevent_req *req,
|
||||
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,
|
||||
|
@ -516,7 +516,8 @@ SMBC_getatr(SMBCCTX * context,
|
||||
&change_time_ts,
|
||||
&size,
|
||||
&attr,
|
||||
&ino);
|
||||
&ino,
|
||||
NULL);
|
||||
if (NT_STATUS_IS_OK(status)) {
|
||||
goto setup_stat;
|
||||
}
|
||||
|
@ -4534,8 +4534,16 @@ static bool run_trans2test(int dummy)
|
||||
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;
|
||||
@ -4571,8 +4579,16 @@ static bool run_trans2test(int dummy)
|
||||
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;
|
||||
@ -4582,8 +4598,16 @@ static bool run_trans2test(int dummy)
|
||||
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;
|
||||
@ -12471,8 +12495,16 @@ static bool run_dir_createtime(int dummy)
|
||||
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));
|
||||
@ -12503,8 +12535,16 @@ static bool run_dir_createtime(int dummy)
|
||||
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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user