From owner-p4-projects@FreeBSD.ORG Mon May 16 15:40:52 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5158D16A4D1; Mon, 16 May 2005 15:40:52 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15B8F16A4CE for ; Mon, 16 May 2005 15:40:52 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C895F43D8F for ; Mon, 16 May 2005 15:40:51 +0000 (GMT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j4GFeks0017251 for ; Mon, 16 May 2005 15:40:46 GMT (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4GFeknO017248 for perforce@freebsd.org; Mon, 16 May 2005 15:40:46 GMT (envelope-from areisse@nailabs.com) Date: Mon, 16 May 2005 15:40:46 GMT Message-Id: <200505161540.j4GFeknO017248@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 77055 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2005 15:40:53 -0000 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 #include -#include +#include #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 #include #include -#include "sebsd.h" - +#include +#include 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)