summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source3/include/vfs.h2
-rw-r--r--source3/include/vfs_macros.h6
-rw-r--r--source3/lib/sysacls.c26
-rw-r--r--source3/modules/vfs_aixacl.c9
-rw-r--r--source3/modules/vfs_aixacl2.c3
-rw-r--r--source3/modules/vfs_default.c4
-rw-r--r--source3/modules/vfs_full_audit.c9
-rw-r--r--source3/modules/vfs_gpfs.c3
-rw-r--r--source3/modules/vfs_hpuxacl.c5
-rw-r--r--source3/modules/vfs_irixacl.c3
-rw-r--r--source3/modules/vfs_posixacl.c5
-rw-r--r--source3/modules/vfs_tru64acl.c5
-rw-r--r--source3/smbd/posix_acls.c8
-rw-r--r--source3/smbd/trans2.c2
14 files changed, 41 insertions, 49 deletions
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 8fbf3ea373d..97648e740db 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -352,7 +352,7 @@ struct vfs_ops {
int (*sys_acl_get_permset)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
void * (*sys_acl_get_qualifier)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d);
SMB_ACL_T (*sys_acl_get_file)(struct vfs_handle_struct *handle, const char *path_p, SMB_ACL_TYPE_T type);
- SMB_ACL_T (*sys_acl_get_fd)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd);
+ SMB_ACL_T (*sys_acl_get_fd)(struct vfs_handle_struct *handle, struct files_struct *fsp);
int (*sys_acl_clear_perms)(struct vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset);
int (*sys_acl_add_perm)(struct vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
char * (*sys_acl_to_text)(struct vfs_handle_struct *handle, SMB_ACL_T theacl, ssize_t *plen);
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 35b26305076..e7f39a57ef0 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -98,7 +98,7 @@
#define SMB_VFS_SYS_ACL_GET_PERMSET(conn, entry_d, permset_p) ((conn)->vfs.ops.sys_acl_get_permset((conn)->vfs.handles.sys_acl_get_permset, (entry_d), (permset_p)))
#define SMB_VFS_SYS_ACL_GET_QUALIFIER(conn, entry_d) ((conn)->vfs.ops.sys_acl_get_qualifier((conn)->vfs.handles.sys_acl_get_qualifier, (entry_d)))
#define SMB_VFS_SYS_ACL_GET_FILE(conn, path_p, type) ((conn)->vfs.ops.sys_acl_get_file((conn)->vfs.handles.sys_acl_get_file, (path_p), (type)))
-#define SMB_VFS_SYS_ACL_GET_FD(fsp, fd) ((fsp)->conn->vfs.ops.sys_acl_get_fd((fsp)->conn->vfs.handles.sys_acl_get_fd, (fsp), (fd)))
+#define SMB_VFS_SYS_ACL_GET_FD(fsp) ((fsp)->conn->vfs.ops.sys_acl_get_fd((fsp)->conn->vfs.handles.sys_acl_get_fd, (fsp)))
#define SMB_VFS_SYS_ACL_CLEAR_PERMS(conn, permset) ((conn)->vfs.ops.sys_acl_clear_perms((conn)->vfs.handles.sys_acl_clear_perms, (permset)))
#define SMB_VFS_SYS_ACL_ADD_PERM(conn, permset, perm) ((conn)->vfs.ops.sys_acl_add_perm((conn)->vfs.handles.sys_acl_add_perm, (permset), (perm)))
#define SMB_VFS_SYS_ACL_TO_TEXT(conn, theacl, plen) ((conn)->vfs.ops.sys_acl_to_text((conn)->vfs.handles.sys_acl_to_text, (theacl), (plen)))
@@ -217,7 +217,7 @@
#define SMB_VFS_OPAQUE_SYS_ACL_GET_PERMSET(conn, entry_d, permset_p) ((conn)->vfs_opaque.ops.sys_acl_get_permset((conn)->vfs_opaque.handles.sys_acl_get_permset, (entry_d), (permset_p)))
#define SMB_VFS_OPAQUE_SYS_ACL_GET_QUALIFIER(conn, entry_d) ((conn)->vfs_opaque.ops.sys_acl_get_qualifier((conn)->vfs_opaque.handles.sys_acl_get_qualifier, (entry_d)))
#define SMB_VFS_OPAQUE_SYS_ACL_GET_FILE(conn, path_p, type) ((conn)->vfs_opaque.ops.sys_acl_get_file((conn)->vfs_opaque.handles.sys_acl_get_file, (path_p), (type)))
-#define SMB_VFS_OPAQUE_SYS_ACL_GET_FD(fsp, fd) ((fsp)->conn->vfs_opaque.ops.sys_acl_get_fd((fsp)->conn->vfs_opaque.handles.sys_acl_get_fd, (fsp), (fd)))
+#define SMB_VFS_OPAQUE_SYS_ACL_GET_FD(fsp) ((fsp)->conn->vfs_opaque.ops.sys_acl_get_fd((fsp)->conn->vfs_opaque.handles.sys_acl_get_fd, (fsp)))
#define SMB_VFS_OPAQUE_SYS_ACL_CLEAR_PERMS(conn, permset) ((conn)->vfs_opaque.ops.sys_acl_clear_perms((conn)->vfs_opaque.handles.sys_acl_clear_perms, (permset)))
#define SMB_VFS_OPAQUE_SYS_ACL_ADD_PERM(conn, permset, perm) ((conn)->vfs_opaque.ops.sys_acl_add_perm((conn)->vfs_opaque.handles.sys_acl_add_perm, (permset), (perm)))
#define SMB_VFS_OPAQUE_SYS_ACL_TO_TEXT(conn, theacl, plen) ((conn)->vfs_opaque.ops.sys_acl_to_text((conn)->vfs_opaque.handles.sys_acl_to_text, (theacl), (plen)))
@@ -337,7 +337,7 @@
#define SMB_VFS_NEXT_SYS_ACL_GET_PERMSET(handle, entry_d, permset_p) ((handle)->vfs_next.ops.sys_acl_get_permset((handle)->vfs_next.handles.sys_acl_get_permset, (entry_d), (permset_p)))
#define SMB_VFS_NEXT_SYS_ACL_GET_QUALIFIER(handle, entry_d) ((handle)->vfs_next.ops.sys_acl_get_qualifier((handle)->vfs_next.handles.sys_acl_get_qualifier, (entry_d)))
#define SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, path_p, type) ((handle)->vfs_next.ops.sys_acl_get_file((handle)->vfs_next.handles.sys_acl_get_file, (path_p), (type)))
-#define SMB_VFS_NEXT_SYS_ACL_GET_FD(handle, fsp, fd) ((handle)->vfs_next.ops.sys_acl_get_fd((handle)->vfs_next.handles.sys_acl_get_fd, (fsp), (fd)))
+#define SMB_VFS_NEXT_SYS_ACL_GET_FD(handle, fsp) ((handle)->vfs_next.ops.sys_acl_get_fd((handle)->vfs_next.handles.sys_acl_get_fd, (fsp)))
#define SMB_VFS_NEXT_SYS_ACL_CLEAR_PERMS(handle, permset) ((handle)->vfs_next.ops.sys_acl_clear_perms((handle)->vfs_next.handles.sys_acl_clear_perms, (permset)))
#define SMB_VFS_NEXT_SYS_ACL_ADD_PERM(handle, permset, perm) ((handle)->vfs_next.ops.sys_acl_add_perm((handle)->vfs_next.handles.sys_acl_add_perm, (permset), (perm)))
#define SMB_VFS_NEXT_SYS_ACL_TO_TEXT(handle, theacl, plen) ((handle)->vfs_next.ops.sys_acl_to_text((handle)->vfs_next.handles.sys_acl_to_text, (theacl), (plen)))
diff --git a/source3/lib/sysacls.c b/source3/lib/sysacls.c
index 3e61f42aa52..f23d03f706f 100644
--- a/source3/lib/sysacls.c
+++ b/source3/lib/sysacls.c
@@ -364,9 +364,9 @@ SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
return posixacl_sys_acl_get_file(handle, path_p, type);
}
-SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp, int fd)
+SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp)
{
- return posixacl_sys_acl_get_fd(handle, fsp, fd);
+ return posixacl_sys_acl_get_fd(handle, fsp);
}
int sys_acl_set_file(vfs_handle_struct *handle,
@@ -395,9 +395,9 @@ SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
return aixacl_sys_acl_get_file(handle, path_p, type);
}
-SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp, int fd)
+SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp)
{
- return aixacl_sys_acl_get_fd(handle, fsp, fd);
+ return aixacl_sys_acl_get_fd(handle, fsp);
}
int sys_acl_set_file(vfs_handle_struct *handle,
@@ -426,9 +426,9 @@ SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
return tru64acl_sys_acl_get_file(handle, path_p, type);
}
-SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp, int fd)
+SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp)
{
- return tru64acl_sys_acl_get_fd(handle, fsp, fd);
+ return tru64acl_sys_acl_get_fd(handle, fsp);
}
int sys_acl_set_file(vfs_handle_struct *handle,
@@ -457,9 +457,9 @@ SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
return solarisacl_sys_acl_get_file(handle, path_p, type);
}
-SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp, int fd)
+SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp)
{
- return solarisacl_sys_acl_get_fd(handle, fsp, fd);
+ return solarisacl_sys_acl_get_fd(handle, fsp);
}
int sys_acl_set_file(vfs_handle_struct *handle,
@@ -488,9 +488,9 @@ SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
return hpuxacl_sys_acl_get_file(handle, path_p, type);
}
-SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp, int fd)
+SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp)
{
- return hpuxacl_sys_acl_get_fd(handle, fsp, fd);
+ return hpuxacl_sys_acl_get_fd(handle, fsp);
}
int sys_acl_set_file(vfs_handle_struct *handle,
@@ -519,9 +519,9 @@ SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
return irixacl_sys_acl_get_file(handle, path_p, type);
}
-SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp, int fd)
+SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp)
{
- return irixacl_sys_acl_get_fd(handle, fsp, fd);
+ return irixacl_sys_acl_get_fd(handle, fsp);
}
int sys_acl_set_file(vfs_handle_struct *handle,
@@ -555,7 +555,7 @@ SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
return NULL;
}
-SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp, int fd)
+SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp)
{
#ifdef ENOTSUP
errno = ENOTSUP;
diff --git a/source3/modules/vfs_aixacl.c b/source3/modules/vfs_aixacl.c
index a60470ffc95..1a76ed68789 100644
--- a/source3/modules/vfs_aixacl.c
+++ b/source3/modules/vfs_aixacl.c
@@ -80,8 +80,7 @@ SMB_ACL_T aixacl_sys_acl_get_file(vfs_handle_struct *handle,
}
SMB_ACL_T aixacl_sys_acl_get_fd(vfs_handle_struct *handle,
- files_struct *fsp,
- int fd)
+ files_struct *fsp)
{
struct acl *file_acl = (struct acl *)NULL;
@@ -93,7 +92,7 @@ SMB_ACL_T aixacl_sys_acl_get_fd(vfs_handle_struct *handle,
/* Get the acl using fstatacl */
DEBUG(10,("Entering AIX sys_acl_get_fd\n"));
- DEBUG(10,("fd is %d\n",fd));
+ DEBUG(10,("fd is %d\n",fsp->fh->fd));
file_acl = (struct acl *)SMB_MALLOC(BUFSIZ);
if(file_acl == NULL) {
@@ -104,7 +103,7 @@ SMB_ACL_T aixacl_sys_acl_get_fd(vfs_handle_struct *handle,
memset(file_acl,0,BUFSIZ);
- rc = fstatacl(fd,0,file_acl,BUFSIZ);
+ rc = fstatacl(fsp->fh->fd,0,file_acl,BUFSIZ);
if( (rc == -1) && (errno == ENOSPC)) {
struct acl *new_acl = SMB_MALLOC(file_acl->acl_len + sizeof(struct acl));
if( new_acl == NULL) {
@@ -113,7 +112,7 @@ SMB_ACL_T aixacl_sys_acl_get_fd(vfs_handle_struct *handle,
return NULL;
}
file_acl = new_acl;
- rc = fstatacl(fd,0,file_acl,file_acl->acl_len + sizeof(struct acl));
+ rc = fstatacl(fsp->fh->fd,0,file_acl,file_acl->acl_len + sizeof(struct acl));
if( rc == -1) {
DEBUG(0,("fstatacl returned %d with errno %d\n",rc,errno));
SAFE_FREE(file_acl);
diff --git a/source3/modules/vfs_aixacl2.c b/source3/modules/vfs_aixacl2.c
index d63886d68e3..42ecb9892c0 100644
--- a/source3/modules/vfs_aixacl2.c
+++ b/source3/modules/vfs_aixacl2.c
@@ -258,8 +258,7 @@ SMB_ACL_T aixjfs2_sys_acl_get_file(vfs_handle_struct *handle,
}
SMB_ACL_T aixjfs2_sys_acl_get_fd(vfs_handle_struct *handle,
- files_struct *fsp,
- int fd)
+ files_struct *fsp)
{
acl_type_t aixjfs2_type;
aixjfs2_type.u64 = ACL_AIXC;
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 0054fb3646c..d909b0475a9 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1042,9 +1042,9 @@ static SMB_ACL_T vfswrap_sys_acl_get_file(vfs_handle_struct *handle, const char
return sys_acl_get_file(handle, path_p, type);
}
-static SMB_ACL_T vfswrap_sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp, int fd)
+static SMB_ACL_T vfswrap_sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp)
{
- return sys_acl_get_fd(handle, fsp, fd);
+ return sys_acl_get_fd(handle, fsp);
}
static int vfswrap_sys_acl_clear_perms(vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset)
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 54433347b82..d572c155e22 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -221,8 +221,7 @@ static SMB_ACL_T smb_full_audit_sys_acl_get_file(vfs_handle_struct *handle,
const char *path_p,
SMB_ACL_TYPE_T type);
static SMB_ACL_T smb_full_audit_sys_acl_get_fd(vfs_handle_struct *handle,
- files_struct *fsp,
- int fd);
+ files_struct *fsp);
static int smb_full_audit_sys_acl_clear_perms(vfs_handle_struct *handle,
SMB_ACL_PERMSET_T permset);
static int smb_full_audit_sys_acl_add_perm(vfs_handle_struct *handle,
@@ -451,7 +450,7 @@ static vfs_op_tuple audit_op_tuples[] = {
SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_sys_acl_get_file), SMB_VFS_OP_SYS_ACL_GET_FILE,
SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_get_fd), SMB_VFS_OP_SYS_ACL_GET_FD,
+{SMB_VFS_OP(smb_full_audit_sys_acl_get_fd), SMB_VFS_OP_SYS_ACL_GET_FD,
SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_sys_acl_clear_perms), SMB_VFS_OP_SYS_ACL_CLEAR_PERMS,
SMB_VFS_LAYER_LOGGER},
@@ -1684,11 +1683,11 @@ static SMB_ACL_T smb_full_audit_sys_acl_get_file(vfs_handle_struct *handle,
}
static SMB_ACL_T smb_full_audit_sys_acl_get_fd(vfs_handle_struct *handle,
- files_struct *fsp, int fd)
+ files_struct *fsp)
{
SMB_ACL_T result;
- result = SMB_VFS_NEXT_SYS_ACL_GET_FD(handle, fsp, fd);
+ result = SMB_VFS_NEXT_SYS_ACL_GET_FD(handle, fsp);
do_log(SMB_VFS_OP_SYS_ACL_GET_FD, (result != NULL), handle,
"%s", fsp->fsp_name);
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index f7605b20de0..714f6e2917c 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -501,8 +501,7 @@ SMB_ACL_T gpfsacl_sys_acl_get_file(vfs_handle_struct *handle,
}
SMB_ACL_T gpfsacl_sys_acl_get_fd(vfs_handle_struct *handle,
- files_struct *fsp,
- int fd)
+ files_struct *fsp)
{
return gpfsacl_get_posix_acl(fsp->fsp_name, GPFS_ACL_TYPE_ACCESS);
}
diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c
index edce161c19e..67fbfe56f63 100644
--- a/source3/modules/vfs_hpuxacl.c
+++ b/source3/modules/vfs_hpuxacl.c
@@ -182,15 +182,14 @@ SMB_ACL_T hpuxacl_sys_acl_get_file(vfs_handle_struct *handle,
* get the access ACL of a file referred to by a fd
*/
SMB_ACL_T hpuxacl_sys_acl_get_fd(vfs_handle_struct *handle,
- files_struct *fsp,
- int fd)
+ files_struct *fsp)
{
/*
* HPUX doesn't have the facl call. Fake it using the path.... JRA.
*/
/* For all I see, the info should already be in the fsp
* parameter, but get it again to be safe --- necessary? */
- files_struct *file_struct_p = file_find_fd(fd);
+ files_struct *file_struct_p = file_find_fd(fsp->fh->fd);
if (file_struct_p == NULL) {
errno = EBADF;
return NULL;
diff --git a/source3/modules/vfs_irixacl.c b/source3/modules/vfs_irixacl.c
index dab6deb747e..cf536335043 100644
--- a/source3/modules/vfs_irixacl.c
+++ b/source3/modules/vfs_irixacl.c
@@ -32,8 +32,7 @@ SMB_ACL_T irixacl_sys_acl_get_file(vfs_handle_struct *handle,
}
SMB_ACL_T irixacl_sys_acl_get_fd(vfs_handle_struct *handle,
- files_struct *fsp,
- int fd)
+ files_struct *fsp)
{
errno = ENOTSUP;
return NULL;
diff --git a/source3/modules/vfs_posixacl.c b/source3/modules/vfs_posixacl.c
index fb0c0bc8e90..faa5e8e2ad7 100644
--- a/source3/modules/vfs_posixacl.c
+++ b/source3/modules/vfs_posixacl.c
@@ -63,11 +63,10 @@ SMB_ACL_T posixacl_sys_acl_get_file(vfs_handle_struct *handle,
}
SMB_ACL_T posixacl_sys_acl_get_fd(vfs_handle_struct *handle,
- files_struct *fsp,
- int fd)
+ files_struct *fsp)
{
struct smb_acl_t *result;
- acl_t acl = acl_get_fd(fd);
+ acl_t acl = acl_get_fd(fsp->fh->fd);
if (acl == NULL) {
return NULL;
diff --git a/source3/modules/vfs_tru64acl.c b/source3/modules/vfs_tru64acl.c
index 43cae0f8266..ee81ee60213 100644
--- a/source3/modules/vfs_tru64acl.c
+++ b/source3/modules/vfs_tru64acl.c
@@ -67,11 +67,10 @@ SMB_ACL_T tru64acl_sys_acl_get_file(vfs_handle_struct *handle,
}
SMB_ACL_T tru64acl_sys_acl_get_fd(vfs_handle_struct *handle,
- files_struct *fsp,
- int fd)
+ files_struct *fsp)
{
struct smb_acl_t *result;
- acl_t tru64_acl = acl_get_fd(fd, ACL_TYPE_ACCESS);
+ acl_t tru64_acl = acl_get_fd(fsp->fh->fd, ACL_TYPE_ACCESS);
if (tru64_acl == NULL) {
return NULL;
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 1aa30019233..b07033b8ac9 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -3085,7 +3085,7 @@ NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,
}
/* Get the ACL from the fd. */
- posix_acl = SMB_VFS_SYS_ACL_GET_FD(fsp, fsp->fh->fd);
+ posix_acl = SMB_VFS_SYS_ACL_GET_FD(fsp);
pal = fload_inherited_info(fsp);
@@ -3808,13 +3808,13 @@ int fchmod_acl(files_struct *fsp, int fd, mode_t mode)
SMB_ACL_T posix_acl = NULL;
int ret = -1;
- if ((posix_acl = SMB_VFS_SYS_ACL_GET_FD(fsp, fd)) == NULL)
+ if ((posix_acl = SMB_VFS_SYS_ACL_GET_FD(fsp)) == NULL)
return -1;
if ((ret = chmod_acl_internals(conn, posix_acl, mode)) == -1)
goto done;
- ret = SMB_VFS_SYS_ACL_SET_FD(fsp, fd, posix_acl);
+ ret = SMB_VFS_SYS_ACL_SET_FD(fsp, fsp->fh->fd, posix_acl);
done:
@@ -4099,7 +4099,7 @@ static bool remove_posix_acl(connection_struct *conn, files_struct *fsp, const c
/* Get the current file ACL. */
if (fsp && fsp->fh->fd != -1) {
- file_acl = SMB_VFS_SYS_ACL_GET_FD(fsp, fsp->fh->fd);
+ file_acl = SMB_VFS_SYS_ACL_GET_FD(fsp);
} else {
file_acl = SMB_VFS_SYS_ACL_GET_FILE( conn, fname, SMB_ACL_TYPE_ACCESS);
}
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index ab6706aec7b..611f803210a 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -4305,7 +4305,7 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
uint16 num_def_acls = 0;
if (fsp && !fsp->is_directory && (fsp->fh->fd != -1)) {
- file_acl = SMB_VFS_SYS_ACL_GET_FD(fsp, fsp->fh->fd);
+ file_acl = SMB_VFS_SYS_ACL_GET_FD(fsp);
} else {
file_acl = SMB_VFS_SYS_ACL_GET_FILE(conn, fname, SMB_ACL_TYPE_ACCESS);
}