summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/vfs.h3
-rw-r--r--source3/include/vfs_macros.h6
-rw-r--r--source3/lib/sysacls.c28
-rw-r--r--source3/modules/vfs_aixacl.c4
-rw-r--r--source3/modules/vfs_aixacl2.c4
-rw-r--r--source3/modules/vfs_default.c4
-rw-r--r--source3/modules/vfs_full_audit.c6
-rw-r--r--source3/modules/vfs_gpfs.c2
-rw-r--r--source3/modules/vfs_hpuxacl.c6
-rw-r--r--source3/modules/vfs_irixacl.c4
-rw-r--r--source3/modules/vfs_posixacl.c4
-rw-r--r--source3/modules/vfs_solarisacl.c8
-rw-r--r--source3/modules/vfs_tru64acl.c6
-rw-r--r--source3/smbd/posix_acls.c10
14 files changed, 48 insertions, 47 deletions
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index abe474f360..f6f7d4fded 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -93,6 +93,7 @@
/* Leave at 22 - not yet released. Remove parameter fd from getlock. - obnox */
/* Leave at 22 - not yet released. Remove parameter fd from sys_acl_get_fd. - obnox */
/* Leave at 22 - not yet released. Remove parameter fd from fchmod_acl. - obnox */
+/* Leave at 22 - not yet released. Remove parameter fd from sys_acl_set_fd. - obnox */
@@ -366,7 +367,7 @@ struct vfs_ops {
int (*sys_acl_set_permset)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset);
int (*sys_acl_valid)(struct vfs_handle_struct *handle, SMB_ACL_T theacl );
int (*sys_acl_set_file)(struct vfs_handle_struct *handle, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
- int (*sys_acl_set_fd)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_ACL_T theacl);
+ int (*sys_acl_set_fd)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_ACL_T theacl);
int (*sys_acl_delete_def_file)(struct vfs_handle_struct *handle, const char *path);
int (*sys_acl_get_perm)(struct vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
int (*sys_acl_free_text)(struct vfs_handle_struct *handle, char *text);
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 3cd4be1760..3b9852a19c 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -109,7 +109,7 @@
#define SMB_VFS_SYS_ACL_SET_PERMSET(conn, entry, permset) ((conn)->vfs.ops.sys_acl_set_permset((conn)->vfs.handles.sys_acl_set_permset, (entry), (permset)))
#define SMB_VFS_SYS_ACL_VALID(conn, theacl) ((conn)->vfs.ops.sys_acl_valid((conn)->vfs.handles.sys_acl_valid, (theacl)))
#define SMB_VFS_SYS_ACL_SET_FILE(conn, name, acltype, theacl) ((conn)->vfs.ops.sys_acl_set_file((conn)->vfs.handles.sys_acl_set_file, (name), (acltype), (theacl)))
-#define SMB_VFS_SYS_ACL_SET_FD(fsp, fd, theacl) ((fsp)->conn->vfs.ops.sys_acl_set_fd((fsp)->conn->vfs.handles.sys_acl_set_fd, (fsp), (fd), (theacl)))
+#define SMB_VFS_SYS_ACL_SET_FD(fsp, theacl) ((fsp)->conn->vfs.ops.sys_acl_set_fd((fsp)->conn->vfs.handles.sys_acl_set_fd, (fsp), (theacl)))
#define SMB_VFS_SYS_ACL_DELETE_DEF_FILE(conn, path) ((conn)->vfs.ops.sys_acl_delete_def_file((conn)->vfs.handles.sys_acl_delete_def_file, (path)))
#define SMB_VFS_SYS_ACL_GET_PERM(conn, permset, perm) ((conn)->vfs.ops.sys_acl_get_perm((conn)->vfs.handles.sys_acl_get_perm, (permset), (perm)))
#define SMB_VFS_SYS_ACL_FREE_TEXT(conn, text) ((conn)->vfs.ops.sys_acl_free_text((conn)->vfs.handles.sys_acl_free_text, (text)))
@@ -228,7 +228,7 @@
#define SMB_VFS_OPAQUE_SYS_ACL_SET_PERMSET(conn, entry, permset) ((conn)->vfs_opaque.ops.sys_acl_set_permset((conn)->vfs_opaque.handles.sys_acl_set_permset, (entry), (permset)))
#define SMB_VFS_OPAQUE_SYS_ACL_VALID(conn, theacl) ((conn)->vfs_opaque.ops.sys_acl_valid((conn)->vfs_opaque.handles.sys_acl_valid, (theacl)))
#define SMB_VFS_OPAQUE_SYS_ACL_SET_FILE(conn, name, acltype, theacl) ((conn)->vfs_opaque.ops.sys_acl_set_file((conn)->vfs_opaque.handles.sys_acl_set_file, (name), (acltype), (theacl)))
-#define SMB_VFS_OPAQUE_SYS_ACL_SET_FD(fsp, fd, theacl) ((fsp)->conn->vfs_opaque.ops.sys_acl_set_fd((fsp)->conn->vfs_opaque.handles.sys_acl_set_fd, (fsp), (fd), (theacl)))
+#define SMB_VFS_OPAQUE_SYS_ACL_SET_FD(fsp, theacl) ((fsp)->conn->vfs_opaque.ops.sys_acl_set_fd((fsp)->conn->vfs_opaque.handles.sys_acl_set_fd, (fsp), (theacl)))
#define SMB_VFS_OPAQUE_SYS_ACL_DELETE_DEF_FILE(conn, path) ((conn)->vfs_opaque.ops.sys_acl_delete_def_file((conn)->vfs_opaque.handles.sys_acl_delete_def_file, (path)))
#define SMB_VFS_OPAQUE_SYS_ACL_GET_PERM(conn, permset, perm) ((conn)->vfs_opaque.ops.sys_acl_get_perm((conn)->vfs_opaque.handles.sys_acl_get_perm, (permset), (perm)))
#define SMB_VFS_OPAQUE_SYS_ACL_FREE_TEXT(conn, text) ((conn)->vfs_opaque.ops.sys_acl_free_text((conn)->vfs_opaque.handles.sys_acl_free_text, (text)))
@@ -348,7 +348,7 @@
#define SMB_VFS_NEXT_SYS_ACL_SET_PERMSET(handle, entry, permset) ((handle)->vfs_next.ops.sys_acl_set_permset((handle)->vfs_next.handles.sys_acl_set_permset, (entry), (permset)))
#define SMB_VFS_NEXT_SYS_ACL_VALID(handle, theacl) ((handle)->vfs_next.ops.sys_acl_valid((handle)->vfs_next.handles.sys_acl_valid, (theacl)))
#define SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, name, acltype, theacl) ((handle)->vfs_next.ops.sys_acl_set_file((handle)->vfs_next.handles.sys_acl_set_file, (name), (acltype), (theacl)))
-#define SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, fd, theacl) ((handle)->vfs_next.ops.sys_acl_set_fd((handle)->vfs_next.handles.sys_acl_set_fd, (fsp), (fd), (theacl)))
+#define SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl) ((handle)->vfs_next.ops.sys_acl_set_fd((handle)->vfs_next.handles.sys_acl_set_fd, (fsp), (theacl)))
#define SMB_VFS_NEXT_SYS_ACL_DELETE_DEF_FILE(handle, path) ((handle)->vfs_next.ops.sys_acl_delete_def_file((handle)->vfs_next.handles.sys_acl_delete_def_file, (path)))
#define SMB_VFS_NEXT_SYS_ACL_GET_PERM(handle, permset, perm) ((handle)->vfs_next.ops.sys_acl_get_perm((handle)->vfs_next.handles.sys_acl_get_perm, (permset), (perm)))
#define SMB_VFS_NEXT_SYS_ACL_FREE_TEXT(handle, text) ((handle)->vfs_next.ops.sys_acl_free_text((handle)->vfs_next.handles.sys_acl_free_text, (text)))
diff --git a/source3/lib/sysacls.c b/source3/lib/sysacls.c
index f23d03f706..9c1256ed65 100644
--- a/source3/lib/sysacls.c
+++ b/source3/lib/sysacls.c
@@ -3,7 +3,7 @@
Samba system utilities for ACL support.
Copyright (C) Jeremy Allison 2000.
Copyright (C) Volker Lendecke 2006
- Copyright (C) Michael Adam 2006
+ Copyright (C) Michael Adam 2006,2008
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -376,9 +376,9 @@ int sys_acl_set_file(vfs_handle_struct *handle,
}
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
- int fd, SMB_ACL_T acl_d)
+ SMB_ACL_T acl_d)
{
- return posixacl_sys_acl_set_fd(handle, fsp, fd, acl_d);
+ return posixacl_sys_acl_set_fd(handle, fsp, acl_d);
}
int sys_acl_delete_def_file(vfs_handle_struct *handle,
@@ -407,9 +407,9 @@ int sys_acl_set_file(vfs_handle_struct *handle,
}
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
- int fd, SMB_ACL_T acl_d)
+ SMB_ACL_T acl_d)
{
- return aixacl_sys_acl_set_fd(handle, fsp, fd, acl_d);
+ return aixacl_sys_acl_set_fd(handle, fsp, acl_d);
}
int sys_acl_delete_def_file(vfs_handle_struct *handle,
@@ -438,9 +438,9 @@ int sys_acl_set_file(vfs_handle_struct *handle,
}
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
- int fd, SMB_ACL_T acl_d)
+ SMB_ACL_T acl_d)
{
- return tru64acl_sys_acl_set_fd(handle, fsp, fd, acl_d);
+ return tru64acl_sys_acl_set_fd(handle, fsp, acl_d);
}
int sys_acl_delete_def_file(vfs_handle_struct *handle,
@@ -469,9 +469,9 @@ int sys_acl_set_file(vfs_handle_struct *handle,
}
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
- int fd, SMB_ACL_T acl_d)
+ SMB_ACL_T acl_d)
{
- return solarisacl_sys_acl_set_fd(handle, fsp, fd, acl_d);
+ return solarisacl_sys_acl_set_fd(handle, fsp, acl_d);
}
int sys_acl_delete_def_file(vfs_handle_struct *handle,
@@ -500,9 +500,9 @@ int sys_acl_set_file(vfs_handle_struct *handle,
}
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
- int fd, SMB_ACL_T acl_d)
+ SMB_ACL_T acl_d)
{
- return hpuxacl_sys_acl_set_fd(handle, fsp, fd, acl_d);
+ return hpuxacl_sys_acl_set_fd(handle, fsp, acl_d);
}
int sys_acl_delete_def_file(vfs_handle_struct *handle,
@@ -531,9 +531,9 @@ int sys_acl_set_file(vfs_handle_struct *handle,
}
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
- int fd, SMB_ACL_T acl_d)
+ SMB_ACL_T acl_d)
{
- return irixacl_sys_acl_set_fd(handle, fsp, fd, acl_d);
+ return irixacl_sys_acl_set_fd(handle, fsp, acl_d);
}
int sys_acl_delete_def_file(vfs_handle_struct *handle,
@@ -577,7 +577,7 @@ int sys_acl_set_file(vfs_handle_struct *handle,
}
int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
- int fd, SMB_ACL_T acl_d)
+ SMB_ACL_T acl_d)
{
#ifdef ENOTSUP
errno = ENOTSUP;
diff --git a/source3/modules/vfs_aixacl.c b/source3/modules/vfs_aixacl.c
index 1a76ed6878..726a7f485e 100644
--- a/source3/modules/vfs_aixacl.c
+++ b/source3/modules/vfs_aixacl.c
@@ -153,7 +153,7 @@ int aixacl_sys_acl_set_file(vfs_handle_struct *handle,
int aixacl_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
- int fd, SMB_ACL_T theacl)
+ SMB_ACL_T theacl)
{
struct acl *file_acl = NULL;
unsigned int rc;
@@ -162,7 +162,7 @@ int aixacl_sys_acl_set_fd(vfs_handle_struct *handle,
if (!file_acl)
return -1;
- rc = fchacl(fd,file_acl,file_acl->acl_len);
+ rc = fchacl(fsp->fh->fd,file_acl,file_acl->acl_len);
DEBUG(10,("errno is %d\n",errno));
DEBUG(10,("return code is %d\n",rc));
SAFE_FREE(file_acl);
diff --git a/source3/modules/vfs_aixacl2.c b/source3/modules/vfs_aixacl2.c
index 42ecb9892c..996adbbdfe 100644
--- a/source3/modules/vfs_aixacl2.c
+++ b/source3/modules/vfs_aixacl2.c
@@ -448,7 +448,7 @@ int aixjfs2_sys_acl_set_file(vfs_handle_struct *handle,
int aixjfs2_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
- int fd, SMB_ACL_T theacl)
+ SMB_ACL_T theacl)
{
struct acl *acl_aixc;
acl_type_t acl_type_info;
@@ -467,7 +467,7 @@ int aixjfs2_sys_acl_set_fd(vfs_handle_struct *handle,
return -1;
rc = aclx_fput(
- fd,
+ fsp->fh->fd,
SET_ACL, /* set only the ACL, not mode bits */
acl_type_info,
acl_aixc,
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index f820d4b3e2..a46c2a336f 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1097,9 +1097,9 @@ static int vfswrap_sys_acl_set_file(vfs_handle_struct *handle, const char *name
return sys_acl_set_file(handle, name, acltype, theacl);
}
-static int vfswrap_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_ACL_T theacl)
+static int vfswrap_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_T theacl)
{
- return sys_acl_set_fd(handle, fsp, fd, theacl);
+ return sys_acl_set_fd(handle, fsp, theacl);
}
static int vfswrap_sys_acl_delete_def_file(vfs_handle_struct *handle, const char *path)
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 4e70879dc2..64c74df1ba 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -250,7 +250,7 @@ static int smb_full_audit_sys_acl_set_file(vfs_handle_struct *handle,
const char *name, SMB_ACL_TYPE_T acltype,
SMB_ACL_T theacl);
static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
- int fd, SMB_ACL_T theacl);
+ SMB_ACL_T theacl);
static int smb_full_audit_sys_acl_delete_def_file(vfs_handle_struct *handle,
const char *path);
static int smb_full_audit_sys_acl_get_perm(vfs_handle_struct *handle,
@@ -1843,11 +1843,11 @@ static int smb_full_audit_sys_acl_set_file(vfs_handle_struct *handle,
}
static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
- int fd, SMB_ACL_T theacl)
+ SMB_ACL_T theacl)
{
int result;
- result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, fd, theacl);
+ result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
do_log(SMB_VFS_OP_SYS_ACL_SET_FD, (result >= 0), handle,
"%s", fsp->fsp_name);
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 714f6e2917..bcf61f3bc7 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -615,7 +615,7 @@ int gpfsacl_sys_acl_set_file(vfs_handle_struct *handle,
int gpfsacl_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
- int fd, SMB_ACL_T theacl)
+ SMB_ACL_T theacl)
{
return gpfsacl_sys_acl_set_file(handle, fsp->fsp_name, SMB_ACL_TYPE_ACCESS, theacl);
}
diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c
index 67fbfe56f6..e101886450 100644
--- a/source3/modules/vfs_hpuxacl.c
+++ b/source3/modules/vfs_hpuxacl.c
@@ -1,7 +1,7 @@
/*
* Unix SMB/Netbios implementation.
* VFS module to get and set HP-UX ACLs
- * Copyright (C) Michael Adam 2006
+ * Copyright (C) Michael Adam 2006,2008
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -306,14 +306,14 @@ int hpuxacl_sys_acl_set_file(vfs_handle_struct *handle,
*/
int hpuxacl_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
- int fd, SMB_ACL_T theacl)
+ SMB_ACL_T theacl)
{
/*
* 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 -1;
diff --git a/source3/modules/vfs_irixacl.c b/source3/modules/vfs_irixacl.c
index cf53633504..6484e8f3eb 100644
--- a/source3/modules/vfs_irixacl.c
+++ b/source3/modules/vfs_irixacl.c
@@ -1,7 +1,7 @@
/*
Unix SMB/Netbios implementation.
VFS module to get and set irix acls
- Copyright (C) Michael Adam 2006
+ Copyright (C) Michael Adam 2006,2008
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -49,7 +49,7 @@ int irixacl_sys_acl_set_file(vfs_handle_struct *handle,
int irixacl_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
- int fd, SMB_ACL_T theacl)
+ SMB_ACL_T theacl)
{
errno = ENOTSUP;
return -1;
diff --git a/source3/modules/vfs_posixacl.c b/source3/modules/vfs_posixacl.c
index faa5e8e2ad..21fb2ada31 100644
--- a/source3/modules/vfs_posixacl.c
+++ b/source3/modules/vfs_posixacl.c
@@ -113,14 +113,14 @@ int posixacl_sys_acl_set_file(vfs_handle_struct *handle,
int posixacl_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
- int fd, SMB_ACL_T theacl)
+ SMB_ACL_T theacl)
{
int res;
acl_t acl = smb_acl_to_posix(theacl);
if (acl == NULL) {
return -1;
}
- res = acl_set_fd(fd, acl);
+ res = acl_set_fd(fsp->fh->fd, acl);
acl_free(acl);
return res;
}
diff --git a/source3/modules/vfs_solarisacl.c b/source3/modules/vfs_solarisacl.c
index cda243f8c1..ce763f07e7 100644
--- a/source3/modules/vfs_solarisacl.c
+++ b/source3/modules/vfs_solarisacl.c
@@ -1,7 +1,7 @@
/*
Unix SMB/Netbios implementation.
VFS module to get and set Solaris ACLs
- Copyright (C) Michael Adam 2006
+ Copyright (C) Michael Adam 2006,2008
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -219,7 +219,7 @@ int solarisacl_sys_acl_set_file(vfs_handle_struct *handle,
*/
int solarisacl_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
- int fd, SMB_ACL_T theacl)
+ SMB_ACL_T theacl)
{
SOLARIS_ACL_T solaris_acl = NULL;
SOLARIS_ACL_T default_acl = NULL;
@@ -242,7 +242,7 @@ int solarisacl_sys_acl_set_fd(vfs_handle_struct *handle,
strerror(errno)));
goto done;
}
- if (!solaris_acl_get_fd(fd, &default_acl, &default_count)) {
+ if (!solaris_acl_get_fd(fsp->fh->fd, &default_acl, &default_count)) {
DEBUG(10, ("error getting (default) acl from fd\n"));
goto done;
}
@@ -258,7 +258,7 @@ int solarisacl_sys_acl_set_fd(vfs_handle_struct *handle,
goto done;
}
- ret = facl(fd, SETACL, count, solaris_acl);
+ ret = facl(fsp->fh->fd, SETACL, count, solaris_acl);
if (ret != 0) {
DEBUG(10, ("call of facl failed (%s).\n", strerror(errno)));
}
diff --git a/source3/modules/vfs_tru64acl.c b/source3/modules/vfs_tru64acl.c
index ee81ee6021..b23a7ddcfa 100644
--- a/source3/modules/vfs_tru64acl.c
+++ b/source3/modules/vfs_tru64acl.c
@@ -1,7 +1,7 @@
/*
Unix SMB/Netbios implementation.
VFS module to get and set Tru64 acls
- Copyright (C) Michael Adam 2006
+ Copyright (C) Michael Adam 2006,2008
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -128,14 +128,14 @@ fail:
int tru64acl_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
- int fd, SMB_ACL_T theacl)
+ SMB_ACL_T theacl)
{
int res;
acl_t tru64_acl = smb_acl_to_tru64_acl(theacl);
if (tru64_acl == NULL) {
return -1;
}
- res = acl_set_fd(fd, ACL_TYPE_ACCESS, tru64_acl);
+ res = acl_set_fd(fsp->fh->fd, ACL_TYPE_ACCESS, tru64_acl);
acl_free(tru64_acl);
return res;
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 23a246fea7..b6cb1d2e54 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -2573,7 +2573,7 @@ static bool set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, bool defau
}
}
} else {
- if (SMB_VFS_SYS_ACL_SET_FD(fsp, fsp->fh->fd, the_acl) == -1) {
+ if (SMB_VFS_SYS_ACL_SET_FD(fsp, the_acl) == -1) {
/*
* Some systems allow all the above calls and only fail with no ACL support
* when attempting to apply the acl. HPUX with HFS is an example of this. JRA.
@@ -2589,7 +2589,7 @@ static bool set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, bool defau
fsp->fsp_name ));
become_root();
- sret = SMB_VFS_SYS_ACL_SET_FD(fsp, fsp->fh->fd, the_acl);
+ sret = SMB_VFS_SYS_ACL_SET_FD(fsp, the_acl);
unbecome_root();
if (sret == 0) {
ret = True;
@@ -3814,7 +3814,7 @@ int fchmod_acl(files_struct *fsp, mode_t mode)
if ((ret = chmod_acl_internals(conn, posix_acl, mode)) == -1)
goto done;
- ret = SMB_VFS_SYS_ACL_SET_FD(fsp, fsp->fh->fd, posix_acl);
+ ret = SMB_VFS_SYS_ACL_SET_FD(fsp, posix_acl);
done:
@@ -4152,7 +4152,7 @@ static bool remove_posix_acl(connection_struct *conn, files_struct *fsp, const c
/* Set the new empty file ACL. */
if (fsp && fsp->fh->fd != -1) {
- if (SMB_VFS_SYS_ACL_SET_FD(fsp, fsp->fh->fd, new_file_acl) == -1) {
+ if (SMB_VFS_SYS_ACL_SET_FD(fsp, new_file_acl) == -1) {
DEBUG(5,("remove_posix_acl: acl_set_file failed on %s (%s)\n",
fname, strerror(errno) ));
goto done;
@@ -4199,7 +4199,7 @@ bool set_unix_posix_acl(connection_struct *conn, files_struct *fsp, const char *
if (fsp && fsp->fh->fd != -1) {
/* The preferred way - use an open fd. */
- if (SMB_VFS_SYS_ACL_SET_FD(fsp, fsp->fh->fd, file_acl) == -1) {
+ if (SMB_VFS_SYS_ACL_SET_FD(fsp, file_acl) == -1) {
DEBUG(5,("set_unix_posix_acl: acl_set_file failed on %s (%s)\n",
fname, strerror(errno) ));
SMB_VFS_SYS_ACL_FREE_ACL(conn, file_acl);