winbindd: Use is_domain_offline() where appropriate
authorVolker Lendecke <vl@samba.org>
Fri, 18 May 2018 14:15:06 +0000 (16:15 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 15 Jun 2018 23:06:36 +0000 (01:06 +0200)
That if-condition is precisely covered by the helper routine

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/winbindd_cache.c

index 2778e27374fd9c8d96023b0ce65670e22fca3f7d..af67aa3b0cfa20529de4d5109a45d9498f6597e3 100644 (file)
@@ -1123,7 +1123,7 @@ do_query:
 
        /* If its not in cache and we are offline, then fail */
 
-       if ( get_global_winbindd_state_offline() || !domain->online ) {
+       if (is_domain_offline(domain)) {
                DEBUG(8,("resolve_username_to_alias: rejecting query "
                         "in offline mode\n"));
                return NT_STATUS_NOT_FOUND;
@@ -1203,7 +1203,7 @@ do_query:
 
        /* If its not in cache and we are offline, then fail */
 
-       if ( get_global_winbindd_state_offline() || !domain->online ) {
+       if (is_domain_offline(domain)) {
                DEBUG(8,("resolve_alias_to_username: rejecting query "
                         "in offline mode\n"));
                return NT_STATUS_NOT_FOUND;