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>
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);
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.