From owner-p4-projects@FreeBSD.ORG Thu Dec 2 14:30:15 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7557016A4D0; Thu, 2 Dec 2004 14:30:15 +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 3919E16A4CE for ; Thu, 2 Dec 2004 14:30:15 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C47D43D62 for ; Thu, 2 Dec 2004 14:30:15 +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 iB2EUEH2081243 for ; Thu, 2 Dec 2004 14:30:15 GMT (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iB2EUEfY081240 for perforce@freebsd.org; Thu, 2 Dec 2004 14:30:14 GMT (envelope-from areisse@nailabs.com) Date: Thu, 2 Dec 2004 14:30:14 GMT Message-Id: <200412021430.iB2EUEfY081240@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 66259 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: Thu, 02 Dec 2004 14:30:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=66259 Change 66259 by areisse@areisse_tislabs on 2004/12/02 14:29:46 Fix typedefs in ss/conditional.c, and add it to the kernel build. The sebsd branch also builds and runs now. Affected files ... .. //depot/projects/trustedbsd/sebsd/sys/conf/files#16 edit .. //depot/projects/trustedbsd/sebsd/sys/modules/sebsd/Makefile#3 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/conditional.c#3 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/sys/conf/files#16 (text+ko) ==== @@ -1695,6 +1695,7 @@ security/sebsd/ss/sidtab.c optional sebsd security/sebsd/ss/symtab.c optional sebsd security/sebsd/ss/fileutils.c optional sebsd +security/sebsd/ss/conditional.c optional sebsd ufs/ffs/ffs_alloc.c optional ffs ufs/ffs/ffs_balloc.c optional ffs ufs/ffs/ffs_inode.c optional ffs ==== //depot/projects/trustedbsd/sebsd/sys/modules/sebsd/Makefile#3 (text+ko) ==== @@ -18,6 +18,7 @@ services.c \ sidtab.c \ symtab.c \ - fileutils.c + fileutils.c \ + conditional.c .include ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/conditional.c#3 (text+ko) ==== @@ -220,14 +220,14 @@ { char *key = NULL; struct cond_bool_datum *booldatum; - __u32 *buf, len; + u32 *buf, len; booldatum = kmalloc(sizeof(struct cond_bool_datum), GFP_KERNEL); if (!booldatum) return -1; memset(booldatum, 0, sizeof(struct cond_bool_datum)); - buf = next_entry(fp, sizeof(__u32) * 3); + buf = next_entry(fp, sizeof(u32) * 3); if (!buf) goto err; @@ -264,13 +264,13 @@ struct avtab_datum datum; struct avtab_node *node_ptr; int len, i; - __u32 *buf; - __u8 found; + u32 *buf; + u8 found; *ret_list = NULL; len = 0; - buf = next_entry(fp, sizeof(__u32)); + buf = next_entry(fp, sizeof(u32)); if (!buf) return -1; @@ -370,18 +370,18 @@ static int cond_read_node(struct policydb *p, struct cond_node *node, void *fp) { - __u32 *buf; + u32 *buf; int len, i; struct cond_expr *expr = NULL, *last = NULL; - buf = next_entry(fp, sizeof(__u32)); + buf = next_entry(fp, sizeof(u32)); if (!buf) return -1; node->cur_state = le32_to_cpu(buf[0]); len = 0; - buf = next_entry(fp, sizeof(__u32)); + buf = next_entry(fp, sizeof(u32)); if (!buf) return -1; @@ -389,7 +389,7 @@ len = le32_to_cpu(buf[0]); for (i = 0; i < len; i++ ) { - buf = next_entry(fp, sizeof(__u32) * 2); + buf = next_entry(fp, sizeof(u32) * 2); if (!buf) goto err; @@ -426,10 +426,10 @@ int cond_read_list(struct policydb *p, void *fp) { struct cond_node *node, *last = NULL; - __u32 *buf; + u32 *buf; int i, len; - buf = next_entry(fp, sizeof(__u32)); + buf = next_entry(fp, sizeof(u32)); if (!buf) return -1; @@ -469,10 +469,10 @@ for(node = avtab_search_node(ctab, key, AVTAB_AV); node != NULL; node = avtab_search_node_next(node, AVTAB_AV)) { - if ( (__u32) (AVTAB_ALLOWED|AVTAB_ENABLED) == + if ( (u32) (AVTAB_ALLOWED|AVTAB_ENABLED) == (node->datum.specified & (AVTAB_ALLOWED|AVTAB_ENABLED))) avd->allowed |= avtab_allowed(&node->datum); - if ( (__u32) (AVTAB_AUDITDENY|AVTAB_ENABLED) == + if ( (u32) (AVTAB_AUDITDENY|AVTAB_ENABLED) == (node->datum.specified & (AVTAB_AUDITDENY|AVTAB_ENABLED))) /* Since a '0' in an auditdeny mask represents a * permission we do NOT want to audit (dontaudit), we use @@ -480,7 +480,7 @@ * are retained (much unlike the allow and auditallow cases). */ avd->auditdeny &= avtab_auditdeny(&node->datum); - if ( (__u32) (AVTAB_AUDITALLOW|AVTAB_ENABLED) == + if ( (u32) (AVTAB_AUDITALLOW|AVTAB_ENABLED) == (node->datum.specified & (AVTAB_AUDITALLOW|AVTAB_ENABLED))) avd->auditallow |= avtab_auditallow(&node->datum); }