From: Ralf Jung Date: Thu, 13 Sep 2012 16:53:59 +0000 (+0200) Subject: Fix compilation with hardening flags X-Git-Tag: debian/1.3.2-1~20 X-Git-Url: https://git.ralfj.de/osspd.git/commitdiff_plain/cd12997c1cf217946352e3ab4285b3a50c5dc87a?hp=c2e31a47a3c670faca4ac9f207518558417b4f71 Fix compilation with hardening flags --- diff --git a/debian/patches/0001-Fix-compilation-with-Werror-format-security.patch b/debian/patches/0001-Fix-compilation-with-Werror-format-security.patch new file mode 100644 index 0000000..d688de1 --- /dev/null +++ b/debian/patches/0001-Fix-compilation-with-Werror-format-security.patch @@ -0,0 +1,44 @@ +From: Ralf Jung +Date: Thu, 13 Sep 2012 18:36:54 +0200 +Subject: Fix compilation with -Werror=format-security + +--- + ossp-slave.c | 4 ++-- + osspd.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/ossp-slave.c b/ossp-slave.c +index 4c5cb2d..a290636 100644 +--- a/ossp-slave.c ++++ b/ossp-slave.c +@@ -89,7 +89,7 @@ void ossp_slave_init(int argc, char **argv) + } + + if (!have_uid || !have_gid || ossp_cmd_fd < 0 || ossp_notify_fd < 0) { +- fprintf(stderr, usage); ++ fputs(usage, stderr); + _exit(1); + } + +@@ -105,7 +105,7 @@ void ossp_slave_init(int argc, char **argv) + void *p; + + if (!mmap_off || !mmap_size) { +- fprintf(stderr, usage); ++ fputs(usage, stderr); + _exit(1); + } + +diff --git a/osspd.c b/osspd.c +index 37c9b35..1dbe586 100644 +--- a/osspd.c ++++ b/osspd.c +@@ -2109,7 +2109,7 @@ static int process_arg(void *data, const char *arg, int key, + + switch (key) { + case 0: +- fprintf(stderr, usage); ++ fputs(usage, stderr); + param->help = 1; + return 0; + case 1: diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..b4cc690 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-Fix-compilation-with-Werror-format-security.patch