commit d6d2243cb22faf4a35f9fe418fa2038ced4d1985
Author: Marcin Banasiak <[email protected]>
Date:   Tue Feb 5 13:11:57 2013 +0100

    Fix build with -Werror=format-security

 rdate-format-security.patch | 11 +++++++++++
 rdate.spec                  |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/rdate.spec b/rdate.spec
index e977284..bd940ac 100644
--- a/rdate.spec
+++ b/rdate.spec
@@ -16,6 +16,7 @@ Source0:      
ftp://people.redhat.com/sopwith/%{name}-%{version}.tar.gz
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
 Source3:       %{name}.cron
+Patch0:                %{name}-format-security.patch
 Requires(post,preun):  /sbin/chkconfig
 Requires:      rc-scripts
 Obsoletes:     rdate-bsd
@@ -82,6 +83,7 @@ da mümkündür. Ne var ki bu uygulama çok hassas değildir.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{__make} clean
diff --git a/rdate-format-security.patch b/rdate-format-security.patch
new file mode 100644
index 0000000..4779093
--- /dev/null
+++ b/rdate-format-security.patch
@@ -0,0 +1,11 @@
+--- rdate-1.4/rdate.c.formatsec        2013-02-05 13:07:59.883886943 +0100
++++ rdate-1.4/rdate.c  2013-02-05 13:08:22.273765647 +0100
+@@ -69,7 +69,7 @@ static void writeLog(int is_error, char
+     return; /* Error, which we can't report because this _is_ the error
+              reporting mechanism */
+   if(log_mode)
+-    syslog(is_error?LOG_WARNING:LOG_INFO, buf);
++    syslog(is_error?LOG_WARNING:LOG_INFO, "%s", buf);
+   if(is_error || print_mode)
+     fprintf(is_error?stderr:stdout, "%s: %s\n", argv0, buf);
+ }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rdate.git/commitdiff/d6d2243cb22faf4a35f9fe418fa2038ced4d1985

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to