summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-01-19 00:03:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:11 -0500
commit7b575d7cc513b4da8734f6f06694e7c426cfd41c (patch)
treea9e770629887c9b5f33e8ff61daae3ce0fef920e
parent9ed512777647b1706d961e4e141e8794bad4d284 (diff)
downloadsamba-7b575d7cc513b4da8734f6f06694e7c426cfd41c.tar.gz
samba-7b575d7cc513b4da8734f6f06694e7c426cfd41c.tar.bz2
samba-7b575d7cc513b4da8734f6f06694e7c426cfd41c.zip
r13024: Add is_null_sid.
GUenther (This used to be commit 3a6e41a0cb2872a656ea79c8d4fc4b8bce436492)
-rw-r--r--source3/lib/util_sid.c6
-rw-r--r--source3/nsswitch/winbindd_util.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index f3fc5af9ea..e2b2ebf28c 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -619,3 +619,9 @@ void del_sid_from_array(const DOM_SID *sid, DOM_SID **sids, size_t *num)
return;
}
+
+BOOL is_null_sid(const DOM_SID *sid)
+{
+ static const DOM_SID null_sid = {0};
+ return sid_equal(sid, &null_sid);
+}
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index efae956884..4c3306a8ac 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -106,7 +106,6 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
{
struct winbindd_domain *domain;
const char *alternative_name = NULL;
- static const DOM_SID null_sid = {0};
/* ignore alt_name if we are not in an AD domain */
@@ -128,7 +127,7 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
}
}
if (sid) {
- if (sid_equal(sid, &null_sid) ) {
+ if (is_null_sid(sid)) {
} else if (sid_equal(sid, &domain->sid)) {
return domain;