summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-04-23 15:12:35 +0200
committerAndrew Bartlett <abartlet@samba.org>2009-04-23 15:12:35 +0200
commit53d491c9a4011a7d9ad69db52fb91d163f3f990a (patch)
tree9d0ed3130f35142da50c2e20e8addfe8909f459f /source3/lib
parentaf6298a84dffb400551861c6dc34591f1473830c (diff)
parent1722859abd169f2949b5822f97c810f2b8d162da (diff)
downloadsamba-53d491c9a4011a7d9ad69db52fb91d163f3f990a.tar.gz
samba-53d491c9a4011a7d9ad69db52fb91d163f3f990a.tar.bz2
samba-53d491c9a4011a7d9ad69db52fb91d163f3f990a.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba into abartlet-devel
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/eventlog/eventlog.c2
-rw-r--r--source3/lib/fault.c7
-rw-r--r--source3/lib/secdesc.c68
-rw-r--r--source3/lib/util_reg_api.c2
4 files changed, 6 insertions, 73 deletions
diff --git a/source3/lib/eventlog/eventlog.c b/source3/lib/eventlog/eventlog.c
index 11cb28a120..42b2a06ce3 100644
--- a/source3/lib/eventlog/eventlog.c
+++ b/source3/lib/eventlog/eventlog.c
@@ -936,7 +936,7 @@ NTSTATUS evlog_tdb_entry_to_evt_entry(TALLOC_CTX *mem_ctx,
size_t len;
if (!convert_string_talloc(mem_ctx, CH_UTF16, CH_UNIX,
t->sid.data, t->sid.length,
- (void **)&sid_str, &len, false)) {
+ (void *)&sid_str, &len, false)) {
return NT_STATUS_INVALID_SID;
}
if (len > 0) {
diff --git a/source3/lib/fault.c b/source3/lib/fault.c
index efd1dddfd4..51fc53bb0d 100644
--- a/source3/lib/fault.c
+++ b/source3/lib/fault.c
@@ -194,17 +194,18 @@ static char *get_freebsd_corepath(void)
*/
static char *get_corepath(const char *logbase, const char *progname)
{
- char *tmp_corepath = NULL;
+#if (defined(FREEBSD) && defined(HAVE_SYSCTLBYNAME))
/* @todo: Add support for the linux corepath. */
-#if (defined(FREEBSD) && defined(HAVE_SYSCTLBYNAME))
+
+ char *tmp_corepath = NULL;
tmp_corepath = get_freebsd_corepath();
-#endif
/* If this has been set correctly, we're done. */
if (tmp_corepath) {
return tmp_corepath;
}
+#endif
/* Fall back to the default. */
return get_default_corepath(logbase, progname);
diff --git a/source3/lib/secdesc.c b/source3/lib/secdesc.c
index a81c4ae82a..5e35181834 100644
--- a/source3/lib/secdesc.c
+++ b/source3/lib/secdesc.c
@@ -32,74 +32,6 @@ const struct generic_mapping file_generic_mapping = {
};
/*******************************************************************
- Compares two SEC_DESC structures
-********************************************************************/
-
-bool sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2)
-{
- /* Trivial case */
-
- if (!s1 && !s2) {
- goto done;
- }
-
- if (!s1 || !s2) {
- return False;
- }
-
- /* Check top level stuff */
-
- if (s1->revision != s2->revision) {
- DEBUG(10, ("sec_desc_equal(): revision differs (%d != %d)\n",
- s1->revision, s2->revision));
- return False;
- }
-
- if (s1->type!= s2->type) {
- DEBUG(10, ("sec_desc_equal(): type differs (%d != %d)\n",
- s1->type, s2->type));
- return False;
- }
-
- /* Check owner and group */
-
- if (!sid_equal(s1->owner_sid, s2->owner_sid)) {
- DEBUG(10, ("sec_desc_equal(): owner differs (%s != %s)\n",
- sid_string_dbg(s1->owner_sid),
- sid_string_dbg(s2->owner_sid)));
- return False;
- }
-
- if (!sid_equal(s1->group_sid, s2->group_sid)) {
- DEBUG(10, ("sec_desc_equal(): group differs (%s != %s)\n",
- sid_string_dbg(s1->group_sid),
- sid_string_dbg(s2->group_sid)));
- return False;
- }
-
- /* Check ACLs present in one but not the other */
-
- if ((s1->dacl && !s2->dacl) || (!s1->dacl && s2->dacl) ||
- (s1->sacl && !s2->sacl) || (!s1->sacl && s2->sacl)) {
- DEBUG(10, ("sec_desc_equal(): dacl or sacl not present\n"));
- return False;
- }
-
- /* Sigh - we have to do it the hard way by iterating over all
- the ACEs in the ACLs */
-
- if (!sec_acl_equal(s1->dacl, s2->dacl) ||
- !sec_acl_equal(s1->sacl, s2->sacl)) {
- DEBUG(10, ("sec_desc_equal(): dacl/sacl list not equal\n"));
- return False;
- }
-
- done:
- DEBUG(10, ("sec_desc_equal(): secdescs are identical\n"));
- return True;
-}
-
-/*******************************************************************
Given a security_descriptor return the sec_info.
********************************************************************/
diff --git a/source3/lib/util_reg_api.c b/source3/lib/util_reg_api.c
index 9313193f10..56ecc5472d 100644
--- a/source3/lib/util_reg_api.c
+++ b/source3/lib/util_reg_api.c
@@ -92,7 +92,7 @@ WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
}
if (!convert_string_talloc(value, CH_UTF16LE, CH_UNIX, tmp,
- length+2, (void **)&value->v.sz.str,
+ length+2, (void *)&value->v.sz.str,
&value->v.sz.len, False)) {
SAFE_FREE(tmp);
err = WERR_INVALID_PARAM;