kdc: Move _krb5_pac_get_attributes_info() call to right place
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 8 Mar 2023 19:55:02 +0000 (08:55 +1300)
committerJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 3 May 2023 04:13:17 +0000 (16:13 +1200)
Whether or not we set pac_attributes should not depend on pac_canon_name
being NULL or non-NULL.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
kdc/krb5tgs.c

index 129dacb6914c0a694089099d2ce741da30f1ff89..d1ccfe19dd8e3ed9edfc867ae0d2d8d46ac90935 100644 (file)
@@ -159,10 +159,10 @@ _kdc_check_pac(astgs_request_t r,
                krb5_pac_free(context, pac);
                return ret;
            }
-           if (pac_attributes &&
-               _krb5_pac_get_attributes_info(context, pac, pac_attributes) != 0)
-               *pac_attributes = KRB5_PAC_WAS_GIVEN_IMPLICITLY;
        }
+       if (pac_attributes &&
+           _krb5_pac_get_attributes_info(context, pac, pac_attributes) != 0)
+           *pac_attributes = KRB5_PAC_WAS_GIVEN_IMPLICITLY;
 
        /* Discard the PAC if the plugin didn't handle it */
        krb5_pac_free(context, pac);