Don't fill log files with repeating messages (#657658, #707412)

"rv=0x... for client" and "Card Not Inserted" should be DEBUG log level,
not ERROR.
This commit is contained in:
Kalev Lember 2011-05-25 06:51:04 +03:00
parent 6360140a1e
commit b8d5aedaa1
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,24 @@
diff -up pcsc-lite-1.6.4/src/winscard.c.loglevel pcsc-lite-1.6.4/src/winscard.c
--- pcsc-lite-1.6.4/src/winscard.c.loglevel 2010-08-03 20:01:37.000000000 +0300
+++ pcsc-lite-1.6.4/src/winscard.c 2011-05-25 07:04:29.228709067 +0300
@@ -335,7 +335,7 @@ LONG SCardConnect(/*@unused@*/ SCARDCONT
{
if (!(dwStatus & SCARD_PRESENT))
{
- Log1(PCSC_LOG_ERROR, "Card Not Inserted");
+ Log1(PCSC_LOG_DEBUG, "Card Not Inserted");
return SCARD_E_NO_SMARTCARD;
}
diff -up pcsc-lite-1.6.4/src/winscard_svc.c.loglevel pcsc-lite-1.6.4/src/winscard_svc.c
--- pcsc-lite-1.6.4/src/winscard_svc.c.loglevel 2010-08-13 19:38:58.000000000 +0300
+++ pcsc-lite-1.6.4/src/winscard_svc.c 2011-05-25 07:04:29.228709067 +0300
@@ -279,7 +279,7 @@ static const char *CommandsText[] = {
#define WRITE_BODY(v) \
WRITE_BODY_WITH_COMMAND(CommandsText[header.command], v)
#define WRITE_BODY_WITH_COMMAND(command, v) \
- Log4(SCARD_S_SUCCESS == v.rv ? PCSC_LOG_DEBUG : PCSC_LOG_ERROR, "%s rv=0x%X for client %d", command, v.rv, filedes); \
+ Log4(PCSC_LOG_DEBUG, "%s rv=0x%X for client %d", command, v.rv, filedes); \
ret = MessageSend(&v, sizeof(v), filedes);
static void ContextThread(LPVOID newContext)

View File

@ -2,7 +2,7 @@
Name: pcsc-lite
Version: 1.6.4
Release: 3%{?dist}
Release: 4%{?dist}
Summary: PC/SC Lite smart card framework and applications
Group: System Environment/Daemons
@ -15,6 +15,9 @@ Patch1: %{name}-1.5.5-rpath64.patch
# Disable pcscd on-demand startup (#653903)
Patch2: %{name}-1.6.4-noautostart.patch
Patch3: %{name}-CVE-2010-4531.patch
# Avoid filling log files with "rv=0x... for client" and "Card Not Inserted"
# messages (#657658, #707412)
Patch4: pcsc-lite-1.6.4-loglevel.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: hal-devel
@ -68,6 +71,7 @@ Requires: %{name}-libs = %{version}-%{release}
%patch1 -p1 -b .rpath64
%patch2 -p1 -b .noautostart
%patch3 -p0 -b .CVE-2010-4531
%patch4 -p1 -b .loglevel
# Convert to utf-8
for file in ChangeLog; do
@ -148,6 +152,9 @@ fi
%changelog
* Wed May 25 2011 Kalev Lember <kalev@smartlink.ee> - 1.6.4-4
- Don't fill log files with repeating messages (#657658, #707412)
* Wed Jan 05 2011 Kalev Lember <kalev@smartlink.ee> - 1.6.4-3
- Fixed a buffer overflow in ATR decoder (CVE-2010-4531)