SMBC_getatr(SMBCCTX * context,
SMBCSRV *srv,
const char *path,
- uint16 *mode,
+ uint16_t *mode,
off_t *size,
struct timespec *create_time_ts,
struct timespec *access_time_ts,
return True;
}
+ srv->no_pathinfo2 = True;
+
+ if (!srv->no_pathinfo3 &&
+ NT_STATUS_IS_OK(cli_qpathinfo3(targetcli, targetpath,
+ create_time_ts,
+ access_time_ts,
+ write_time_ts,
+ change_time_ts,
+ size, mode, ino))) {
+ TALLOC_FREE(frame);
+ return True;
+ }
+
+ srv->no_pathinfo3 = True;
+
/* if this is NT then don't bother with the getatr */
if (smb1cli_conn_capabilities(targetcli->conn) & CAP_NT_SMBS) {
- errno = EPERM;
- TALLOC_FREE(frame);
- return False;
+ goto all_failed;
}
if (NT_STATUS_IS_OK(cli_getatr(targetcli, targetpath, mode, size, &write_time))) {
if (change_time_ts != NULL) {
*change_time_ts = w_time_ts;
}
- srv->no_pathinfo2 = True;
+ if (ino) {
+ *ino = 0;
+ }
TALLOC_FREE(frame);
return True;
}
+all_failed:
+ srv->no_pathinfo2 = False;
+ srv->no_pathinfo3 = False;
+
errno = EPERM;
TALLOC_FREE(frame);
return False;
time_t access_time,
time_t write_time,
time_t change_time,
- uint16 mode)
+ uint16_t mode)
{
uint16_t fd;
int ret;
* cli_setatr() for that, and with only this parameter, it
* seems to work on win98.
*/
- if (ret && mode != (uint16) -1) {
+ if (ret && mode != (uint16_t) -1) {
ret = NT_STATUS_IS_OK(cli_setatr(srv->cli, path, mode, 0));
}