1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source3/modules/vfs_tru64acl.h
David Gajewski 340aff1c8f s3: lib: sysacls: Fix argument numbers for sys_acl_set_fd() for untested OS builds.
In the stable release 4.14.6 the prototype for solarisacl_sys_acl_set_fd()
in s3/modules/vfs_solarisacl.h is listed with 3 arguments, while the code
in s3/modules/vfs_solarisacl.c has 4. This leads to a compile error. The
latter reflects the upcoming release, with code in solarisacl_sys_acl_set_fd()
checking for the type.

The commit was "vfs: add acl type arg to SMB_VFS_SYS_ACL_SET_FD()"
that made the partial change.

A patch mimicking what was done with posixacl_sys_acl_set_fd()
is applied here.

solarisacl_sys_acl_set_fd() is only called from sys_acl_set_fd() in
s3/lib/sysacls.c which in turn is only called by vfswrap_sys_acl_set_fd()
in s3/modules/vfs_default.c when type == SMB_ACL_TYPE_ACCESS.

This patch mimics the call to posixacl_sys_acl_set_fd() by setting
the type argument to SMB_ACL_TYPE_ACCESS for all the affected OS's
that are not tested in ci (tru64 and aix).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14774

Signed-off-by: David Gajewski <dgajews@math.utoledo.edu>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(similar to commit 2867950721)

Autobuild-User(v4-14-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-14-test): Tue Aug 10 12:41:30 UTC 2021 on sn-devel-184
2021-08-10 12:41:30 +00:00

47 lines
1.5 KiB
C

/*
Unix SMB/Netbios implementation.
VFS module to get and set Tru64 acls - prototype header
Copyright (C) Michael Adam 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
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __VFS_TRU64ACL_H__
#define __VFS_TRU64ACL_H__
SMB_ACL_T tru64acl_sys_acl_get_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
SMB_ACL_TYPE_T type);
SMB_ACL_T tru64acl_sys_acl_get_fd(vfs_handle_struct *handle,
files_struct *fsp);
int tru64acl_sys_acl_set_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
SMB_ACL_TYPE_T type,
SMB_ACL_T theacl);
int tru64acl_sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
SMB_ACL_TYPE_T type,
SMB_ACL_T theacl);
int tru64acl_sys_acl_delete_def_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname);
NTSTATUS vfs_tru64acl_init(void);
#endif