mirror of
https://github.com/samba-team/samba.git
synced 2025-02-12 21:58:10 +03:00
vfs: Fix the FreeBSD build
fd_handle is private now Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jan 25 12:16:11 UTC 2021 on sn-devel-184 (cherry picked from commit da3b00f5511d83bdc347eaff9c031390fea41802)
This commit is contained in:
parent
0fca66858d
commit
99bca25289
@ -169,6 +169,7 @@ static bool zfs_process_smbacl(vfs_handle_struct *handle, files_struct *fsp,
|
|||||||
bool have_special_id = false;
|
bool have_special_id = false;
|
||||||
bool must_add_empty_ace = false;
|
bool must_add_empty_ace = false;
|
||||||
struct zfsacl_config_data *config = NULL;
|
struct zfsacl_config_data *config = NULL;
|
||||||
|
int fd;
|
||||||
|
|
||||||
SMB_VFS_HANDLE_GET_DATA(handle, config,
|
SMB_VFS_HANDLE_GET_DATA(handle, config,
|
||||||
struct zfsacl_config_data,
|
struct zfsacl_config_data,
|
||||||
@ -235,8 +236,9 @@ static bool zfs_process_smbacl(vfs_handle_struct *handle, files_struct *fsp,
|
|||||||
SMB_ASSERT(i == naces);
|
SMB_ASSERT(i == naces);
|
||||||
|
|
||||||
/* store acl */
|
/* store acl */
|
||||||
if (fsp->fh->fd != -1) {
|
fd = fsp_get_io_fd(fsp);
|
||||||
rv = facl(fsp->fh->fd, ACE_SETACL, naces, acebuf);
|
if (fd != -1) {
|
||||||
|
rv = facl(fd, ACE_SETACL, naces, acebuf);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rv = acl(fsp->fsp_name->base_name, ACE_SETACL, naces, acebuf);
|
rv = acl(fsp->fsp_name->base_name, ACE_SETACL, naces, acebuf);
|
||||||
@ -319,12 +321,14 @@ static int fget_zfsacl(TALLOC_CTX *mem_ctx,
|
|||||||
{
|
{
|
||||||
int naces, rv;
|
int naces, rv;
|
||||||
ace_t *acebuf = NULL;
|
ace_t *acebuf = NULL;
|
||||||
|
int fd;
|
||||||
|
|
||||||
if (fsp->fh->fd == -1) {
|
fd = fsp_get_io_fd(fsp);
|
||||||
|
if (fd == -1) {
|
||||||
return get_zfsacl(mem_ctx, fsp->fsp_name, outbuf);
|
return get_zfsacl(mem_ctx, fsp->fsp_name, outbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
naces = facl(fsp->fh->fd, ACE_GETACLCNT, 0, NULL);
|
naces = facl(fd, ACE_GETACLCNT, 0, NULL);
|
||||||
if (naces == -1) {
|
if (naces == -1) {
|
||||||
int dbg_level = 10;
|
int dbg_level = 10;
|
||||||
|
|
||||||
@ -342,7 +346,7 @@ static int fget_zfsacl(TALLOC_CTX *mem_ctx,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = facl(fsp->fh->fd, ACE_GETACL, naces, acebuf);
|
rv = facl(fd, ACE_GETACL, naces, acebuf);
|
||||||
if (rv == -1) {
|
if (rv == -1) {
|
||||||
DBG_DEBUG("acl(ACE_GETACL, %s): %s ",
|
DBG_DEBUG("acl(ACE_GETACL, %s): %s ",
|
||||||
fsp_str_dbg(fsp), strerror(errno));
|
fsp_str_dbg(fsp), strerror(errno));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user