Simple fix to prevent crash for non-pac principals
authorMarcel Ritter <unrzl1@linux.rrze.uni-erlangen.de>
Thu, 22 Apr 2010 12:29:52 +0000 (14:29 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 27 Apr 2010 06:41:51 +0000 (16:41 +1000)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
source4/kdc/pac-glue.c

index 97f741653728b6edb9ed005d337878d2c2de1937..2a932fa832bb7011cfeff5e55cccb6098fe24e33 100644 (file)
@@ -79,6 +79,11 @@ krb5_error_code samba_make_krb5_pac(krb5_context context,
        krb5_data pac_data;
        krb5_error_code ret;
 
+        /* The user account may be set not to want the PAC */
+       if (!pac_blob) {
+               return 0;
+       }
+
        ret = krb5_data_copy(&pac_data, pac_blob->data, pac_blob->length);
        if (ret != 0) {
                return ret;