{
SMB_STRUCT_STAT sbuf;
- if (fsp->fh->fd == -1) {
+ if (fsp_get_pathref_fd(fsp) == -1) {
/* Get the stat struct for the owner info. */
return afs_to_nt_acl(afs_acl, fsp->conn, fsp->fsp_name,
security_info, mem_ctx, ppdesc);
goto done;
}
- if ((fsp != NULL) && (fsp->fh->fd != -1)) {
+ if ((fsp != NULL) && (fsp_get_pathref_fd(fsp) != -1)) {
ret = SMB_VFS_FSTAT(fsp, &sbuf);
}
else {
return SMB_VFS_NEXT_FGET_DOS_ATTRIBUTES(handle, fsp, dosmode);
}
- ret = gpfswrap_fstat_x(fsp->fh->fd, &litemask, &iattr, sizeof(iattr));
+ ret = gpfswrap_fstat_x(fsp_get_pathref_fd(fsp), &litemask, &iattr, sizeof(iattr));
if (ret == -1 && errno == ENOSYS) {
return SMB_VFS_NEXT_FGET_DOS_ATTRIBUTES(handle, fsp, dosmode);
}
set_effective_capability(DAC_OVERRIDE_CAPABILITY);
- ret = gpfswrap_fstat_x(fsp->fh->fd, &litemask,
+ ret = gpfswrap_fstat_x(fsp_get_pathref_fd(fsp), &litemask,
&iattr, sizeof(iattr));
if (ret == -1) {
saved_errno = errno;
return NT_STATUS_NO_MEMORY;
}
- if ((fsp != NULL) && (fsp->fh->fd != -1)) {
+ if ((fsp != NULL) && (fsp_get_pathref_fd(fsp) != -1)) {
ret = SMB_VFS_NEXT_FSTAT(handle, fsp, &smb_fname_base->st);
}
else {
/* We know this name is ok, it's already passed the checks. */
- } else if (fsp->fh->fd == -1) {
+ } else if (fsp_get_pathref_fd(fsp) == -1) {
/*
* This is actually a QFILEINFO on a directory
* handle (returned from an NT SMB). NT5.0 seems
file_info_level = SMB2_FILE_RENAME_INFORMATION_INTERNAL;
}
- if (fsp->fh->fd == -1) {
+ if (fsp_get_pathref_fd(fsp) == -1) {
/*
* This is actually a SETFILEINFO on a directory
* handle (returned from an NT SMB). NT5.0 seems
/* We know this name is ok, it's already passed the checks. */
- } else if(fsp->fh->fd == -1) {
+ } else if(fsp_get_pathref_fd(fsp) == -1) {
/*
* This is actually a QFILEINFO on a directory
* handle (returned from an NT SMB). NT5.0 seems
smb_fname = fsp->fsp_name;
- if(fsp->fh->fd == -1) {
+ if (fsp_get_pathref_fd(fsp) == -1) {
/*
* This is actually a SETFILEINFO on a directory
* handle (returned from an NT SMB). NT5.0 seems
int ret;
struct stat_ex saved_stat = fsp->fsp_name->st;
- if(fsp->fh->fd == -1) {
+ if (fsp_get_pathref_fd(fsp) == -1) {
if (fsp->posix_flags & FSP_POSIX_FLAGS_OPEN) {
ret = SMB_VFS_LSTAT(fsp->conn, fsp->fsp_name);
} else {