From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yu Zhiguo Subject: Re: the format string of printf to print audit status is wrong Date: Fri, 01 Aug 2008 17:21:35 +0800 Message-ID: <4892D59F.4060304@cn.fujitsu.com> References: <489148A4.3050807@cn.fujitsu.com> <1217509651.2902.86.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1217509651.2902.86.camel@localhost.localdomain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: Eric Paris Cc: audit-list List-Id: linux-audit@redhat.com Hello Eric, CC Steve, Eric Paris wrote: > So it seems reasonable to switch backlog=%d to backlog=%u but all of the > other values "could" be negative and should be shown as ints. > Thanks for your kindness remind. I also think all of the other values "could" be negative and should be shown as ints. A new patch for auditctl: --- src/auditctl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/auditctl.c b/src/auditctl.c index d740509..44ca038 100644 --- a/src/auditctl.c +++ b/src/auditctl.c @@ -1350,7 +1350,7 @@ static int audit_print_reply(struct audit_reply *rep) return 0; case AUDIT_GET: printf("AUDIT_STATUS: enabled=%d flag=%d pid=%d" - " rate_limit=%d backlog_limit=%d lost=%d backlog=%d\n", + " rate_limit=%d backlog_limit=%d lost=%d backlog=%u\n", rep->status->enabled, rep->status->failure, rep->status->pid, rep->status->rate_limit, rep->status->backlog_limit, rep->status->lost,