tags 643806 + patch
thanks
* Julien Cristau <jcris...@debian.org>, 2011-09-29, 22:31:
The latest dpkg sets -Werror=format-security in CFLAGS, which breaks
sssd:
https://buildd.debian.org/status/package.php?p=sssd
libtool: compile: gcc -DHAVE_CONFIG_H -I. -Wall -Iinclude -I.. -I./include -I./sss_client -Iinclude -I. -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include
-I./../common/collection -I./../common/ini -I./../common/dhash -DLIBDIR=\"/usr/lib\" -DVARDIR=\"/var\" -DSHLIBEXT=\"\"
-DSSSD_LIBEXEC_PATH=\"/usr/lib/sssd/sssd\" -DSSSD_INTROSPECT_PATH=\"\" -DSSSD_CONF_DIR=\"/etc/sssd\"
-DSSS_NSS_SOCKET_NAME=\"/var/lib/sss/pipes/nss\" -DSSS_PAM_SOCKET_NAME=\"/var/lib/sss/pipes/pam\"
-DSSS_PAM_PRIV_SOCKET_NAME=\"/var/lib/sss/pipes/private/pam\" -DUSE_MMAP=1 -DTEVENT_DEPRECATED=1 -DLOCALEDIR=\"/usr/share/locale\" -Wall -Wshadow
-Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Werror-implicit-function-declaration -I/usr/include/python2.7 -I/usr/include/python2.7
-fno-strict-aliasing -g -O2 -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Wall -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -c db/sysdb.c -fPIC -DPIC -o db/.libs/pysss_la-sysdb.o
db/sysdb.c: In function 'sysdb_attrs_add_val':
db/sysdb.c:181:9: warning: variable 'ret' set but not used
[-Wunused-but-set-variable]
db/sysdb.c: In function 'sysdb_attrs_steal_string':
db/sysdb.c:227:9: warning: variable 'ret' set but not used
[-Wunused-but-set-variable]
db/sysdb.c: In function 'sysdb_upgrade_01':
db/sysdb.c:850:22: error: format not a string literal and no format arguments
[-Werror=format-security]
cc1: some warnings being treated as errors
make[4]: *** [db/pysss_la-sysdb.lo] Error 1
Patch attached. (Note however, that I did only check if the package
compiles, not if it works.)
--
Jakub Wilk
diffstat for sssd_1.2.1-4.3 sssd_1.2.1-4.4
debian/patches/format-security.dpatch | 19 +++++++++++++++++++
sssd-1.2.1/debian/changelog | 8 ++++++++
sssd-1.2.1/debian/patches/00list | 1 +
3 files changed, 28 insertions(+)
diff -u sssd-1.2.1/debian/changelog sssd-1.2.1/debian/changelog
--- sssd-1.2.1/debian/changelog
+++ sssd-1.2.1/debian/changelog
@@ -1,3 +1,11 @@
+sssd (1.2.1-4.4) unstable; urgency=low
+
+ * debian/patches/format-security.dpatch: fix FTBFS with
+ -Werror=format-security (closes: #643806). Thanks to Julien Cristau for
+ the bug report.
+
+ -- Jakub Wilk <jw...@debian.org> Thu, 29 Sep 2011 23:33:22 +0200
+
sssd (1.2.1-4.3) unstable; urgency=medium
* Non-maintainer upload.
diff -u sssd-1.2.1/debian/patches/00list sssd-1.2.1/debian/patches/00list
--- sssd-1.2.1/debian/patches/00list
+++ sssd-1.2.1/debian/patches/00list
@@ -3,0 +4 @@
+format-security.dpatch
only in patch2:
unchanged:
--- sssd-1.2.1.orig/debian/patches/format-security.dpatch
+++ sssd-1.2.1/debian/patches/format-security.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## format-security.dpatch by Jakub Wilk <jw...@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix FTBFS with -Werror=format-security
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' sssd-1.2.1~/src/db/sysdb.c sssd-1.2.1/src/db/sysdb.c
+--- sssd-1.2.1~/src/db/sysdb.c 2011-09-29 23:27:47.000000000 +0200
++++ sssd-1.2.1/src/db/sysdb.c 2011-09-29 23:28:49.673994000 +0200
+@@ -847,7 +847,7 @@
+
+ ret = ldb_search(ldb, mem_ctx, &res,
+ basedn, LDB_SCOPE_SUBTREE,
+- attrs, filter);
++ attrs, "%s", filter);
+ if (ret != LDB_SUCCESS) {
+ ret = EIO;
+ goto done;