aklog: check ccache errors in get_user_realm
authorDerrick Brashear <shadow@dementia.org>
Fri, 22 Jul 2011 19:39:49 +0000 (15:39 -0400)
committerDerrick Brashear <shadow@dementia.org>
Fri, 22 Jul 2011 20:30:32 +0000 (13:30 -0700)
if there's an error finding the specified ccache, don't
bother continuing.

Change-Id: I344a06c66c426c5d14dbe08ce9da0431f095349d
Reviewed-on: http://gerrit.openafs.org/5069
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/aklog/aklog.c

index e052d9b..4d53ab4 100644 (file)
@@ -2126,8 +2126,11 @@ get_user_realm(krb5_context context, char **realm)
 
     *realm = NULL;
 
-    if (!_krb425_ccache)
-        krb5_cc_default(context, &_krb425_ccache);
+    if (!_krb425_ccache) {
+       r = krb5_cc_default(context, &_krb425_ccache);
+       if (r)
+           return r;
+    }
     if (!client_principal) {
        if (client) {
            r = krb5_parse_name(context, client,  &client_principal);