mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s3: expect fstatat() and dirfd()
FreeBSD, AIX and Solaris all have this. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
c7d6745858
commit
f66d3621f5
@ -581,7 +581,6 @@ static struct dirent *vfswrap_readdir(vfs_handle_struct *handle,
|
||||
SMB_STRUCT_STAT *sbuf)
|
||||
{
|
||||
struct dirent *result;
|
||||
bool do_stat = false;
|
||||
bool fake_ctime = lp_fake_directory_create_times(SNUM(handle->conn));
|
||||
int flags = AT_SYMLINK_NOFOLLOW;
|
||||
struct stat st;
|
||||
@ -589,10 +588,6 @@ static struct dirent *vfswrap_readdir(vfs_handle_struct *handle,
|
||||
|
||||
START_PROFILE(syscall_readdir);
|
||||
|
||||
#if defined(HAVE_DIRFD) && defined(HAVE_FSTATAT)
|
||||
do_stat = true;
|
||||
#endif
|
||||
|
||||
result = readdir(dirp);
|
||||
END_PROFILE(syscall_readdir);
|
||||
|
||||
@ -609,11 +604,6 @@ static struct dirent *vfswrap_readdir(vfs_handle_struct *handle,
|
||||
*/
|
||||
SET_STAT_INVALID(*sbuf);
|
||||
|
||||
/* See if we can efficiently return this. */
|
||||
if (!do_stat) {
|
||||
return result;
|
||||
}
|
||||
|
||||
ret = fstatat(dirfd(dirp),
|
||||
result->d_name,
|
||||
&st,
|
||||
|
@ -1573,7 +1573,6 @@ static NTSTATUS vfs_gpfs_fset_dos_attributes(struct vfs_handle_struct *handle,
|
||||
static int stat_with_capability(struct vfs_handle_struct *handle,
|
||||
struct smb_filename *smb_fname, int flag)
|
||||
{
|
||||
#if defined(HAVE_FSTATAT)
|
||||
int fd = -1;
|
||||
NTSTATUS status;
|
||||
struct smb_filename *dir_name = NULL;
|
||||
@ -1611,9 +1610,6 @@ static int stat_with_capability(struct vfs_handle_struct *handle,
|
||||
}
|
||||
|
||||
return ret;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int vfs_gpfs_stat(struct vfs_handle_struct *handle,
|
||||
|
@ -134,7 +134,6 @@ def configure(conf):
|
||||
conf.CHECK_FUNCS('fseeko setluid')
|
||||
conf.CHECK_FUNCS('getpwnam', headers='sys/types.h pwd.h')
|
||||
conf.CHECK_FUNCS('fdopendir')
|
||||
conf.CHECK_FUNCS('fstatat')
|
||||
conf.CHECK_FUNCS('getpwent_r setenv clearenv strcasecmp')
|
||||
conf.CHECK_FUNCS('syslog vsyslog timegm setlocale')
|
||||
conf.CHECK_FUNCS('lutimes utimensat futimens')
|
||||
@ -388,7 +387,6 @@ fchflags
|
||||
chmod
|
||||
crypt16
|
||||
devnm
|
||||
dirfd
|
||||
endmntent
|
||||
execl
|
||||
fchmod
|
||||
|
Loading…
Reference in New Issue
Block a user