From 27e24144d666e8dc4f59d44980f1b1d4390631b6 Mon Sep 17 00:00:00 2001 From: Bojan Smojver Date: Tue, 1 Apr 2014 17:57:00 +1100 Subject: [PATCH] Provide format for syslog() call to avoid warning/error. --- xrdp-0.6.1-syslog-format.patch | 12 ++++++++++++ xrdp.spec | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 xrdp-0.6.1-syslog-format.patch diff --git a/xrdp-0.6.1-syslog-format.patch b/xrdp-0.6.1-syslog-format.patch new file mode 100644 index 0000000..8da4bb1 --- /dev/null +++ b/xrdp-0.6.1-syslog-format.patch @@ -0,0 +1,12 @@ +diff -ruN xrdp-v0.6.1-orig/common/log.c xrdp-v0.6.1/common/log.c +--- xrdp-v0.6.1-orig/common/log.c 2013-11-10 07:11:15.000000000 +1100 ++++ xrdp-v0.6.1/common/log.c 2014-04-01 17:54:49.005574821 +1100 +@@ -160,7 +160,7 @@ + if (l_cfg->enable_syslog && (lvl <= l_cfg->log_level)) + { + /* log to syslog */ +- syslog(log_xrdp2syslog(lvl), buff + 20); ++ syslog(log_xrdp2syslog(lvl), "%s", buff + 20); + } + + if (lvl <= l_cfg->log_level) diff --git a/xrdp.spec b/xrdp.spec index 6c62491..0e061bf 100644 --- a/xrdp.spec +++ b/xrdp.spec @@ -13,6 +13,7 @@ Patch2: xrdp-pam_session.patch # https://sourceforge.net/tracker/?group_id=112022&atid=665248 # https://bugzilla.redhat.com/show_bug.cgi?id=905411 Patch3: xrdp-endian.patch +Patch4: xrdp-0.6.1-syslog-format.patch Source1: xrdp.service Source2: xrdp-sesman.service @@ -48,6 +49,7 @@ terminal server / remote desktop clients. %patch1 -p2 %patch2 -p1 %patch3 -p1 -b .endian +%patch4 -p1 -b .syslog-format # remove unused modules from xrdp login combobox %{__sed} -i -e '/\[xrdp2\]/,$d' xrdp/xrdp.ini @@ -190,6 +192,7 @@ fi %changelog * Tue Apr 1 2014 Bojan Smojver - 0.6.1-1 - try a bump to official 0.6.1 +- provide format for syslog() call * Sun Aug 04 2013 Fedora Release Engineering - 0.6.0-0.8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild