]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
winbindd: rename variable old_status to was_online in wb_cache_name_to_sid()
authorRalph Boehme <slow@samba.org>
Fri, 16 Feb 2024 15:12:43 +0000 (16:12 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 26 Jul 2024 10:06:31 +0000 (10:06 +0000)
A lot easier to make sense of the complex logic when using this name.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/winbindd/winbindd_cache.c

index 0e42687658290ebb9491ed6f61b1599ed30159f7..9a334e2ae977f2d4d6e8d8eeccc18c824d981eca 100644 (file)
@@ -1819,10 +1819,10 @@ NTSTATUS wb_cache_name_to_sid(struct winbindd_domain *domain,
                              enum lsa_SidType *type)
 {
        NTSTATUS status;
-       bool old_status;
+       bool was_online;
        const char *dom_name;
 
-       old_status = domain->online;
+       was_online = domain->online;
 
        status = wcache_name_to_sid(domain, domain_name, name, sid, type);
        if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
@@ -1840,12 +1840,12 @@ NTSTATUS wb_cache_name_to_sid(struct winbindd_domain *domain,
 
        if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT) ||
                NT_STATUS_EQUAL(status, NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND)) {
-               if (!domain->internal && old_status) {
+               if (!domain->internal && was_online) {
                        set_domain_offline(domain);
                }
                if (!domain->internal &&
                        !domain->online &&
-                       old_status) {
+                       was_online) {
                        NTSTATUS cache_status;
                        cache_status = wcache_name_to_sid(domain, domain_name, name, sid, type);
                        return cache_status;