* Mon Feb 21 2005 Dan Walsh <dwalsh@redhat.com> 1.21.18-2
- Apply Uli patch * The Makefiles should use the -Wall option even if compiled in beehive * Add -W, too * use -Werror when used outside of beehive. This could also be used unconditionally * setfiles/setfiles.c: fix resulting warning * restorecon/restorecon.c: Likewise * run_init/open_init_pty.c: argc hasn't been checked, the program would crash if called without parameters. ignore the return value of nice properly. * run_init: don't link with -ldl lutil * load_policy: that's the bad bug. pointer to unsigned int is passed, size_t is written to. fails on 64-bit archs * sestatus: signed vs unsigned problem * newrole: don't link with -ldl
This commit is contained in:
parent
9cde60440f
commit
485d2dcb05
@ -12,3 +12,175 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policyc
|
||||
rm -f ${TEMPFILE}
|
||||
fi
|
||||
}
|
||||
--- policycoreutils-1.21.18/newrole/Makefile.basic 2005-02-19 04:47:46.000000000 -0800
|
||||
+++ policycoreutils-1.21.18/newrole/Makefile 2005-02-20 11:07:24.765133040 -0800
|
||||
@@ -5,9 +5,9 @@
|
||||
ETCDIR ?= $(DESTDIR)/etc
|
||||
LOCALEDIR = /usr/share/locale
|
||||
|
||||
-CFLAGS = -Wall
|
||||
-override CFLAGS += -DUSE_NLS -DUSE_PAM -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
|
||||
-LDLIBS += -lselinux -ldl -lpam -lpam_misc
|
||||
+CFLAGS = -Werror
|
||||
+override CFLAGS += -DUSE_NLS -DUSE_PAM -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" -Wall -W
|
||||
+LDLIBS += -lselinux -lpam -lpam_misc
|
||||
|
||||
TARGETS=$(patsubst %.c,%,$(wildcard *.c))
|
||||
|
||||
--- policycoreutils-1.21.18/setfiles/setfiles.c.basic 2005-02-19 04:47:46.000000000 -0800
|
||||
+++ policycoreutils-1.21.18/setfiles/setfiles.c 2005-02-20 11:10:17.287905592 -0800
|
||||
@@ -233,7 +233,9 @@
|
||||
* the directory traversal.
|
||||
*/
|
||||
static int apply_spec(const char *file,
|
||||
- const struct stat *sb_unused, int flag, struct FTW *s_unused)
|
||||
+ const struct stat *sb_unused __attribute__((unused)),
|
||||
+ int flag,
|
||||
+ struct FTW *s_unused __attribute__((unused)))
|
||||
{
|
||||
const char *my_file;
|
||||
struct stat my_sb;
|
||||
--- policycoreutils-1.21.18/setfiles/Makefile.basic 2005-02-19 04:47:46.000000000 -0800
|
||||
+++ policycoreutils-1.21.18/setfiles/Makefile 2005-02-20 11:07:24.766132888 -0800
|
||||
@@ -3,8 +3,8 @@
|
||||
SBINDIR ?= $(PREFIX)/sbin
|
||||
MANDIR = $(PREFIX)/share/man
|
||||
|
||||
-CFLAGS = -Wall
|
||||
-override CFLAGS += -D_FILE_OFFSET_BITS=64
|
||||
+CFLAGS = -Werror
|
||||
+override CFLAGS += -D_FILE_OFFSET_BITS=64 -Wall -W
|
||||
LDLIBS += -lselinux -lsepol
|
||||
|
||||
all: setfiles
|
||||
--- policycoreutils-1.21.18/restorecon/restorecon.c.basic 2005-02-19 04:47:46.000000000 -0800
|
||||
+++ policycoreutils-1.21.18/restorecon/restorecon.c 2005-02-20 11:07:24.766132888 -0800
|
||||
@@ -231,7 +231,9 @@
|
||||
return errors;
|
||||
}
|
||||
static int apply_spec(const char *file,
|
||||
- const struct stat *sb_unused, int flag, struct FTW *s_unused)
|
||||
+ const struct stat *sb_unused __attribute__((unused)),
|
||||
+ int flag,
|
||||
+ struct FTW *s_unused __attribute__((unused)))
|
||||
{
|
||||
if (flag == FTW_DNR) {
|
||||
fprintf(stderr, "%s: unable to read directory %s\n",
|
||||
--- policycoreutils-1.21.18/restorecon/Makefile.basic 2005-02-19 04:47:46.000000000 -0800
|
||||
+++ policycoreutils-1.21.18/restorecon/Makefile 2005-02-20 11:07:24.767132736 -0800
|
||||
@@ -3,8 +3,8 @@
|
||||
SBINDIR ?= $(DESTDIR)/sbin
|
||||
MANDIR = $(PREFIX)/share/man
|
||||
|
||||
-CFLAGS = -Wall
|
||||
-override CFLAGS += -D_FILE_OFFSET_BITS=64
|
||||
+CFLAGS = -Werror
|
||||
+override CFLAGS += -D_FILE_OFFSET_BITS=64 -Wall -W
|
||||
LDLIBS += -lselinux
|
||||
|
||||
all: restorecon
|
||||
--- policycoreutils-1.21.18/run_init/open_init_pty.c.basic 2005-02-19 04:47:46.000000000 -0800
|
||||
+++ policycoreutils-1.21.18/run_init/open_init_pty.c 2005-02-20 11:07:24.768132584 -0800
|
||||
@@ -125,6 +125,12 @@
|
||||
struct timespec timeout;
|
||||
char buf[16384];
|
||||
|
||||
+ if (argc == 1)
|
||||
+ {
|
||||
+ printf("usage: %s PROGRAM [ARGS]...\n", argv[0]);
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
sigset_t signal_set;
|
||||
siginfo_t signalinfo;
|
||||
|
||||
@@ -244,7 +250,7 @@
|
||||
|
||||
|
||||
/* ignore return from nice, but lower our priority */
|
||||
- nice(19);
|
||||
+ int ignore __attribute__ ((unused)) = nice(19);
|
||||
|
||||
/* while no signal, we loop around */
|
||||
int done = 0;
|
||||
--- policycoreutils-1.21.18/run_init/Makefile.basic 2005-02-19 04:47:46.000000000 -0800
|
||||
+++ policycoreutils-1.21.18/run_init/Makefile 2005-02-20 11:07:24.768132584 -0800
|
||||
@@ -6,16 +6,16 @@
|
||||
ETCDIR ?= $(DESTDIR)/etc
|
||||
LOCALEDIR ?= /usr/share/locale
|
||||
|
||||
-CFLAGS = -Wall
|
||||
-override CFLAGS += -DUSE_NLS -DUSE_PAM -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
|
||||
-LDLIBS += -lselinux -ldl -lpam -lpam_misc -lutil
|
||||
+CFLAGS = -Werror
|
||||
+override CFLAGS += -DUSE_NLS -DUSE_PAM -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" -Wall -W
|
||||
+LDLIBS += -lselinux -lpam -lpam_misc
|
||||
|
||||
TARGETS=$(patsubst %.c,%,$(wildcard *.c))
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
open_init_pty: open_init_pty.c
|
||||
- $(LINK.c) $^ -lutil -o $@
|
||||
+ $(LINK.c) $^ -ldl -lutil -o $@
|
||||
|
||||
|
||||
install: all
|
||||
--- policycoreutils-1.21.18/load_policy/Makefile.basic 2005-02-19 04:47:46.000000000 -0800
|
||||
+++ policycoreutils-1.21.18/load_policy/Makefile 2005-02-20 11:07:24.768132584 -0800
|
||||
@@ -4,8 +4,8 @@
|
||||
MANDIR ?= $(PREFIX)/share/man
|
||||
LOCALEDIR ?= /usr/share/locale
|
||||
|
||||
-CFLAGS = -Wall
|
||||
-override CFLAGS += -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
|
||||
+CFLAGS = -Werror
|
||||
+override CFLAGS += -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" -Wall -W
|
||||
LDLIBS += -lsepol -lselinux
|
||||
|
||||
TARGETS=$(patsubst %.c,%,$(wildcard *.c))
|
||||
--- policycoreutils-1.21.18/load_policy/load_policy.c.basic 2005-02-19 04:47:46.000000000 -0800
|
||||
+++ policycoreutils-1.21.18/load_policy/load_policy.c 2005-02-20 11:07:24.769132432 -0800
|
||||
@@ -30,7 +30,8 @@
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int fd, ret, opt, quiet=0, setbools = 0, *values;
|
||||
- unsigned len, i, data_size;
|
||||
+ unsigned len, i;
|
||||
+ size_t data_size;
|
||||
struct stat sb;
|
||||
void *map, *data;
|
||||
char *polpath, *boolpath = NULL, **names;
|
||||
--- policycoreutils-1.21.18/sestatus/sestatus.c.basic 2005-02-19 04:47:46.000000000 -0800
|
||||
+++ policycoreutils-1.21.18/sestatus/sestatus.c 2005-02-20 11:07:24.770132280 -0800
|
||||
@@ -30,7 +30,7 @@
|
||||
#define BUFSIZE 255
|
||||
|
||||
/* column to put the output (must be a multiple of 8) */
|
||||
-static int COL=32;
|
||||
+static unsigned int COL=32;
|
||||
|
||||
extern char *selinux_mnt;
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
void printf_tab(const char *outp) {
|
||||
char buf[20];
|
||||
- snprintf(buf, sizeof(buf), "%%-%ds", COL);
|
||||
+ snprintf(buf, sizeof(buf), "%%-%us", COL);
|
||||
printf(buf, outp);
|
||||
|
||||
}
|
||||
--- policycoreutils-1.21.18/sestatus/Makefile.basic 2005-02-19 04:47:46.000000000 -0800
|
||||
+++ policycoreutils-1.21.18/sestatus/Makefile 2005-02-20 11:07:24.770132280 -0800
|
||||
@@ -4,8 +4,8 @@
|
||||
MANDIR = $(PREFIX)/share/man
|
||||
ETCDIR ?= $(DESTDIR)/etc
|
||||
|
||||
-CFLAGS = -Wall
|
||||
-override CFLAGS += -D_FILE_OFFSET_BITS=64
|
||||
+CFLAGS = -Werror
|
||||
+override CFLAGS += -D_FILE_OFFSET_BITS=64 -Wall -W
|
||||
LDLIBS += -lselinux
|
||||
|
||||
all: sestatus
|
||||
|
@ -3,7 +3,7 @@
|
||||
Summary: SELinux policy core utilities.
|
||||
Name: policycoreutils
|
||||
Version: 1.21.18
|
||||
Release: 1
|
||||
Release: 2
|
||||
License: GPL
|
||||
Group: System Environment/Base
|
||||
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
||||
@ -82,6 +82,21 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%config(noreplace) %{_sysconfdir}/sestatus.conf
|
||||
|
||||
%changelog
|
||||
* Mon Feb 21 2005 Dan Walsh <dwalsh@redhat.com> 1.21.18-2
|
||||
- Apply Uli patch
|
||||
* The Makefiles should use the -Wall option even if compiled in beehive
|
||||
* Add -W, too
|
||||
* use -Werror when used outside of beehive. This could also be used unconditionally
|
||||
* setfiles/setfiles.c: fix resulting warning
|
||||
* restorecon/restorecon.c: Likewise
|
||||
* run_init/open_init_pty.c: argc hasn't been checked, the program would crash if
|
||||
called without parameters. ignore the return value of nice properly.
|
||||
* run_init: don't link with -ldl lutil
|
||||
* load_policy: that's the bad bug. pointer to unsigned int is passed, size_t is
|
||||
written to. fails on 64-bit archs
|
||||
* sestatus: signed vs unsigned problem
|
||||
* newrole: don't link with -ldl
|
||||
|
||||
* Sat Feb 19 2005 Dan Walsh <dwalsh@redhat.com> 1.21.18-1
|
||||
- Update to latest from NSA
|
||||
* Changed load_policy to fall back to the original policy upon
|
||||
|
Loading…
Reference in New Issue
Block a user