summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/client/client.c8
-rw-r--r--source3/include/proto.h14
-rw-r--r--source3/libsmb/clirap.c14
-rw-r--r--source3/libsmb/libsmb_file.c4
-rw-r--r--source3/libsmb/libsmb_stat.c12
-rw-r--r--source3/torture/nbio.c3
-rw-r--r--source3/torture/torture.c12
-rw-r--r--source3/torture/utable.c6
-rw-r--r--source3/utils/smbcacls.c2
9 files changed, 42 insertions, 33 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index e979ddfacf..01d5d90e6b 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1084,8 +1084,8 @@ static int do_get(const char *rname, const char *lname_in, bool reget)
}
- if (!cli_qfileinfo(targetcli, fnum,
- &attr, &size, NULL, NULL, NULL, NULL, NULL) &&
+ if (!cli_qfileinfo_basic(targetcli, fnum,
+ &attr, &size, NULL, NULL, NULL, NULL, NULL) &&
!NT_STATUS_IS_OK(cli_getattrE(targetcli, fnum,
&attr, &size, NULL, NULL, NULL))) {
d_printf("getattrib: %s\n",cli_errstr(targetcli));
@@ -1699,7 +1699,9 @@ static int do_put(const char *rname, const char *lname, bool reput)
if (reput) {
status = cli_open(targetcli, targetname, O_RDWR|O_CREAT, DENY_NONE, &fnum);
if (NT_STATUS_IS_OK(status)) {
- if (!cli_qfileinfo(targetcli, fnum, NULL, &start, NULL, NULL, NULL, NULL, NULL) &&
+ if (!cli_qfileinfo_basic(
+ targetcli, fnum, NULL, &start, NULL, NULL,
+ NULL, NULL, NULL) &&
!NT_STATUS_IS_OK(cli_getattrE(targetcli, fnum, NULL, &start, NULL, NULL, NULL))) {
d_printf("getattrib: %s\n",cli_errstr(cli));
return 1;
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 6ce27b8200..f935df7e3b 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2328,13 +2328,13 @@ NTSTATUS cli_qpathinfo_streams(struct cli_state *cli, const char *fname,
unsigned int *pnum_streams,
struct stream_struct **pstreams);
bool cli_qfilename(struct cli_state *cli, uint16_t fnum, char *name, size_t namelen);
-bool cli_qfileinfo(struct cli_state *cli, uint16_t fnum,
- uint16 *mode, SMB_OFF_T *size,
- struct timespec *create_time,
- struct timespec *access_time,
- struct timespec *write_time,
- struct timespec *change_time,
- SMB_INO_T *ino);
+bool cli_qfileinfo_basic(struct cli_state *cli, uint16_t fnum,
+ uint16 *mode, SMB_OFF_T *size,
+ struct timespec *create_time,
+ struct timespec *access_time,
+ struct timespec *write_time,
+ struct timespec *change_time,
+ SMB_INO_T *ino);
struct tevent_req *cli_qpathinfo_basic_send(TALLOC_CTX *mem_ctx,
struct event_context *ev,
struct cli_state *cli,
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index 3ac9f4454f..025a86b833 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -1144,13 +1144,13 @@ bool cli_qfilename(struct cli_state *cli, uint16_t fnum, char *name, size_t name
Send a qfileinfo call.
****************************************************************************/
-bool cli_qfileinfo(struct cli_state *cli, uint16_t fnum,
- uint16 *mode, SMB_OFF_T *size,
- struct timespec *create_time,
- struct timespec *access_time,
- struct timespec *write_time,
- struct timespec *change_time,
- SMB_INO_T *ino)
+bool cli_qfileinfo_basic(struct cli_state *cli, uint16_t fnum,
+ uint16 *mode, SMB_OFF_T *size,
+ struct timespec *create_time,
+ struct timespec *access_time,
+ struct timespec *write_time,
+ struct timespec *change_time,
+ SMB_INO_T *ino)
{
uint32_t data_len = 0;
uint16 setup;
diff --git a/source3/libsmb/libsmb_file.c b/source3/libsmb/libsmb_file.c
index 8250da2b30..1a44f0e9af 100644
--- a/source3/libsmb/libsmb_file.c
+++ b/source3/libsmb/libsmb_file.c
@@ -730,8 +730,8 @@ SMBC_lseek_ctx(SMBCCTX *context,
}
/*d_printf(">>>lseek: resolved path as %s\n", targetpath);*/
- if (!cli_qfileinfo(targetcli, file->cli_fd, NULL,
- &size, NULL, NULL, NULL, NULL, NULL))
+ if (!cli_qfileinfo_basic(targetcli, file->cli_fd, NULL,
+ &size, NULL, NULL, NULL, NULL, NULL))
{
SMB_OFF_T b_size = size;
if (!NT_STATUS_IS_OK(cli_getattrE(targetcli, file->cli_fd,
diff --git a/source3/libsmb/libsmb_stat.c b/source3/libsmb/libsmb_stat.c
index f8614d3154..fd390017c6 100644
--- a/source3/libsmb/libsmb_stat.c
+++ b/source3/libsmb/libsmb_stat.c
@@ -259,12 +259,12 @@ SMBC_fstat_ctx(SMBCCTX *context,
}
/*d_printf(">>>fstat: resolved path as %s\n", targetpath);*/
- if (!cli_qfileinfo(targetcli, file->cli_fd, &mode, &size,
- NULL,
- &access_time_ts,
- &write_time_ts,
- &change_time_ts,
- &ino)) {
+ if (!cli_qfileinfo_basic(targetcli, file->cli_fd, &mode, &size,
+ NULL,
+ &access_time_ts,
+ &write_time_ts,
+ &change_time_ts,
+ &ino)) {
time_t change_time, access_time, write_time;
if (!NT_STATUS_IS_OK(cli_getattrE(targetcli, file->cli_fd, &mode, &size,
diff --git a/source3/torture/nbio.c b/source3/torture/nbio.c
index 1d9c02e4bd..1e72a6f7e4 100644
--- a/source3/torture/nbio.c
+++ b/source3/torture/nbio.c
@@ -253,7 +253,8 @@ void nb_qfileinfo(int fnum)
{
int i;
i = find_handle(fnum);
- cli_qfileinfo(c, ftable[i].fd, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ cli_qfileinfo_basic(c, ftable[i].fd, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL);
}
void nb_qfsinfo(int level)
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 18072828cf..32a9bbd2b9 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -915,7 +915,8 @@ static bool run_readwritelarge(int dummy)
cli_write(cli1, fnum1, 0, buf, 0, sizeof(buf));
- if (!cli_qfileinfo(cli1, fnum1, NULL, &fsize, NULL, NULL, NULL, NULL, NULL)) {
+ if (!cli_qfileinfo_basic(cli1, fnum1, NULL, &fsize, NULL, NULL, NULL,
+ NULL, NULL)) {
printf("qfileinfo failed (%s)\n", cli_errstr(cli1));
correct = False;
}
@@ -948,7 +949,8 @@ static bool run_readwritelarge(int dummy)
cli_smbwrite(cli1, fnum1, buf, 0, sizeof(buf));
- if (!cli_qfileinfo(cli1, fnum1, NULL, &fsize, NULL, NULL, NULL, NULL, NULL)) {
+ if (!cli_qfileinfo_basic(cli1, fnum1, NULL, &fsize, NULL, NULL, NULL,
+ NULL, NULL)) {
printf("qfileinfo failed (%s)\n", cli_errstr(cli1));
correct = False;
}
@@ -968,7 +970,8 @@ static bool run_readwritelarge(int dummy)
printf("set allocation size to zero failed (%s)\n", cli_errstr(&cli1));
return False;
}
- if (!cli_qfileinfo(cli1, fnum1, NULL, &fsize, NULL, NULL, NULL, NULL, NULL)) {
+ if (!cli_qfileinfo_basic(cli1, fnum1, NULL, &fsize, NULL, NULL, NULL,
+ NULL, NULL)) {
printf("qfileinfo failed (%s)\n", cli_errstr(cli1));
correct = False;
}
@@ -2974,7 +2977,8 @@ static bool run_trans2test(int dummy)
cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
cli_open(cli, fname,
O_RDWR | O_CREAT | O_TRUNC, DENY_NONE, &fnum);
- if (!cli_qfileinfo(cli, fnum, NULL, &size, &c_time_ts, &a_time_ts, &w_time_ts,
+ if (!cli_qfileinfo_basic(cli, fnum, NULL, &size, &c_time_ts,
+ &a_time_ts, &w_time_ts,
&m_time_ts, NULL)) {
printf("ERROR: qfileinfo failed (%s)\n", cli_errstr(cli));
correct = False;
diff --git a/source3/torture/utable.c b/source3/torture/utable.c
index 588ff0f61f..4162ecacfe 100644
--- a/source3/torture/utable.c
+++ b/source3/torture/utable.c
@@ -159,8 +159,10 @@ bool torture_casetable(int dummy)
size = 0;
- if (!cli_qfileinfo(cli, fnum, NULL, &size,
- NULL, NULL, NULL, NULL, NULL)) continue;
+ if (!cli_qfileinfo_basic(cli, fnum, NULL, &size,
+ NULL, NULL, NULL, NULL, NULL)) {
+ continue;
+ }
if (size > 0) {
/* found a character equivalence! */
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 63858ea08d..8a409fda28 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -680,7 +680,7 @@ static uint16 get_fileinfo(struct cli_state *cli, const char *filename)
printf("Failed to open %s: %s\n", filename, cli_errstr(cli));
}
- if (!cli_qfileinfo(cli, fnum, &mode, NULL, NULL, NULL,
+ if (!cli_qfileinfo_basic(cli, fnum, &mode, NULL, NULL, NULL,
NULL, NULL, NULL)) {
printf("Failed to file info %s: %s\n", filename,
cli_errstr(cli));