Date: Thu, 1 Dec 2005 21:27:05 GMT From: Todd Miller <millert@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 87606 for review Message-ID: <200512012127.jB1LR5Hi083839@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=87606 Change 87606 by millert@millert_g4tower on 2005/12/01 21:26:41 Call get_ordered_context_list() with the correct arguments and pull in the appropriate header so we get its prototype. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/wslogin/Makefile#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/wslogin/wslogin.c#4 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/wslogin/Makefile#4 (text+ko) ==== @@ -1,14 +1,14 @@ include ../../../Makeconfig +LIBSELINUX= $(SOURCE_ROOT)/sedarwin/libselinux OBJS = wslogin.o -CFLAGS+= -I$(SOURCE_ROOT)/sedarwin -CFLAGS+= $(DARWIN_HDRS) +CFLAGS+= -I$(SOURCE_ROOT)/sedarwin -I$(LIBSELINUX)/include $(DARWIN_HDRS) INSTALL?= install all: wslogin.dylib build/wsloginui.app wslogin.dylib: $(OBJS) - gcc -dynamiclib -o $@ $(OBJS) ../../libselinux/src/libselinux.a $(DARWIN_ROOT)/libmac/*.o + gcc -dynamiclib -o $@ $(OBJS) $(LIBSELINUX)/src/libselinux.a $(DARWIN_ROOT)/libmac/*.o build/wsloginui.app: LabelChooser.m LabelChooser.h main.m xcodebuild ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/wslogin/wslogin.c#4 (text+ko) ==== @@ -1,13 +1,15 @@ #include <sys/types.h> +#include <sys/mman.h> #include <sys/mac.h> -#include <sedarwin/sebsd.h> + #include <string.h> #include <unistd.h> #include <syslog.h> #include <errno.h> #include <stdio.h> -#include <sys/mman.h> + +#include <selinux/get_context_list.h> #define errexit(args...) \ { \ @@ -78,13 +80,12 @@ { char *labeltext, *queried, **contexts; - size_t ncontexts; - int n; + int n, ncontexts; FILE *fp; char userlabel[512]; - if (get_ordered_context_list(username, NULL, &contexts, - &ncontexts) < 0 || ncontexts == 0) + ncontexts = get_ordered_context_list(username, NULL, &contexts); + if (ncontexts <= 0) errexit ("Getting context list for %s: %s", username, strerror (errno)); #if 0 int retries = 3;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512012127.jB1LR5Hi083839>