PERFORCE change 87606 for review
Todd Miller
millert at FreeBSD.org
Thu Dec 1 21:27:05 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=87606
Change 87606 by millert at 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;
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list