From patchwork Fri Jan 7 14:11:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 464021 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p07ECHTB020473 for ; Fri, 7 Jan 2011 14:12:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753555Ab1AGOL6 (ORCPT ); Fri, 7 Jan 2011 09:11:58 -0500 Received: from mail-vw0-f46.google.com ([209.85.212.46]:41933 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753550Ab1AGOL6 (ORCPT ); Fri, 7 Jan 2011 09:11:58 -0500 Received: by mail-vw0-f46.google.com with SMTP id 16so7137210vws.19 for ; Fri, 07 Jan 2011 06:11:57 -0800 (PST) Received: by 10.220.169.193 with SMTP id a1mr5353107vcz.87.1294409517737; Fri, 07 Jan 2011 06:11:57 -0800 (PST) Received: from salusa.poochiereds.net (cpe-071-070-153-003.nc.res.rr.com [71.70.153.3]) by mx.google.com with ESMTPS id e18sm9784812vbm.5.2011.01.07.06.11.56 (version=SSLv3 cipher=RC4-MD5); Fri, 07 Jan 2011 06:11:57 -0800 (PST) From: Jeff Layton To: linux-cifs@vger.kernel.org Cc: niallain@gmail.com Subject: [PATCH 4/5] cifs.upcall: debug logging for the key description parser Date: Fri, 7 Jan 2011 09:11:44 -0500 Message-Id: <1294409505-2999-5-git-send-email-jlayton@samba.org> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1294409505-2999-1-git-send-email-jlayton@samba.org> References: <1294409505-2999-1-git-send-email-jlayton@samba.org> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 07 Jan 2011 14:12:19 +0000 (UTC) diff --git a/cifs.upcall.c b/cifs.upcall.c index 12df8cc..3dbcd6e 100644 --- a/cifs.upcall.c +++ b/cifs.upcall.c @@ -483,6 +483,7 @@ decode_key_description(const char *desc, struct decoded_args *arg) return 1; } retval |= DKD_HAVE_HOSTNAME; + syslog(LOG_DEBUG, "host=%s", arg->hostname); } else if (!strncmp(tkn, "ip4=", 4) || !strncmp(tkn, "ip6=", 4)) { if (pos == NULL) len = strlen(tkn); @@ -497,6 +498,7 @@ decode_key_description(const char *desc, struct decoded_args *arg) return 1; } retval |= DKD_HAVE_IP; + syslog(LOG_DEBUG, "ip=%s", arg->ip); } else if (strncmp(tkn, "user=", 5) == 0) { if (pos == NULL) len = strlen(tkn); @@ -511,6 +513,7 @@ decode_key_description(const char *desc, struct decoded_args *arg) return 1; } retval |= DKD_HAVE_USERNAME; + syslog(LOG_DEBUG, "user=%s", arg->username); } else if (strncmp(tkn, "pid=", 4) == 0) { errno = 0; arg->pid = strtol(tkn + 4, NULL, 0); @@ -519,6 +522,7 @@ decode_key_description(const char *desc, struct decoded_args *arg) strerror(errno)); return 1; } + syslog(LOG_DEBUG, "pid=%u", arg->pid); retval |= DKD_HAVE_PID; } else if (strncmp(tkn, "sec=", 4) == 0) { if (strncmp(tkn + 4, "krb5", 4) == 0) { @@ -528,6 +532,7 @@ decode_key_description(const char *desc, struct decoded_args *arg) retval |= DKD_HAVE_SEC; arg->sec = MS_KRB5; } + syslog(LOG_DEBUG, "sec=%d", arg->sec); } else if (strncmp(tkn, "uid=", 4) == 0) { errno = 0; arg->uid = strtol(tkn + 4, NULL, 16); @@ -537,6 +542,7 @@ decode_key_description(const char *desc, struct decoded_args *arg) return 1; } retval |= DKD_HAVE_UID; + syslog(LOG_DEBUG, "uid=%u", arg->uid); } else if (strncmp(tkn, "creduid=", 8) == 0) { errno = 0; arg->creduid = strtol(tkn + 8, NULL, 16); @@ -546,6 +552,7 @@ decode_key_description(const char *desc, struct decoded_args *arg) return 1; } retval |= DKD_HAVE_CREDUID; + syslog(LOG_DEBUG, "creduid=%u", arg->creduid); } else if (strncmp(tkn, "ver=", 4) == 0) { /* if version */ errno = 0; arg->ver = strtol(tkn + 4, NULL, 16); @@ -555,6 +562,7 @@ decode_key_description(const char *desc, struct decoded_args *arg) return 1; } retval |= DKD_HAVE_VERSION; + syslog(LOG_DEBUG, "ver=%d", arg->ver); } if (pos == NULL) break;