summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-07-29 10:12:11 -0700
committerTim Prouty <tprouty@samba.org>2009-07-29 10:12:23 -0700
commit9b461ad7eb4d478397fe56f37f7c8ffca6724b23 (patch)
treeedc13d450bdd78a79d8b08dd0332b59a3657db78 /source3/modules
parentd498532389df7b1f6b1d01e47166f5697a742147 (diff)
downloadsamba-9b461ad7eb4d478397fe56f37f7c8ffca6724b23.tar.gz
samba-9b461ad7eb4d478397fe56f37f7c8ffca6724b23.tar.bz2
samba-9b461ad7eb4d478397fe56f37f7c8ffca6724b23.zip
s3: Attempt to fix hpuxacl module
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_hpuxacl.c16
-rw-r--r--source3/modules/vfs_hpuxacl.h2
2 files changed, 13 insertions, 5 deletions
diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c
index 36386365eb..abc80dcd9c 100644
--- a/source3/modules/vfs_hpuxacl.c
+++ b/source3/modules/vfs_hpuxacl.c
@@ -208,17 +208,23 @@ SMB_ACL_T hpuxacl_sys_acl_get_fd(vfs_handle_struct *handle,
int hpuxacl_sys_acl_set_file(vfs_handle_struct *handle,
- struct smb_filename *smb_fname,
+ const char *name,
SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
int ret = -1;
HPUX_ACL_T hpux_acl = NULL;
int count;
+ struct smb_filename *smb_fname = NULL;
DEBUG(10, ("hpuxacl_sys_acl_set_file called for file '%s'\n",
- smb_fname_str_dbg(smb_fname)));
+ name));
+ status = create_synthetic_smb_fname(talloc_tos(), name, NULL, NULL,
+ &smb_fname);
+ if (!NT_STATUS_IS_OK(status)) {
+ goto done;
+ }
if(hpux_acl_call_present() == False) {
/* Looks like we don't have the acl() system call on HPUX.
@@ -299,6 +305,7 @@ int hpuxacl_sys_acl_set_file(vfs_handle_struct *handle,
done:
DEBUG(10, ("hpuxacl_sys_acl_set_file %s.\n",
((ret != 0) ? "failed" : "succeeded")));
+ TALLOC_FREE(smb_fname);
SAFE_FREE(hpux_acl);
return ret;
}
@@ -327,8 +334,9 @@ int hpuxacl_sys_acl_set_fd(vfs_handle_struct *handle,
DEBUG(10, ("redirecting call of hpuxacl_sys_acl_set_fd to "
"hpuxacl_sys_acl_set_file (no facl syscall on HPUX)\n"));
- return hpuxacl_sys_acl_set_file(handle, file_struct_p->fsp_name,
- SMB_ACL_TYPE_ACCESS, theacl);
+ return hpuxacl_sys_acl_set_file(handle,
+ file_struct_p->fsp_name->base_name,
+ SMB_ACL_TYPE_ACCESS, theacl);
}
diff --git a/source3/modules/vfs_hpuxacl.h b/source3/modules/vfs_hpuxacl.h
index 9baed5790a..07b32d628c 100644
--- a/source3/modules/vfs_hpuxacl.h
+++ b/source3/modules/vfs_hpuxacl.h
@@ -41,7 +41,7 @@ SMB_ACL_T hpuxacl_sys_acl_get_fd(vfs_handle_struct *handle,
files_struct *fsp);
int hpuxacl_sys_acl_set_file(vfs_handle_struct *handle,
- struct smb_filename *smb_fname,
+ const char *name,
SMB_ACL_TYPE_T type,
SMB_ACL_T theacl);