summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Layton <jlayton@samba.org>2012-06-14 11:05:43 -0400
committerJeff Layton <jlayton@samba.org>2012-06-14 11:05:43 -0400
commitb7bea5254443cb121b0cf03a64b123b85d7f9fbb (patch)
tree8ffdae77e3208e53c46930aaeb8e87ebeda692b3
parent0eb3daa4b17ee64b464594f1a5d413ecb364957c (diff)
downloadcifs-utils-b7bea5254443cb121b0cf03a64b123b85d7f9fbb.tar.gz
cifs-utils-b7bea5254443cb121b0cf03a64b123b85d7f9fbb.tar.bz2
cifs-utils-b7bea5254443cb121b0cf03a64b123b85d7f9fbb.zip
cifs.upcall: more debug logging for krb5 upcalls
While helping to track down a configuration problem, I found this little bit of extra debug logging to be helpful. Might as well make it part of the stock binary. Signed-off-by: Jeff Layton <jlayton@samba.org>
-rw-r--r--cifs.upcall.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/cifs.upcall.c b/cifs.upcall.c
index 4f9fe21..eef461d 100644
--- a/cifs.upcall.c
+++ b/cifs.upcall.c
@@ -994,10 +994,12 @@ retry_new_hostname:
break;
}
- if (rc)
+ if (rc) {
+ syslog(LOG_DEBUG, "Unable to obtain service ticket");
goto out;
+ }
- /* pack SecurityBLob and SessionKey into downcall packet */
+ /* pack SecurityBlob and SessionKey into downcall packet */
datalen =
sizeof(struct cifs_spnego_msg) + secblob.length + sess_key.length;
keydata = (struct cifs_spnego_msg *)calloc(sizeof(char), datalen);
@@ -1029,8 +1031,10 @@ out:
* make sure the kernel doesn't hang it off of a searchable keyring
* and interfere with the next attempt to instantiate the key.
*/
- if (rc != 0 && key == 0)
+ if (rc != 0 && key == 0) {
+ syslog(LOG_DEBUG, "Negating key");
keyctl_negate(key, 1, KEY_REQKEY_DEFL_DEFAULT);
+ }
data_blob_free(&secblob);
data_blob_free(&sess_key);
SAFE_FREE(ccname);
@@ -1038,5 +1042,6 @@ out:
SAFE_FREE(arg.ip);
SAFE_FREE(arg.username);
SAFE_FREE(keydata);
+ syslog(LOG_DEBUG, "Exit status %ld", rc);
return rc;
}