xfsprogs: activate format-security checks

This patch was taken from upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 47581
This commit is contained in:
Hauke Mehrtens 2015-11-22 14:13:47 +00:00
parent c550ad3d3a
commit dfd358be63
8 changed files with 38 additions and 25 deletions

View file

@ -16,7 +16,6 @@ PKG_MD5SUM:=049cf9873794ea49d0bb3f12d45748a4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_INSTALL:=1 PKG_INSTALL:=1
PKG_FIXUP:=autoreconf PKG_FIXUP:=autoreconf
PKG_CHECK_FORMAT_SECURITY:=0
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk include $(INCLUDE_DIR)/nls.mk

View file

@ -4,8 +4,6 @@ Date: Thu Jan 26 00:34:15 2012 +0100
001-automake-compat 001-automake-compat
diff --git a/configure.in b/configure.in
index 664c0e9..d91b6ec 100644
--- a/configure.in --- a/configure.in
+++ b/configure.in +++ b/configure.in
@@ -2,7 +2,8 @@ AC_INIT(include/libxfs.h) @@ -2,7 +2,8 @@ AC_INIT(include/libxfs.h)
@ -18,8 +16,6 @@ index 664c0e9..d91b6ec 100644
AC_PREFIX_DEFAULT(/usr) AC_PREFIX_DEFAULT(/usr)
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
diff --git a/include/builddefs.in b/include/builddefs.in
index 81ebfcd..5a4a0e8 100644
--- a/include/builddefs.in --- a/include/builddefs.in
+++ b/include/builddefs.in +++ b/include/builddefs.in
@@ -20,6 +20,8 @@ @@ -20,6 +20,8 @@
@ -31,8 +27,6 @@ index 81ebfcd..5a4a0e8 100644
DEBUG = @debug_build@ DEBUG = @debug_build@
OPTIMIZER = @opt_build@ OPTIMIZER = @opt_build@
MALLOCLIB = @malloc_lib@ MALLOCLIB = @malloc_lib@
diff --git a/m4/package_types.m4 b/m4/package_types.m4
index 0a0e087..66a136a 100644
--- a/m4/package_types.m4 --- a/m4/package_types.m4
+++ b/m4/package_types.m4 +++ b/m4/package_types.m4
@@ -9,7 +9,7 @@ AC_DEFUN([AC_TYPE_PSINT], @@ -9,7 +9,7 @@ AC_DEFUN([AC_TYPE_PSINT],

View file

@ -4,8 +4,6 @@ Date: Thu Jan 26 00:35:43 2012 +0100
100-no_aio 100-no_aio
diff --git a/configure.in b/configure.in
index d91b6ec..8dc8b4a 100644
--- a/configure.in --- a/configure.in
+++ b/configure.in +++ b/configure.in
@@ -92,8 +92,8 @@ AC_PACKAGE_GLOBALS(xfsprogs) @@ -92,8 +92,8 @@ AC_PACKAGE_GLOBALS(xfsprogs)

View file

@ -4,8 +4,6 @@ Date: Thu Jan 26 00:36:42 2012 +0100
110-uclibc_no_ustat 110-uclibc_no_ustat
diff --git a/libxfs/linux.c b/libxfs/linux.c
index 2e07d54..6a6c905 100644
--- a/libxfs/linux.c --- a/libxfs/linux.c
+++ b/libxfs/linux.c +++ b/libxfs/linux.c
@@ -21,7 +21,6 @@ @@ -21,7 +21,6 @@
@ -16,7 +14,7 @@ index 2e07d54..6a6c905 100644
#include <sys/mount.h> #include <sys/mount.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/sysinfo.h> #include <sys/sysinfo.h>
@@ -49,6 +51,7 @@ static int max_block_alignment; @@ -49,6 +48,7 @@ static int max_block_alignment;
int int
platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose) platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
{ {
@ -24,7 +22,7 @@ index 2e07d54..6a6c905 100644
/* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */ /* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */
struct ustat ust[2]; struct ustat ust[2];
struct stat64 st; struct stat64 st;
@@ -68,6 +71,7 @@ platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose) @@ -68,6 +68,7 @@ platform_check_ismounted(char *name, cha
progname, name); progname, name);
return 1; return 1;
} }

View file

@ -4,11 +4,9 @@ Date: Thu Jan 26 00:37:52 2012 +0100
120-portability 120-portability
diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c
index c01e0b9..2e2f320 100644
--- a/copy/xfs_copy.c --- a/copy/xfs_copy.c
+++ b/copy/xfs_copy.c +++ b/copy/xfs_copy.c
@@ -463,6 +463,15 @@ read_ag_header(int fd, xfs_agnumber_t agno, wbuf *buf, ag_header_t *ag, @@ -463,6 +463,15 @@ read_ag_header(int fd, xfs_agnumber_t ag
} }

View file

@ -4,8 +4,6 @@ Date: Thu Jan 26 00:38:27 2012 +0100
130-uclibc_no_xattr 130-uclibc_no_xattr
diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index 40c2e6f..4f54059 100644
--- a/fsr/xfs_fsr.c --- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c +++ b/fsr/xfs_fsr.c
@@ -35,7 +35,6 @@ @@ -35,7 +35,6 @@
@ -16,7 +14,7 @@ index 40c2e6f..4f54059 100644
#ifndef XFS_XFLAG_NODEFRAG #ifndef XFS_XFLAG_NODEFRAG
@@ -990,6 +992,7 @@ fsr_setup_attr_fork( @@ -990,6 +989,7 @@ fsr_setup_attr_fork(
int tfd, int tfd,
xfs_bstat_t *bstatp) xfs_bstat_t *bstatp)
{ {
@ -24,7 +22,7 @@ index 40c2e6f..4f54059 100644
struct stat64 tstatbuf; struct stat64 tstatbuf;
int i; int i;
int last_forkoff = 0; int last_forkoff = 0;
@@ -1108,6 +1111,7 @@ fsr_setup_attr_fork( @@ -1108,6 +1108,7 @@ fsr_setup_attr_fork(
out: out:
if (dflag) if (dflag)
fsrprintf(_("set temp attr\n")); fsrprintf(_("set temp attr\n"));

View file

@ -1,7 +1,6 @@
diff -urN xfsprogs-3.1.7/Makefile xfsprogs-3.1.7.new/Makefile --- a/Makefile
--- xfsprogs-3.1.7/Makefile 2011-11-18 00:30:24.000000000 +0100 +++ b/Makefile
+++ xfsprogs-3.1.7.new/Makefile 2012-04-20 14:15:48.641722955 +0200 @@ -41,7 +41,7 @@ endif
@@ -41,7 +41,7 @@
LIB_SUBDIRS = libxfs libxlog libxcmd libhandle libdisk LIB_SUBDIRS = libxfs libxlog libxcmd libhandle libdisk
TOOL_SUBDIRS = copy db estimate fsck fsr growfs io logprint mkfs quota \ TOOL_SUBDIRS = copy db estimate fsck fsr growfs io logprint mkfs quota \
@ -10,7 +9,7 @@ diff -urN xfsprogs-3.1.7/Makefile xfsprogs-3.1.7.new/Makefile
SUBDIRS = include $(LIB_SUBDIRS) $(TOOL_SUBDIRS) SUBDIRS = include $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
@@ -135,7 +135,6 @@ @@ -135,7 +135,6 @@ ifeq ($(HAVE_BUILDDEFS), no)
$(Q)$(MAKE) $(MAKEOPTS) -C . $@ $(Q)$(MAKE) $(MAKEOPTS) -C . $@
else else
$(Q)$(MAKE) $(MAKEOPTS) $(SRCDIR) $(Q)$(MAKE) $(MAKEOPTS) $(SRCDIR)

View file

@ -0,0 +1,29 @@
From: Ben Myers <bpm@sgi.com>
Date: Fri, 1 Feb 2013 21:50:22 +0000 (-0600)
Subject: xfsprogs: fix warning in libxcmd/input.c
X-Git-Tag: v3.1.11~25
X-Git-Url: http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs%2Fcmds%2Fxfsprogs.git;a=commitdiff_plain;h=50a3aa8977821ad072f3aa5b63645827f9b8ca1d
xfsprogs: fix warning in libxcmd/input.c
Fix an error when building with -Werror=format-security.
input.c: In function 'fetchline':
input.c:91:2: error: format not a string literal and no format arguments [-Werror=format-security]
Signed-off-by: Ben Myers <bpm@sgi.com>
Reported by: Arkadiusz Miśkiewicz <arekm@maven.pl>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
---
--- a/libxcmd/input.c
+++ b/libxcmd/input.c
@@ -88,7 +88,7 @@ fetchline(void)
if (!line)
return NULL;
- printf(get_prompt());
+ printf("%s", get_prompt());
fflush(stdout);
if (!fgets(line, MAXREADLINESZ, stdin)) {
free(line);