policycoreutils/policycoreutils-rhat.patch

187 lines
6.5 KiB
Diff
Raw Normal View History

diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-1.21.18/scripts/fixfiles
--- nsapolicycoreutils/scripts/fixfiles 2005-02-08 13:27:03.000000000 -0500
+++ policycoreutils-1.21.18/scripts/fixfiles 2005-02-19 08:15:42.000000000 -0500
@@ -78,8 +78,8 @@
esac; \
fi; \
done | \
- while read pattern ; do find $pattern -maxdepth 0 -print; done 2> /dev/null | \
- ${RESTORECON} -R $2 -v -e /root -e /home -e /tmp -e /var/tmp -e /dev -f -
+ while read pattern ; do find $pattern -fstype ext2 -fstype ext3 -fstype reiserfs -fstype xfs -print; done 2> /dev/null | \
+ ${RESTORECON} $2 -v -e /root -e /home -e /tmp -e /var/tmp -e /dev -f -
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