summaryrefslogtreecommitdiff
path: root/source3/smbd/posix_acls.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-02-28 00:51:02 +0000
committerJeremy Allison <jra@samba.org>2001-02-28 00:51:02 +0000
commit0f2799aaf1e33aa474a12b9389728d57af926cb3 (patch)
treee2cf9efcc996a3b8f08184e204e8af0810e7b8c9 /source3/smbd/posix_acls.c
parent545649a05f4d634bb93471bd946a92b1c5644684 (diff)
downloadsamba-0f2799aaf1e33aa474a12b9389728d57af926cb3.tar.gz
samba-0f2799aaf1e33aa474a12b9389728d57af926cb3.tar.bz2
samba-0f2799aaf1e33aa474a12b9389728d57af926cb3.zip
Move to talloc control of SPOOL_XXX structs. Move to talloc control of
security descriptors and pointers. Syncup with 2.2 tree. Jeremy. (This used to be commit 14d5997dc841e78a619e865288486d50c245896d)
Diffstat (limited to 'source3/smbd/posix_acls.c')
-rw-r--r--source3/smbd/posix_acls.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index da457604bb..9c5afad9c1 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -41,6 +41,7 @@ typedef struct canon_ace {
static void free_canon_ace_list( canon_ace *list_head );
+#if !defined(HAVE_NO_ACLS)
/****************************************************************************
Function to duplicate a canon_ace entry.
****************************************************************************/
@@ -56,6 +57,7 @@ static canon_ace *dup_canon_ace( canon_ace *src_ace)
dst_ace->prev = dst_ace->next = NULL;
return dst_ace;
}
+#endif /* HAVE_NO_ACLS */
/****************************************************************************
Function to create owner and group SIDs from a SMB_STRUCT_STAT.
@@ -243,6 +245,7 @@ static BOOL unpack_nt_owners(SMB_STRUCT_STAT *psbuf, uid_t *puser, gid_t *pgrp,
return True;
}
+#if !defined(HAVE_NO_ACLS)
/****************************************************************************
Merge aces with a common user.
****************************************************************************/
@@ -378,6 +381,7 @@ static BOOL ensure_canon_entry_valid(canon_ace **pp_ace,
return True;
}
+#endif /* HAVE_NO_ACLS */
/****************************************************************************
Unpack a SEC_DESC into two canonical ace lists. We don't depend on this
@@ -577,7 +581,6 @@ static BOOL unpack_canon_ace(files_struct *fsp,
*/
DEBUG(10,("unpack_canon_ace: Win2k inherit acl traverse. Ignoring DACL.\n"));
- free_sec_acl(&psd->dacl);
}
/*
@@ -788,7 +791,6 @@ static BOOL unpack_posix_permissions(files_struct *fsp, SMB_STRUCT_STAT *psbuf,
*/
DEBUG(10,("unpack_posix_permissions: Win2k inherit acl traverse. Ignoring DACL.\n"));
- free_sec_acl(&psd->dacl);
}
/*
@@ -1403,13 +1405,13 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc)
}
if (num_acls) {
- if((psa = make_sec_acl( ACL_REVISION, num_aces, nt_ace_list)) == NULL) {
+ if((psa = make_sec_acl( main_loop_talloc_get(), ACL_REVISION, num_aces, nt_ace_list)) == NULL) {
DEBUG(0,("get_nt_acl: Unable to malloc space for acl.\n"));
goto done;
}
}
- *ppdesc = make_standard_sec_desc( &owner_sid, &group_sid, psa, &sd_size);
+ *ppdesc = make_standard_sec_desc( main_loop_talloc_get(), &owner_sid, &group_sid, psa, &sd_size);
if(!*ppdesc) {
DEBUG(0,("get_nt_acl: Unable to malloc space for security descriptor.\n"));
@@ -1426,8 +1428,6 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc)
free_canon_ace_list(dir_ace);
if (nt_ace_list)
free(nt_ace_list);
- if (psa)
- free_sec_acl(&psa);
return sd_size;
}
@@ -1700,5 +1700,4 @@ int fchmod_acl(int fd, mode_t mode)
sys_acl_free_acl(posix_acl);
return ret;
}
-
#undef OLD_NTDOMAIN