Date: Mon, 16 May 2005 15:40:46 GMT From: Andrew Reisse <areisse@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 77055 for review Message-ID: <200505161540.j4GFeknO017248@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=77055 Change 77055 by areisse@areisse_ibook on 2005/05/16 15:40:34 Changes for libselinux and the boolean utilites to compile on darwin. (Untested; most utilities are not built) Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/booleans.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/filecon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/sedarwin_config.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/system.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/Makefile#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/Makefile#2 (text+ko) ==== @@ -1,6 +1,8 @@ +include ../../../Makeconfig + # Installation directories. -MAN8DIR ?= $(DESTDIR)/usr/share/man/man8 -MAN3DIR ?= $(DESTDIR)/usr/share/man/man3 +MAN8DIR = $(DESTDIR)/usr/share/man/man8 +MAN3DIR = $(DESTDIR)/usr/share/man/man3 install: mkdir -p $(MAN3DIR) ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/Makefile#2 (text+ko) ==== @@ -1,20 +1,27 @@ +include ../../../Makeconfig + +CFLAGS+= $(DARWIN_HDRS) -I../.. -I../include -I../../sedarwin + # Installation directories. -PREFIX ?= $(DESTDIR)/usr -LIBDIR ?= $(PREFIX)/lib -SHLIBDIR ?= $(DESTDIR)/lib +PREFIX = $(DESTDIR)/usr +LIBDIR = $(PREFIX)/lib +SHLIBDIR = $(DESTDIR)/lib LIBVERSION = 1 +SRCS= system.c security_get_user_contexts.c get_context_list.c \ + getseccontext.c query_user_context.c \ + context.c \ + get_default_type.c filecon.c sedarwin_config.c \ + freecon.c freeconary.c booleans.c LIBA=libselinux.a -TARGET=libselinux.so -LIBSO=$(TARGET).$(LIBVERSION) -OBJS= $(patsubst %.c,%.o,$(wildcard *.c)) -LOBJS= $(patsubst %.c,%.lo,$(wildcard *.c)) -CFLAGS = -Wall -override CFLAGS += -I../include +#TARGET=libselinux.so +#LIBSO=$(TARGET).$(LIBVERSION) +OBJS= $(patsubst %.c,%.o,$(SRCS)) +LOBJS= $(patsubst %.c,%.lo,$(SRCS)) -all: $(LIBA) $(LIBSO) +all: $(LIBA) $(LIBA): $(OBJS) $(AR) rcs $@ $^ @@ -34,8 +41,8 @@ test -d $(LIBDIR) || install -m 755 -d $(LIBDIR) install -m 644 $(LIBA) $(LIBDIR) test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR) - install -m 755 $(LIBSO) $(SHLIBDIR) - cd $(LIBDIR) && ln -sf ../../`basename $(SHLIBDIR)`/$(LIBSO) $(TARGET) +# install -m 755 $(LIBSO) $(SHLIBDIR) +# cd $(LIBDIR) && ln -sf ../../`basename $(SHLIBDIR)`/$(LIBSO) $(TARGET) clean: rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(TARGET) ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/booleans.c#2 (text+ko) ==== @@ -20,7 +20,7 @@ #include <errno.h> #include <selinux/selinux.h> -#include <security/sebsd/sebsd_syscalls.h> +#include <sedarwin/sebsd_syscalls.h> #include "policy.h" int security_get_boolean_names(char ***names, int *len) ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/filecon.c#2 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/sedarwin_config.c#2 (text+ko) ==== @@ -3,10 +3,11 @@ char *selinux_default_type_path() { - return _DEFTYPE_PATH; + /*return _DEFTYPE_PATH;*/ + return "/etc/security/sedarwin/default_type"; } char *selinux_booleans_path() { - return "/etc/security/sebsd/booleans"; + return "/etc/security/sedarwin/booleans"; } ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/system.c#2 (text+ko) ==== @@ -37,8 +37,8 @@ #include <stdio.h> #include <sys/fcntl.h> #include <stdlib.h> -#include "sebsd.h" - +#include <sedarwin/sebsd.h> +#include <sedarwin/sebsd_syscalls.h> int sebsd_enabled() { ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/Makefile#2 (text+ko) ==== @@ -1,12 +1,24 @@ +include ../../../Makeconfig + +PROG= sebsd_newrole +MAN1= sebsd_newrole.1 + +OBJS= sebsd_newrole.o + +CFLAGS+= $(DARWIN_HDRS) +CFLAGS+= -I$(SOURCE_ROOT)/sedarwin + # Installation directories. -PREFIX ?= $(DESTDIR)/usr -BINDIR ?= $(PREFIX)/bin +PREFIX = $(DESTDIR)/usr +BINDIR = $(PREFIX)/bin -CFLAGS = -Wall override CFLAGS += -I../include -LDLIBS += -L../src -lselinux +LDLIBS += -L../src -lselinux $(LIBMAC) -lmac + +SRCS= getfilecon.c getsebool.c \ + setfilecon.c setsebool.c togglesebool.c -TARGETS=$(patsubst %.c,%,$(wildcard *.c)) +TARGETS=$(patsubst %.c,%,$(SRCS)) all: $(TARGETS)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505161540.j4GFeknO017248>