summaryrefslogtreecommitdiff
path: root/source3/modules/onefs_acl.c
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-07-07 19:20:22 -0700
committerTim Prouty <tprouty@samba.org>2009-07-08 21:36:03 -0700
commit69c8795b672054cb6b5a85cc5f8961099425bd7a (patch)
tree1484215b8c1b9778d8079d53863ff5557e753614 /source3/modules/onefs_acl.c
parent400c18a8c4098b4ba86d32a236e5d89014774f3f (diff)
downloadsamba-69c8795b672054cb6b5a85cc5f8961099425bd7a.tar.gz
samba-69c8795b672054cb6b5a85cc5f8961099425bd7a.tar.bz2
samba-69c8795b672054cb6b5a85cc5f8961099425bd7a.zip
s3: convert unix_mode to take an smb_filename
Diffstat (limited to 'source3/modules/onefs_acl.c')
-rw-r--r--source3/modules/onefs_acl.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source3/modules/onefs_acl.c b/source3/modules/onefs_acl.c
index 81bdfd26cc..5c72d10a6b 100644
--- a/source3/modules/onefs_acl.c
+++ b/source3/modules/onefs_acl.c
@@ -542,14 +542,25 @@ static bool add_sfs_aces(files_struct *fsp, struct ifs_security_descriptor *sd)
/* Only continue if this is a synthetic ACL and a directory. */
if (S_ISDIR(sbuf.st_ex_mode) &&
(sbuf.st_ex_flags & SF_HASNTFSACL) == 0) {
+ struct smb_filename *smb_fname = NULL;
struct ifs_ace new_aces[6];
struct ifs_ace *old_aces;
int i, num_aces_to_add = 0;
mode_t file_mode = 0, dir_mode = 0;
+ NTSTATUS status;
+
+ status = create_synthetic_smb_fname_split(talloc_tos(),
+ fsp->fsp_name, NULL,
+ &smb_fname);
+ if (!NT_STATUS_IS_OK(status)) {
+ return false;
+ }
/* Use existing samba logic to derive the mode bits. */
- file_mode = unix_mode(fsp->conn, 0, fsp->fsp_name, false);
- dir_mode = unix_mode(fsp->conn, aDIR, fsp->fsp_name, false);
+ file_mode = unix_mode(fsp->conn, 0, smb_fname, NULL);
+ dir_mode = unix_mode(fsp->conn, aDIR, smb_fname, NULL);
+
+ TALLOC_FREE(smb_fname);
/* Initialize ACEs. */
new_aces[0] = onefs_init_ace(fsp->conn, file_mode, false, USR);