From owner-p4-projects@FreeBSD.ORG Thu Dec 1 21:27:14 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 916E316A422; Thu, 1 Dec 2005 21:27:13 +0000 (GMT) X-Original-To: perforce@freebsd.org 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 54BF516A41F for ; Thu, 1 Dec 2005 21:27:13 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0949743D5D for ; Thu, 1 Dec 2005 21:27:05 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jB1LR5fW083842 for ; Thu, 1 Dec 2005 21:27:05 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jB1LR5Hi083839 for perforce@freebsd.org; Thu, 1 Dec 2005 21:27:05 GMT (envelope-from millert@freebsd.org) Date: Thu, 1 Dec 2005 21:27:05 GMT Message-Id: <200512012127.jB1LR5Hi083839@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 87606 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2005 21:27:14 -0000 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 +#include #include -#include + #include #include #include #include #include -#include + +#include #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;