]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:kdc: Check parameters of samba_kdc_get_user_info_from_db()
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 3 Oct 2023 04:00:43 +0000 (17:00 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 12 Oct 2023 23:13:32 +0000 (23:13 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/kdc/pac-glue.c

index 8fde82b303d4fe87f528a3ebcdbd4eee54317769..1180db9d04f90165ff5f3d3d4b4d5fae0a1f61df 100644 (file)
@@ -1127,6 +1127,22 @@ krb5_error_code samba_kdc_get_user_info_from_db(TALLOC_CTX *mem_ctx,
        NTSTATUS nt_status;
        struct auth_user_info_dc *info = NULL;
 
+       if (samdb == NULL) {
+               return EINVAL;
+       }
+
+       if (msg == NULL) {
+               return EINVAL;
+       }
+
+       if (info_out == NULL) {
+               return EINVAL;
+       }
+
+       if (entry == NULL) {
+               return KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN;
+       }
+
        if (entry->info_from_db == NULL) {
                struct loadparm_context *lp_ctx = entry->kdc_db_ctx->lp_ctx;