PERFORCE change 66259 for review
Andrew Reisse
areisse at FreeBSD.org
Thu Dec 2 14:30:14 GMT 2004
http://perforce.freebsd.org/chv.cgi?CH=66259
Change 66259 by areisse at 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 <bsd.kmod.mk>
==== //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);
}
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