{
uint32_t magic;
SMB_ACE4PROP_T prop;
- void *next;
+ struct _SMB_ACE4_INT_T *next;
} SMB_ACE4_INT_T;
#define SMB_ACL4_INT_MAGIC 0x29A3E792
return nfs4_ace_flags;
}
-static SMB_ACL4_INT_T *get_validated_aclint(SMB4ACL_T *theacl)
+static SMB_ACL4_INT_T *get_validated_aclint(struct SMB4ACL_T *theacl)
{
SMB_ACL4_INT_T *aclint = (SMB_ACL4_INT_T *)theacl;
if (theacl==NULL)
return aceint;
}
-SMB4ACL_T *smb_create_smb4acl(TALLOC_CTX *mem_ctx)
+struct SMB4ACL_T *smb_create_smb4acl(TALLOC_CTX *mem_ctx)
{
SMB_ACL4_INT_T *theacl = (SMB_ACL4_INT_T *)TALLOC_ZERO_SIZE(
mem_ctx, sizeof(SMB_ACL4_INT_T));
theacl->magic = SMB_ACL4_INT_MAGIC;
theacl->controlflags = SEC_DESC_SELF_RELATIVE;
/* theacl->first, last = NULL not needed */
- return (SMB4ACL_T *)theacl;
+ return (struct SMB4ACL_T *)theacl;
}
-SMB4ACE_T *smb_add_ace4(SMB4ACL_T *theacl, SMB_ACE4PROP_T *prop)
+SMB4ACE_T *smb_add_ace4(struct SMB4ACL_T *theacl, SMB_ACE4PROP_T *prop)
{
SMB_ACL4_INT_T *aclint = get_validated_aclint(theacl);
SMB_ACE4_INT_T *ace;
return (SMB4ACE_T *)aceint->next;
}
-SMB4ACE_T *smb_first_ace4(SMB4ACL_T *theacl)
+SMB4ACE_T *smb_first_ace4(struct SMB4ACL_T *theacl)
{
SMB_ACL4_INT_T *aclint = get_validated_aclint(theacl);
if (aclint==NULL)
return (SMB4ACE_T *)aclint->first;
}
-uint32_t smb_get_naces(SMB4ACL_T *theacl)
+uint32_t smb_get_naces(struct SMB4ACL_T *theacl)
{
SMB_ACL4_INT_T *aclint = get_validated_aclint(theacl);
if (aclint==NULL)
return aclint->naces;
}
-uint16_t smbacl4_get_controlflags(SMB4ACL_T *theacl)
+uint16_t smbacl4_get_controlflags(struct SMB4ACL_T *theacl)
{
SMB_ACL4_INT_T *aclint = get_validated_aclint(theacl);
if (aclint==NULL)
return aclint->controlflags;
}
-bool smbacl4_set_controlflags(SMB4ACL_T *theacl, uint16_t controlflags)
+bool smbacl4_set_controlflags(struct SMB4ACL_T *theacl, uint16_t controlflags)
{
SMB_ACL4_INT_T *aclint = get_validated_aclint(theacl);
if (aclint==NULL)
static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx,
smbacl4_vfs_params *params,
- SMB4ACL_T *theacl, /* in */
+ struct SMB4ACL_T *theacl, /* in */
struct dom_sid *psid_owner, /* in */
struct dom_sid *psid_group, /* in */
bool is_directory, /* in */
uint32_t security_info,
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc,
- SMB4ACL_T *theacl)
+ struct SMB4ACL_T *theacl)
{
int good_aces = 0;
struct dom_sid sid_owner, sid_group;
uint32_t security_info,
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc,
- SMB4ACL_T *theacl)
+ struct SMB4ACL_T *theacl)
{
SMB_STRUCT_STAT sbuf;
smbacl4_vfs_params params;
uint32_t security_info,
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc,
- SMB4ACL_T *theacl)
+ struct SMB4ACL_T *theacl)
{
SMB_STRUCT_STAT sbuf;
smbacl4_vfs_params params;
mem_ctx, ppdesc, theacl);
}
-static void smbacl4_dump_nfs4acl(int level, SMB4ACL_T *theacl)
+static void smbacl4_dump_nfs4acl(int level, struct SMB4ACL_T *theacl)
{
SMB_ACL4_INT_T *aclint = get_validated_aclint(theacl);
SMB_ACE4_INT_T *aceint;
* return ace if found matching; otherwise NULL
*/
static SMB_ACE4PROP_T *smbacl4_find_equal_special(
- SMB4ACL_T *theacl,
+ struct SMB4ACL_T *theacl,
SMB_ACE4PROP_T *aceNew)
{
SMB_ACL4_INT_T *aclint = get_validated_aclint(theacl);
static int smbacl4_MergeIgnoreReject(
enum smbacl4_acedup_enum acedup,
- SMB4ACL_T *theacl, /* may modify it */
+ struct SMB4ACL_T *theacl, /* may modify it */
SMB_ACE4PROP_T *ace, /* the "new" ACE */
bool *paddNewACE,
int i
}
static int smbacl4_substitute_special(
- SMB4ACL_T *theacl,
+ struct SMB4ACL_T *theacl,
uid_t ownerUID,
gid_t ownerGID
)
}
static int smbacl4_substitute_simple(
- SMB4ACL_T *theacl,
+ struct SMB4ACL_T *theacl,
uid_t ownerUID,
gid_t ownerGID
)
return true; /* OK */
}
-static SMB4ACL_T *smbacl4_win2nfs4(
+static struct SMB4ACL_T *smbacl4_win2nfs4(
TALLOC_CTX *mem_ctx,
const files_struct *fsp,
const struct security_acl *dacl,
gid_t ownerGID
)
{
- SMB4ACL_T *theacl;
+ struct SMB4ACL_T *theacl;
uint32_t i;
const char *filename = fsp->fsp_name->base_name;
set_nfs4acl_native_fn_t set_nfs4_native)
{
smbacl4_vfs_params params;
- SMB4ACL_T *theacl = NULL;
+ struct SMB4ACL_T *theacl = NULL;
bool result;
SMB_STRUCT_STAT sbuf;
* Never allocate these structures on your own
* use create_smb4acl instead
*/
-typedef struct _SMB4ACL_T {char dontuse;} SMB4ACL_T;
+struct SMB4ACL_T;
typedef struct _SMB4ACE_T {char dontuse;} SMB4ACE_T;
-SMB4ACL_T *smb_create_smb4acl(TALLOC_CTX *mem_ctx);
+struct SMB4ACL_T *smb_create_smb4acl(TALLOC_CTX *mem_ctx);
/* prop's contents are copied */
/* it doesn't change the order, appends */
-SMB4ACE_T *smb_add_ace4(SMB4ACL_T *theacl, SMB_ACE4PROP_T *prop);
+SMB4ACE_T *smb_add_ace4(struct SMB4ACL_T *theacl, SMB_ACE4PROP_T *prop);
SMB_ACE4PROP_T *smb_get_ace4(SMB4ACE_T *ace);
/* Returns NULL if none - or error */
-SMB4ACE_T *smb_first_ace4(SMB4ACL_T *theacl);
+SMB4ACE_T *smb_first_ace4(struct SMB4ACL_T *theacl);
/* Returns NULL in the end - or error */
SMB4ACE_T *smb_next_ace4(SMB4ACE_T *ace);
-uint32_t smb_get_naces(SMB4ACL_T *theacl);
+uint32_t smb_get_naces(struct SMB4ACL_T *theacl);
-uint16_t smbacl4_get_controlflags(SMB4ACL_T *theacl);
+uint16_t smbacl4_get_controlflags(struct SMB4ACL_T *theacl);
-bool smbacl4_set_controlflags(SMB4ACL_T *theacl, uint16_t controlflags);
+bool smbacl4_set_controlflags(struct SMB4ACL_T *theacl, uint16_t controlflags);
NTSTATUS smb_fget_nt_acl_nfs4(files_struct *fsp,
uint32_t security_info,
TALLOC_CTX *mem_ctx,
- struct security_descriptor **ppdesc, SMB4ACL_T *theacl);
+ struct security_descriptor **ppdesc, struct SMB4ACL_T *theacl);
NTSTATUS smb_get_nt_acl_nfs4(connection_struct *conn,
const char *name,
uint32_t security_info,
TALLOC_CTX *mem_ctx,
- struct security_descriptor **ppdesc, SMB4ACL_T *theacl);
+ struct security_descriptor **ppdesc, struct SMB4ACL_T *theacl);
/* Callback function needed to set the native acl
* when applicable */
-typedef bool (*set_nfs4acl_native_fn_t)(vfs_handle_struct *handle, files_struct *, SMB4ACL_T *);
+typedef bool (*set_nfs4acl_native_fn_t)(vfs_handle_struct *handle,
+ files_struct *,
+ struct SMB4ACL_T *);
NTSTATUS smb_set_nt_acl_nfs4(vfs_handle_struct *handle, files_struct *fsp,
uint32_t security_info_sent,
}
static bool aixjfs2_get_nfs4_acl(TALLOC_CTX *mem_ctx, const char *name,
- SMB4ACL_T **ppacl, bool *pretryPosix)
+ struct SMB4ACL_T **ppacl, bool *pretryPosix)
{
int32_t i;
struct security_descriptor **ppdesc)
{
NTSTATUS status;
- SMB4ACL_T *pacl = NULL;
+ struct SMB4ACL_T *pacl = NULL;
bool result;
bool retryPosix = False;
TALLOC_CTX *frame = talloc_stackframe();
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
- SMB4ACL_T *pacl = NULL;
+ struct SMB4ACL_T *pacl = NULL;
bool result;
bool retryPosix = False;
static int aixjfs2_sys_acl_blob_get_file(vfs_handle_struct *handle, const char *path_p, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob)
{
- SMB4ACL_T *pacl = NULL;
+ struct SMB4ACL_T *pacl = NULL;
bool result;
bool retryPosix = False;
static int aixjfs2_sys_acl_blob_get_fd(vfs_handle_struct *handle, files_struct *fsp, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob)
{
- SMB4ACL_T *pacl = NULL;
+ struct SMB4ACL_T *pacl = NULL;
bool result;
bool retryPosix = False;
return 1; /* haven't found that ACL type. */
}
-static bool aixjfs2_process_smbacl(vfs_handle_struct *handle, files_struct *fsp, SMB4ACL_T *smbacl)
+static bool aixjfs2_process_smbacl(vfs_handle_struct *handle,
+ files_struct *fsp,
+ struct SMB4ACL_T *smbacl)
{
SMB4ACE_T *smbace;
TALLOC_CTX *mem_ctx;
* On failure returns -1 if there is system (GPFS) error, check errno.
* Returns 0 on success
*/
-static int gpfs_get_nfs4_acl(TALLOC_CTX *mem_ctx, const char *fname, SMB4ACL_T **ppacl)
+static int gpfs_get_nfs4_acl(TALLOC_CTX *mem_ctx, const char *fname,
+ struct SMB4ACL_T **ppacl)
{
gpfs_aclCount_t i;
struct gpfs_acl *gacl = NULL;
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
- SMB4ACL_T *pacl = NULL;
+ struct SMB4ACL_T *pacl = NULL;
int result;
struct gpfs_config_data *config;
TALLOC_CTX *frame = talloc_stackframe();
uint32_t security_info,
TALLOC_CTX *mem_ctx, struct security_descriptor **ppdesc)
{
- SMB4ACL_T *pacl = NULL;
+ struct SMB4ACL_T *pacl = NULL;
int result;
struct gpfs_config_data *config;
TALLOC_CTX *frame = talloc_stackframe();
static struct gpfs_acl *vfs_gpfs_smbacl2gpfsacl(TALLOC_CTX *mem_ctx,
files_struct *fsp,
- SMB4ACL_T *smbacl,
+ struct SMB4ACL_T *smbacl,
bool controlflags)
{
struct gpfs_acl *gacl;
static bool gpfsacl_process_smbacl(vfs_handle_struct *handle,
files_struct *fsp,
- SMB4ACL_T *smbacl)
+ struct SMB4ACL_T *smbacl)
{
int ret;
struct gpfs_acl *gacl;
static int gpfsacl_emu_chmod(vfs_handle_struct *handle,
const char *path, mode_t mode)
{
- SMB4ACL_T *pacl = NULL;
+ struct SMB4ACL_T *pacl = NULL;
int result;
bool haveAllowEntry[SMB_ACE4_WHO_EVERYONE + 1] = {False, False, False, False};
int i;
static NTSTATUS nfs4_get_nfs4_acl_common(TALLOC_CTX *mem_ctx,
DATA_BLOB *blob,
- SMB4ACL_T **ppacl)
+ struct SMB4ACL_T **ppacl)
{
int i;
struct nfs4acl *nfs4acl = NULL;
- SMB4ACL_T *pacl = NULL;
+ struct SMB4ACL_T *pacl = NULL;
TALLOC_CTX *frame = talloc_stackframe();
nfs4acl = nfs4acl_blob2acl(blob, frame);
/* Fetch the NFSv4 ACL from the xattr, and convert into Samba's internal NFSv4 format */
static NTSTATUS nfs4_fget_nfs4_acl(vfs_handle_struct *handle, TALLOC_CTX *mem_ctx,
- files_struct *fsp, SMB4ACL_T **ppacl)
+ files_struct *fsp, struct SMB4ACL_T **ppacl)
{
NTSTATUS status;
DATA_BLOB blob = data_blob_null;
/* Fetch the NFSv4 ACL from the xattr, and convert into Samba's internal NFSv4 format */
static NTSTATUS nfs4_get_nfs4_acl(vfs_handle_struct *handle, TALLOC_CTX *mem_ctx,
- const char *path, SMB4ACL_T **ppacl)
+ const char *path, struct SMB4ACL_T **ppacl)
{
NTSTATUS status;
DATA_BLOB blob = data_blob_null;
}
static bool nfs4acl_smb4acl2nfs4acl(TALLOC_CTX *mem_ctx,
- SMB4ACL_T *smbacl,
+ struct SMB4ACL_T *smbacl,
struct nfs4acl **pnfs4acl,
bool denymissingspecial)
{
static bool nfs4acl_xattr_set_smb4acl(vfs_handle_struct *handle,
const char *path,
- SMB4ACL_T *smbacl)
+ struct SMB4ACL_T *smbacl)
{
TALLOC_CTX *frame = talloc_stackframe();
struct nfs4acl *nfs4acl;
/* call-back function processing the NT acl -> NFS4 acl using NFSv4 conv. */
static bool nfs4acl_xattr_fset_smb4acl(vfs_handle_struct *handle,
files_struct *fsp,
- SMB4ACL_T *smbacl)
+ struct SMB4ACL_T *smbacl)
{
TALLOC_CTX *frame = talloc_stackframe();
struct nfs4acl *nfs4acl;
nfs4acl_xattr_fset_smb4acl);
}
-static SMB4ACL_T *nfs4acls_defaultacl(TALLOC_CTX *mem_ctx)
+static struct SMB4ACL_T *nfs4acls_defaultacl(TALLOC_CTX *mem_ctx)
{
- SMB4ACL_T *pacl = NULL;
+ struct SMB4ACL_T *pacl = NULL;
SMB4ACE_T *pace;
SMB_ACE4PROP_T ace = {
.flags = SMB_ACE4_ID_SPECIAL,
*
* Todo: Really use mem_ctx after fixing interface of nfs4_acls
*/
-static SMB4ACL_T *nfs4acls_inheritacl(vfs_handle_struct *handle,
+static struct SMB4ACL_T *nfs4acls_inheritacl(vfs_handle_struct *handle,
const char *path,
TALLOC_CTX *mem_ctx)
{
char *parent_dir = NULL;
- SMB4ACL_T *pparentacl = NULL;
- SMB4ACL_T *pchildacl = NULL;
+ struct SMB4ACL_T *pparentacl = NULL;
+ struct SMB4ACL_T *pchildacl = NULL;
SMB4ACE_T *pace;
SMB_ACE4PROP_T ace;
bool isdir;
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
- SMB4ACL_T *pacl;
+ struct SMB4ACL_T *pacl;
NTSTATUS status;
TALLOC_CTX *frame = talloc_stackframe();
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
- SMB4ACL_T *pacl;
+ struct SMB4ACL_T *pacl;
NTSTATUS status;
TALLOC_CTX *frame = talloc_stackframe();
*/
static NTSTATUS zfs_get_nt_acl_common(TALLOC_CTX *mem_ctx,
const char *name,
- SMB4ACL_T **ppacl)
+ struct SMB4ACL_T **ppacl)
{
int naces, i;
ace_t *acebuf;
- SMB4ACL_T *pacl;
+ struct SMB4ACL_T *pacl;
/* read the number of file aces */
if((naces = acl(name, ACE_GETACLCNT, 0, NULL)) == -1) {
}
/* call-back function processing the NT acl -> ZFS acl using NFSv4 conv. */
-static bool zfs_process_smbacl(vfs_handle_struct *handle, files_struct *fsp, SMB4ACL_T *smbacl)
+static bool zfs_process_smbacl(vfs_handle_struct *handle, files_struct *fsp,
+ struct SMB4ACL_T *smbacl)
{
int naces = smb_get_naces(smbacl), i;
ace_t *acebuf;
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
- SMB4ACL_T *pacl;
+ struct SMB4ACL_T *pacl;
NTSTATUS status;
TALLOC_CTX *frame = talloc_stackframe();
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
- SMB4ACL_T *pacl;
+ struct SMB4ACL_T *pacl;
NTSTATUS status;
TALLOC_CTX *frame = talloc_stackframe();