From c88705c1cd8655ed4287c2e151fc654918f965e6 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Mon, 17 Nov 2008 21:24:29 +0000 Subject: [PATCH] Don't stick '' in log messages. Run kdb5_util dump with input explicitly from /dev/null git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21132 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/server/ipropd_svc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/kadmin/server/ipropd_svc.c b/src/kadmin/server/ipropd_svc.c index a76057cbe..f0b704f1a 100644 --- a/src/kadmin/server/ipropd_svc.c +++ b/src/kadmin/server/ipropd_svc.c @@ -52,10 +52,8 @@ static char *reply_nil_str = "UPDATE_NIL"; static char *reply_perm_str = "UPDATE_PERM_DENIED"; static char *reply_unknown_str = ""; -#define LOG_UNAUTH _("Unauthorized request: %s, %s, " \ - "client=%s, service=%s, addr=%s") -#define LOG_DONE _("Request: %s, %s, %s, client=%s, " \ - "service=%s, addr=%s") +#define LOG_UNAUTH _("Unauthorized request: %s, client=%s, service=%s, addr=%s") +#define LOG_DONE _("Request: %s, %s, %s, client=%s, service=%s, addr=%s") #ifdef DPRINT #undef DPRINT @@ -183,7 +181,7 @@ iprop_get_updates_1_svc(kdb_last_t *arg, struct svc_req *rqstp) ret.ret = UPDATE_PERM_DENIED; krb5_klog_syslog(LOG_NOTICE, LOG_UNAUTH, whoami, - "", client_name, service_name, + client_name, service_name, client_addr(rqstp)); goto out; } @@ -203,7 +201,9 @@ iprop_get_updates_1_svc(kdb_last_t *arg, struct svc_req *rqstp) (unsigned long)arg->last_sno); } - krb5_klog_syslog(LOG_NOTICE, LOG_DONE, whoami, + krb5_klog_syslog(LOG_NOTICE, + _("Request: %s, %s, %s, client=%s, service=%s, addr=%s"), + whoami, obuf, ((kret == 0) ? "success" : error_message(kret)), client_name, service_name, @@ -301,7 +301,7 @@ iprop_full_resync_1_svc(/* LINTED */ void *argp, struct svc_req *rqstp) ret.ret = UPDATE_PERM_DENIED; krb5_klog_syslog(LOG_NOTICE, LOG_UNAUTH, whoami, - "", client_name, service_name, + client_name, service_name, client_addr(rqstp)); goto out; } @@ -327,8 +327,8 @@ iprop_full_resync_1_svc(/* LINTED */ void *argp, struct svc_req *rqstp) * note the -i; modified version of kdb5_util dump format * to include sno (serial number) */ - if (asprintf(&ubuf, "%s dump -i %s", KPROPD_DEFAULT_KDB5_UTIL, - tmpf) < 0) { + if (asprintf(&ubuf, "%s dump -i %s &1", + KPROPD_DEFAULT_KDB5_UTIL, tmpf) < 0) { krb5_klog_syslog(LOG_ERR, _("%s: cannot construct kdb5 util dump string too long; out of memory"), whoami); @@ -403,9 +403,9 @@ iprop_full_resync_1_svc(/* LINTED */ void *argp, struct svc_req *rqstp) ret.lastentry.last_time.seconds = 0; ret.lastentry.last_time.useconds = 0; - krb5_klog_syslog(LOG_NOTICE, LOG_DONE, whoami, - "", - "success", + krb5_klog_syslog(LOG_NOTICE, + _("Request: %s, spawned resync process %d, client=%s, service=%s, addr=%s"), + whoami, fret, client_name, service_name, client_addr(rqstp)); -- 2.26.2