diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/util_sid.c | 6 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_util.c | 3 |
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; |