static size_t afs_to_nt_acl_common(struct afs_acl *afs_acl,
SMB_STRUCT_STAT *psbuf,
uint32 security_info,
+ TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
struct security_ace *nt_ace_list;
struct security_acl *psa = NULL;
int good_aces;
size_t sd_size;
- TALLOC_CTX *mem_ctx = talloc_tos();
struct afs_ace *afs_ace;
struct connection_struct *conn,
struct smb_filename *smb_fname,
uint32 security_info,
+ TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
int ret;
}
return afs_to_nt_acl_common(afs_acl, &smb_fname->st, security_info,
- ppdesc);
+ mem_ctx, ppdesc);
}
static size_t afs_fto_nt_acl(struct afs_acl *afs_acl,
struct files_struct *fsp,
uint32 security_info,
+ TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
SMB_STRUCT_STAT sbuf;
if (fsp->fh->fd == -1) {
/* Get the stat struct for the owner info. */
return afs_to_nt_acl(afs_acl, fsp->conn, fsp->fsp_name,
- security_info, ppdesc);
+ security_info, mem_ctx, ppdesc);
}
if(SMB_VFS_FSTAT(fsp, &sbuf) != 0) {
static NTSTATUS afsacl_fget_nt_acl(struct vfs_handle_struct *handle,
struct files_struct *fsp,
uint32 security_info,
+ TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
struct afs_acl acl;
return NT_STATUS_ACCESS_DENIED;
}
- sd_size = afs_fto_nt_acl(&acl, fsp, security_info, ppdesc);
+ sd_size = afs_fto_nt_acl(&acl, fsp, security_info, mem_ctx, ppdesc);
free_afs_acl(&acl);
}
static NTSTATUS afsacl_get_nt_acl(struct vfs_handle_struct *handle,
- const char *name, uint32 security_info,
+ const char *name, uint32 security_info,
+ TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
struct afs_acl acl;
}
sd_size = afs_to_nt_acl(&acl, handle->conn, smb_fname, security_info,
- ppdesc);
+ mem_ctx, ppdesc);
TALLOC_FREE(smb_fname);
free_afs_acl(&acl);