mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
smbd: add vfs_stat()
Deals with POSIX paths and either calls lstat() for POSIX or stat(). Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
a63a397294
commit
9d075d8072
@ -1298,6 +1298,8 @@ NTSTATUS check_reduced_name(connection_struct *conn,
|
||||
NTSTATUS check_reduced_name_with_privilege(connection_struct *conn,
|
||||
const struct smb_filename *smb_fname,
|
||||
struct smb_request *smbreq);
|
||||
int vfs_stat(struct connection_struct *conn,
|
||||
struct smb_filename *smb_fname);
|
||||
int vfs_stat_smb_basename(struct connection_struct *conn,
|
||||
const struct smb_filename *smb_fname_in,
|
||||
SMB_STRUCT_STAT *psbuf);
|
||||
|
@ -1492,6 +1492,18 @@ NTSTATUS check_reduced_name(connection_struct *conn,
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Ensure LSTAT is called for POSIX paths.
|
||||
*/
|
||||
int vfs_stat(struct connection_struct *conn,
|
||||
struct smb_filename *smb_fname)
|
||||
{
|
||||
if (smb_fname->flags & SMB_FILENAME_POSIX_PATH) {
|
||||
return SMB_VFS_LSTAT(conn, smb_fname);
|
||||
}
|
||||
return SMB_VFS_STAT(conn, smb_fname);
|
||||
}
|
||||
|
||||
/**
|
||||
* XXX: This is temporary and there should be no callers of this once
|
||||
* smb_filename is plumbed through all path based operations.
|
||||
|
Loading…
x
Reference in New Issue
Block a user