macos: don't crash on krb5 damage
authorDerrick Brashear <shadow@dementix.org>
Sun, 4 Mar 2012 14:48:07 +0000 (09:48 -0500)
committerDerrick Brashear <shadow@dementix.org>
Sun, 4 Mar 2012 14:49:29 +0000 (06:49 -0800)
if we get success but still no client, don't crash

Change-Id: I6be28ac6ecece3448123a84cf442a791eebc93cc
Reviewed-on: http://gerrit.openafs.org/6868
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

src/platform/DARWIN/AFSPreference/Krb5Util.m

index 6a54f2a..fff03ca 100644 (file)
                                                            &me);
                                in.client = me;
                        }
-                       if (ret == 0) {
+                       if ((ret == 0) && (in.client)) {
                          ret = krb5_build_principal_ext(kcontext, &server,
                                                       krb5_princ_realm(kcontext,
                                                                        in.client)->length,