mirror of
https://github.com/samba-team/samba.git
synced 2025-02-25 17:57:42 +03:00
s3-secdesc: remove "typedef struct security_acl SEC_ACL".
Guenther
This commit is contained in:
parent
a8b01d1f3b
commit
8951c8301a
@ -524,7 +524,7 @@ char *get_sec_mask_str(TALLOC_CTX *ctx, uint32 type);
|
||||
void display_sec_access(uint32_t *info);
|
||||
void display_sec_ace_flags(uint8_t flags);
|
||||
void display_sec_ace(struct security_ace *ace);
|
||||
void display_sec_acl(SEC_ACL *sec_acl);
|
||||
void display_sec_acl(struct security_acl *sec_acl);
|
||||
void display_acl_type(uint16 type);
|
||||
void display_sec_desc(SEC_DESC *sec);
|
||||
|
||||
@ -699,7 +699,7 @@ SEC_DESC *make_sec_desc(TALLOC_CTX *ctx,
|
||||
enum security_descriptor_revision revision,
|
||||
uint16 type,
|
||||
const DOM_SID *owner_sid, const DOM_SID *grp_sid,
|
||||
SEC_ACL *sacl, SEC_ACL *dacl, size_t *sd_size);
|
||||
struct security_acl *sacl, struct security_acl *dacl, size_t *sd_size);
|
||||
SEC_DESC *dup_sec_desc(TALLOC_CTX *ctx, const SEC_DESC *src);
|
||||
NTSTATUS marshall_sec_desc(TALLOC_CTX *mem_ctx,
|
||||
struct security_descriptor *secdesc,
|
||||
@ -712,7 +712,7 @@ NTSTATUS unmarshall_sec_desc(TALLOC_CTX *mem_ctx, uint8 *data, size_t len,
|
||||
NTSTATUS unmarshall_sec_desc_buf(TALLOC_CTX *mem_ctx, uint8_t *data, size_t len,
|
||||
struct sec_desc_buf **psecdesc_buf);
|
||||
SEC_DESC *make_standard_sec_desc(TALLOC_CTX *ctx, const DOM_SID *owner_sid, const DOM_SID *grp_sid,
|
||||
SEC_ACL *dacl, size_t *sd_size);
|
||||
struct security_acl *dacl, size_t *sd_size);
|
||||
struct sec_desc_buf *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, SEC_DESC *sec_desc);
|
||||
struct sec_desc_buf *dup_sec_desc_buf(TALLOC_CTX *ctx, struct sec_desc_buf *src);
|
||||
NTSTATUS sec_desc_add_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, uint32 mask, size_t *sd_size);
|
||||
|
@ -67,12 +67,6 @@
|
||||
PROTECTED_SACL_SECURITY_INFORMATION|\
|
||||
PROTECTED_DACL_SECURITY_INFORMATION)
|
||||
|
||||
#ifndef _SEC_ACL
|
||||
/* SEC_ACL */
|
||||
typedef struct security_acl SEC_ACL;
|
||||
#define _SEC_ACL
|
||||
#endif
|
||||
|
||||
#ifndef SEC_DESC_REVISION
|
||||
#define SEC_DESC_REVISION 0x1
|
||||
#endif
|
||||
|
@ -67,7 +67,7 @@ struct sec_desc_buf *sec_desc_merge_buf(TALLOC_CTX *ctx, struct sec_desc_buf *ne
|
||||
{
|
||||
DOM_SID *owner_sid, *group_sid;
|
||||
struct sec_desc_buf *return_sdb;
|
||||
SEC_ACL *dacl, *sacl;
|
||||
struct security_acl *dacl, *sacl;
|
||||
SEC_DESC *psd = NULL;
|
||||
uint16 secdesc_type;
|
||||
size_t secdesc_size;
|
||||
@ -111,7 +111,7 @@ struct sec_desc_buf *sec_desc_merge_buf(TALLOC_CTX *ctx, struct sec_desc_buf *ne
|
||||
SEC_DESC *sec_desc_merge(TALLOC_CTX *ctx, SEC_DESC *new_sdb, SEC_DESC *old_sdb)
|
||||
{
|
||||
DOM_SID *owner_sid, *group_sid;
|
||||
SEC_ACL *dacl, *sacl;
|
||||
struct security_acl *dacl, *sacl;
|
||||
SEC_DESC *psd = NULL;
|
||||
uint16 secdesc_type;
|
||||
size_t secdesc_size;
|
||||
@ -157,7 +157,7 @@ SEC_DESC *make_sec_desc(TALLOC_CTX *ctx,
|
||||
enum security_descriptor_revision revision,
|
||||
uint16 type,
|
||||
const DOM_SID *owner_sid, const DOM_SID *grp_sid,
|
||||
SEC_ACL *sacl, SEC_ACL *dacl, size_t *sd_size)
|
||||
struct security_acl *sacl, struct security_acl *dacl, size_t *sd_size)
|
||||
{
|
||||
SEC_DESC *dst;
|
||||
uint32 offset = 0;
|
||||
@ -365,7 +365,7 @@ NTSTATUS unmarshall_sec_desc_buf(TALLOC_CTX *mem_ctx, uint8_t *data, size_t len,
|
||||
********************************************************************/
|
||||
|
||||
SEC_DESC *make_standard_sec_desc(TALLOC_CTX *ctx, const DOM_SID *owner_sid, const DOM_SID *grp_sid,
|
||||
SEC_ACL *dacl, size_t *sd_size)
|
||||
struct security_acl *dacl, size_t *sd_size)
|
||||
{
|
||||
return make_sec_desc(ctx, SECURITY_DESCRIPTOR_REVISION_1,
|
||||
SEC_DESC_SELF_RELATIVE, owner_sid, grp_sid, NULL,
|
||||
@ -412,7 +412,7 @@ struct sec_desc_buf *dup_sec_desc_buf(TALLOC_CTX *ctx, struct sec_desc_buf *src)
|
||||
NTSTATUS sec_desc_add_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, uint32 mask, size_t *sd_size)
|
||||
{
|
||||
SEC_DESC *sd = 0;
|
||||
SEC_ACL *dacl = 0;
|
||||
struct security_acl *dacl = 0;
|
||||
struct security_ace *ace = 0;
|
||||
NTSTATUS status;
|
||||
|
||||
@ -464,7 +464,7 @@ NTSTATUS sec_desc_mod_sid(SEC_DESC *sd, DOM_SID *sid, uint32 mask)
|
||||
NTSTATUS sec_desc_del_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, size_t *sd_size)
|
||||
{
|
||||
SEC_DESC *sd = 0;
|
||||
SEC_ACL *dacl = 0;
|
||||
struct security_acl *dacl = 0;
|
||||
struct security_ace *ace = 0;
|
||||
NTSTATUS status;
|
||||
|
||||
@ -521,7 +521,7 @@ static bool is_inheritable_ace(const struct security_ace *ace,
|
||||
bool sd_has_inheritable_components(const SEC_DESC *parent_ctr, bool container)
|
||||
{
|
||||
unsigned int i;
|
||||
const SEC_ACL *the_acl = parent_ctr->dacl;
|
||||
const struct security_acl *the_acl = parent_ctr->dacl;
|
||||
|
||||
for (i = 0; i < the_acl->num_aces; i++) {
|
||||
const struct security_ace *ace = &the_acl->aces[i];
|
||||
@ -545,7 +545,7 @@ NTSTATUS se_create_child_secdesc(TALLOC_CTX *ctx,
|
||||
const DOM_SID *group_sid,
|
||||
bool container)
|
||||
{
|
||||
SEC_ACL *new_dacl = NULL, *the_acl = NULL;
|
||||
struct security_acl *new_dacl = NULL, *the_acl = NULL;
|
||||
struct security_ace *new_ace_list = NULL;
|
||||
unsigned int new_ace_list_ndx = 0, i;
|
||||
|
||||
|
@ -229,7 +229,7 @@ SEC_DESC *get_share_security_default( TALLOC_CTX *ctx, size_t *psize, uint32 def
|
||||
{
|
||||
uint32_t sa;
|
||||
struct security_ace ace;
|
||||
SEC_ACL *psa = NULL;
|
||||
struct security_acl *psa = NULL;
|
||||
SEC_DESC *psd = NULL;
|
||||
uint32 spec_access = def_access;
|
||||
|
||||
@ -436,7 +436,7 @@ bool parse_usershare_acl(TALLOC_CTX *ctx, const char *acl_str, SEC_DESC **ppsd)
|
||||
const char *pacl = acl_str;
|
||||
int num_aces = 0;
|
||||
struct security_ace *ace_list = NULL;
|
||||
SEC_ACL *psa = NULL;
|
||||
struct security_acl *psa = NULL;
|
||||
SEC_DESC *psd = NULL;
|
||||
size_t sd_size = 0;
|
||||
int i;
|
||||
|
@ -173,7 +173,7 @@ static void ads_disp_ace(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, struct security_a
|
||||
}
|
||||
|
||||
/* display ACL */
|
||||
static void ads_disp_acl(SEC_ACL *sec_acl, const char *type)
|
||||
static void ads_disp_acl(struct security_acl *sec_acl, const char *type)
|
||||
{
|
||||
if (!sec_acl)
|
||||
printf("------- (%s) ACL not present\n", type);
|
||||
|
@ -694,7 +694,7 @@ static WERROR gp_reg_generate_sd(TALLOC_CTX *mem_ctx,
|
||||
struct security_ace ace[6];
|
||||
uint32_t mask;
|
||||
|
||||
SEC_ACL *theacl = NULL;
|
||||
struct security_acl *theacl = NULL;
|
||||
|
||||
uint8_t inherit_flags;
|
||||
|
||||
|
@ -141,7 +141,7 @@ ace_compare(struct security_ace *ace1,
|
||||
|
||||
|
||||
static void
|
||||
sort_acl(SEC_ACL *the_acl)
|
||||
sort_acl(struct security_acl *the_acl)
|
||||
{
|
||||
uint32 i;
|
||||
if (!the_acl) return;
|
||||
@ -386,13 +386,13 @@ done:
|
||||
return true;
|
||||
}
|
||||
|
||||
/* add an struct security_ace to a list of struct security_aces in a SEC_ACL */
|
||||
/* add an struct security_ace to a list of struct security_aces in a struct security_acl */
|
||||
static bool
|
||||
add_ace(SEC_ACL **the_acl,
|
||||
add_ace(struct security_acl **the_acl,
|
||||
struct security_ace *ace,
|
||||
TALLOC_CTX *ctx)
|
||||
{
|
||||
SEC_ACL *newacl;
|
||||
struct security_acl *newacl;
|
||||
struct security_ace *aces;
|
||||
|
||||
if (! *the_acl) {
|
||||
@ -428,7 +428,7 @@ sec_desc_parse(TALLOC_CTX *ctx,
|
||||
size_t sd_size;
|
||||
DOM_SID *group_sid=NULL;
|
||||
DOM_SID *owner_sid=NULL;
|
||||
SEC_ACL *dacl=NULL;
|
||||
struct security_acl *dacl=NULL;
|
||||
int revision=1;
|
||||
|
||||
while (next_token_talloc(ctx, &p, &tok, "\t,\r\n")) {
|
||||
@ -1502,7 +1502,7 @@ cacl_set(SMBCCTX *context,
|
||||
uint16_t fnum = (uint16_t)-1;
|
||||
int err = 0;
|
||||
SEC_DESC *sd = NULL, *old;
|
||||
SEC_ACL *dacl = NULL;
|
||||
struct security_acl *dacl = NULL;
|
||||
DOM_SID *owner_sid = NULL;
|
||||
DOM_SID *group_sid = NULL;
|
||||
uint32 i, j;
|
||||
|
@ -296,7 +296,7 @@ static NTSTATUS smb_get_nt_acl_nfs4_common(const SMB_STRUCT_STAT *sbuf,
|
||||
DOM_SID sid_owner, sid_group;
|
||||
size_t sd_size = 0;
|
||||
struct security_ace *nt_ace_list = NULL;
|
||||
SEC_ACL *psa = NULL;
|
||||
struct security_acl *psa = NULL;
|
||||
TALLOC_CTX *mem_ctx = talloc_tos();
|
||||
|
||||
if (theacl==NULL || smb_get_naces(theacl)==0)
|
||||
@ -675,7 +675,7 @@ static int smbacl4_MergeIgnoreReject(
|
||||
|
||||
static SMB4ACL_T *smbacl4_win2nfs4(
|
||||
const char *filename,
|
||||
const SEC_ACL *dacl,
|
||||
const struct security_acl *dacl,
|
||||
smbacl4_vfs_params *pparams,
|
||||
uid_t ownerUID,
|
||||
gid_t ownerGID
|
||||
|
@ -232,10 +232,10 @@ onefs_samba_ace_to_ace(struct security_ace * samba_ace, struct ifs_ace * ace,
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a SEC_ACL to a struct ifs_security_acl
|
||||
* Convert a struct security_acl to a struct ifs_security_acl
|
||||
*/
|
||||
static bool
|
||||
onefs_samba_acl_to_acl(SEC_ACL *samba_acl, struct ifs_security_acl **acl,
|
||||
onefs_samba_acl_to_acl(struct security_acl *samba_acl, struct ifs_security_acl **acl,
|
||||
bool * ignore_aces, int snum)
|
||||
{
|
||||
int num_aces = 0;
|
||||
@ -287,13 +287,13 @@ err_free:
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a struct ifs_security_acl to a SEC_ACL
|
||||
* Convert a struct ifs_security_acl to a struct security_acl
|
||||
*/
|
||||
static bool
|
||||
onefs_acl_to_samba_acl(struct ifs_security_acl *acl, SEC_ACL **samba_acl)
|
||||
onefs_acl_to_samba_acl(struct ifs_security_acl *acl, struct security_acl **samba_acl)
|
||||
{
|
||||
struct security_ace *samba_aces = NULL;
|
||||
SEC_ACL *tmp_samba_acl = NULL;
|
||||
struct security_acl *tmp_samba_acl = NULL;
|
||||
int i, num_aces = 0;
|
||||
|
||||
if (!samba_acl)
|
||||
@ -612,7 +612,7 @@ onefs_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
|
||||
struct ifs_security_descriptor *sd = NULL;
|
||||
DOM_SID owner_sid, group_sid;
|
||||
DOM_SID *ownerp, *groupp;
|
||||
SEC_ACL *dacl, *sacl;
|
||||
struct security_acl *dacl, *sacl;
|
||||
SEC_DESC *pdesc;
|
||||
bool alloced = false;
|
||||
bool new_aces_alloced = false;
|
||||
|
@ -592,7 +592,7 @@ static size_t afs_to_nt_acl_common(struct afs_acl *afs_acl,
|
||||
{
|
||||
struct security_ace *nt_ace_list;
|
||||
DOM_SID owner_sid, group_sid;
|
||||
SEC_ACL *psa = NULL;
|
||||
struct security_acl *psa = NULL;
|
||||
int good_aces;
|
||||
size_t sd_size;
|
||||
TALLOC_CTX *mem_ctx = talloc_tos();
|
||||
@ -726,7 +726,7 @@ static bool nt_to_afs_acl(const char *filename,
|
||||
const struct security_ace *ace),
|
||||
struct afs_acl *afs_acl)
|
||||
{
|
||||
const SEC_ACL *dacl;
|
||||
const struct security_acl *dacl;
|
||||
int i;
|
||||
|
||||
/* Currently we *only* look at the dacl */
|
||||
|
@ -2637,7 +2637,7 @@ WERROR spoolss_create_default_secdesc(TALLOC_CTX *mem_ctx,
|
||||
struct security_ace ace[5]; /* max number of ace entries */
|
||||
int i = 0;
|
||||
uint32_t sa;
|
||||
SEC_ACL *psa = NULL;
|
||||
struct security_acl *psa = NULL;
|
||||
SEC_DESC *psd = NULL;
|
||||
DOM_SID adm_sid;
|
||||
size_t sd_size;
|
||||
@ -5502,7 +5502,7 @@ WERROR nt_printing_setsec(const char *sharename, struct sec_desc_buf *secdesc_ct
|
||||
|
||||
if (!secdesc_ctr->sd->owner_sid || !secdesc_ctr->sd->group_sid) {
|
||||
DOM_SID *owner_sid, *group_sid;
|
||||
SEC_ACL *dacl, *sacl;
|
||||
struct security_acl *dacl, *sacl;
|
||||
SEC_DESC *psd = NULL;
|
||||
size_t size;
|
||||
|
||||
@ -5589,7 +5589,7 @@ static struct sec_desc_buf *construct_default_printer_sdb(TALLOC_CTX *ctx)
|
||||
struct security_ace ace[5]; /* max number of ace entries */
|
||||
int i = 0;
|
||||
uint32_t sa;
|
||||
SEC_ACL *psa = NULL;
|
||||
struct security_acl *psa = NULL;
|
||||
struct sec_desc_buf *sdb = NULL;
|
||||
SEC_DESC *psd = NULL;
|
||||
DOM_SID adm_sid;
|
||||
@ -5755,7 +5755,7 @@ bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, struct sec_desc_
|
||||
}
|
||||
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
SEC_ACL *the_acl = (*secdesc_ctr)->sd->dacl;
|
||||
struct security_acl *the_acl = (*secdesc_ctr)->sd->dacl;
|
||||
int i;
|
||||
|
||||
DEBUG(10, ("secdesc_ctr for %s has %d aces:\n",
|
||||
|
@ -40,7 +40,7 @@ static WERROR construct_registry_sd(TALLOC_CTX *ctx, SEC_DESC **psd)
|
||||
struct security_ace ace[3];
|
||||
size_t i = 0;
|
||||
SEC_DESC *sd;
|
||||
SEC_ACL *theacl;
|
||||
struct security_acl *theacl;
|
||||
size_t sd_size;
|
||||
|
||||
/* basic access for Everyone */
|
||||
|
@ -320,7 +320,7 @@ static NTSTATUS make_lsa_object_sd(TALLOC_CTX *mem_ctx, SEC_DESC **sd, size_t *s
|
||||
struct security_ace ace[5];
|
||||
size_t i = 0;
|
||||
|
||||
SEC_ACL *psa = NULL;
|
||||
struct security_acl *psa = NULL;
|
||||
|
||||
/* READ|EXECUTE access for Everyone */
|
||||
|
||||
|
@ -130,7 +130,7 @@ static NTSTATUS make_samr_object_sd( TALLOC_CTX *ctx, SEC_DESC **psd, size_t *sd
|
||||
struct security_ace ace[5]; /* at most 5 entries */
|
||||
size_t i = 0;
|
||||
|
||||
SEC_ACL *psa = NULL;
|
||||
struct security_acl *psa = NULL;
|
||||
|
||||
/* basic access for Everyone */
|
||||
|
||||
@ -674,7 +674,7 @@ NTSTATUS _samr_SetSecurity(pipes_struct *p,
|
||||
{
|
||||
struct samr_user_info *uinfo;
|
||||
uint32 i;
|
||||
SEC_ACL *dacl;
|
||||
struct security_acl *dacl;
|
||||
bool ret;
|
||||
struct samu *sampass=NULL;
|
||||
NTSTATUS status;
|
||||
|
@ -5443,7 +5443,7 @@ static WERROR update_printer_sec(struct policy_handle *handle,
|
||||
}
|
||||
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
SEC_ACL *the_acl;
|
||||
struct security_acl *the_acl;
|
||||
int i;
|
||||
|
||||
the_acl = old_secdesc_ctr->sd->dacl;
|
||||
|
@ -2387,7 +2387,7 @@ WERROR winreg_set_printer_secdesc(TALLOC_CTX *mem_ctx,
|
||||
*/
|
||||
if (!secdesc->owner_sid || !secdesc->group_sid) {
|
||||
DOM_SID *owner_sid, *group_sid;
|
||||
SEC_ACL *dacl, *sacl;
|
||||
struct security_acl *dacl, *sacl;
|
||||
size_t size;
|
||||
|
||||
result = winreg_get_printer_secdesc(tmp_ctx,
|
||||
|
@ -324,7 +324,7 @@ static void init_srv_share_info_2(pipes_struct *p, struct srvsvc_NetShareInfo2 *
|
||||
static void map_generic_share_sd_bits(SEC_DESC *psd)
|
||||
{
|
||||
int i;
|
||||
SEC_ACL *ps_dacl = NULL;
|
||||
struct security_acl *ps_dacl = NULL;
|
||||
|
||||
if (!psd)
|
||||
return;
|
||||
|
@ -140,7 +140,7 @@ static SEC_DESC* construct_scm_sd( TALLOC_CTX *ctx )
|
||||
struct security_ace ace[2];
|
||||
size_t i = 0;
|
||||
SEC_DESC *sd;
|
||||
SEC_ACL *theacl;
|
||||
struct security_acl *theacl;
|
||||
size_t sd_size;
|
||||
|
||||
/* basic access for Everyone */
|
||||
|
@ -93,7 +93,7 @@ static SEC_DESC* construct_service_sd( TALLOC_CTX *ctx )
|
||||
struct security_ace ace[4];
|
||||
size_t i = 0;
|
||||
SEC_DESC *sd = NULL;
|
||||
SEC_ACL *theacl = NULL;
|
||||
struct security_acl *theacl = NULL;
|
||||
size_t sd_size;
|
||||
|
||||
/* basic access for Everyone */
|
||||
|
@ -1582,7 +1582,7 @@ static bool create_canon_ace_lists(files_struct *fsp,
|
||||
DOM_SID *pfile_grp_sid,
|
||||
canon_ace **ppfile_ace,
|
||||
canon_ace **ppdir_ace,
|
||||
const SEC_ACL *dacl)
|
||||
const struct security_acl *dacl)
|
||||
{
|
||||
bool all_aces_are_inherit_only = (fsp->is_directory ? True : False);
|
||||
canon_ace *file_ace = NULL;
|
||||
@ -3179,7 +3179,7 @@ static NTSTATUS posix_get_nt_acl_common(struct connection_struct *conn,
|
||||
DOM_SID owner_sid;
|
||||
DOM_SID group_sid;
|
||||
size_t sd_size = 0;
|
||||
SEC_ACL *psa = NULL;
|
||||
struct security_acl *psa = NULL;
|
||||
size_t num_acls = 0;
|
||||
size_t num_def_acls = 0;
|
||||
size_t num_aces = 0;
|
||||
|
@ -58,7 +58,7 @@ static void verbose_output(const char *format, ...)
|
||||
|
||||
static bool swap_sid_in_acl( SEC_DESC *sd, DOM_SID *s1, DOM_SID *s2 )
|
||||
{
|
||||
SEC_ACL *theacl;
|
||||
struct security_acl *theacl;
|
||||
int i;
|
||||
bool update = False;
|
||||
|
||||
|
@ -298,7 +298,7 @@ static SEC_DESC* parse_acl_string(TALLOC_CTX *mem_ctx, const char *szACL, size_t
|
||||
{
|
||||
SEC_DESC *sd = NULL;
|
||||
struct security_ace *ace;
|
||||
SEC_ACL *theacl;
|
||||
struct security_acl *theacl;
|
||||
int num_ace;
|
||||
const char *pacl;
|
||||
int i;
|
||||
@ -335,10 +335,10 @@ static SEC_DESC* parse_acl_string(TALLOC_CTX *mem_ctx, const char *szACL, size_t
|
||||
return sd;
|
||||
}
|
||||
|
||||
/* add an ACE to a list of ACEs in a SEC_ACL */
|
||||
static bool add_ace(TALLOC_CTX *mem_ctx, SEC_ACL **the_acl, struct security_ace *ace)
|
||||
/* add an ACE to a list of ACEs in a struct security_acl */
|
||||
static bool add_ace(TALLOC_CTX *mem_ctx, struct security_acl **the_acl, struct security_ace *ace)
|
||||
{
|
||||
SEC_ACL *new_ace;
|
||||
struct security_acl *new_ace;
|
||||
struct security_ace *aces;
|
||||
if (! *the_acl) {
|
||||
return (((*the_acl) = make_sec_acl(mem_ctx, 3, 1, ace)) != NULL);
|
||||
@ -384,7 +384,7 @@ static int ace_compare(struct security_ace *ace1, struct security_ace *ace2)
|
||||
return memcmp(ace1, ace2, sizeof(struct security_ace));
|
||||
}
|
||||
|
||||
static void sort_acl(SEC_ACL *the_acl)
|
||||
static void sort_acl(struct security_acl *the_acl)
|
||||
{
|
||||
uint32 i;
|
||||
if (!the_acl) return;
|
||||
|
@ -529,10 +529,10 @@ static bool parse_ace(struct cli_state *cli, struct security_ace *ace,
|
||||
return True;
|
||||
}
|
||||
|
||||
/* add an ACE to a list of ACEs in a SEC_ACL */
|
||||
static bool add_ace(SEC_ACL **the_acl, struct security_ace *ace)
|
||||
/* add an ACE to a list of ACEs in a struct security_acl */
|
||||
static bool add_ace(struct security_acl **the_acl, struct security_ace *ace)
|
||||
{
|
||||
SEC_ACL *new_ace;
|
||||
struct security_acl *new_ace;
|
||||
struct security_ace *aces;
|
||||
if (! *the_acl) {
|
||||
return (((*the_acl) = make_sec_acl(talloc_tos(), 3, 1, ace))
|
||||
@ -559,7 +559,7 @@ static SEC_DESC *sec_desc_parse(TALLOC_CTX *ctx, struct cli_state *cli, char *st
|
||||
SEC_DESC *ret = NULL;
|
||||
size_t sd_size;
|
||||
DOM_SID *grp_sid=NULL, *owner_sid=NULL;
|
||||
SEC_ACL *dacl=NULL;
|
||||
struct security_acl *dacl=NULL;
|
||||
int revision=1;
|
||||
|
||||
while (next_token_talloc(ctx, &p, &tok, "\t,\r\n")) {
|
||||
@ -848,7 +848,7 @@ static int ace_compare(struct security_ace *ace1, struct security_ace *ace2)
|
||||
return memcmp(ace1, ace2, sizeof(struct security_ace));
|
||||
}
|
||||
|
||||
static void sort_acl(SEC_ACL *the_acl)
|
||||
static void sort_acl(struct security_acl *the_acl)
|
||||
{
|
||||
uint32 i;
|
||||
if (!the_acl) return;
|
||||
@ -1049,7 +1049,7 @@ static int inherit(struct cli_state *cli, const char *filename,
|
||||
/* remove all inherited ACL's. */
|
||||
if (old->dacl) {
|
||||
int i;
|
||||
SEC_ACL *temp=old->dacl;
|
||||
struct security_acl *temp=old->dacl;
|
||||
old->dacl=make_sec_acl(talloc_tos(), 3, 0, NULL);
|
||||
for (i=temp->num_aces-1;i>=0;i--) {
|
||||
struct security_ace *ace=&temp->aces[i];
|
||||
|
Loading…
x
Reference in New Issue
Block a user