Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Apr 2002 12:25:51 -0700 (PDT)
From:      Chris Vance <cvance@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 10533 for review
Message-ID:  <200204301925.g3UJPpL56888@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=10533

Change 10533 by cvance@cvance_korben on 2002/04/30 12:24:51

	Just a small collection of minor revisions to clean up the compile.
	Nothing major: removing unused functions, clearing up prototypes and
	includes.

Affected files ...

... //depot/projects/trustedbsd/mac/sys/security/sebsd/avc/avc.h#4 edit
... //depot/projects/trustedbsd/mac/sys/security/sebsd/sebsd.c#3 edit
... //depot/projects/trustedbsd/mac/sys/security/sebsd/ss/hashtab.c#3 edit
... //depot/projects/trustedbsd/mac/sys/security/sebsd/ss/init.c#4 edit
... //depot/projects/trustedbsd/mac/sys/security/sebsd/ss/policydb.c#3 edit
... //depot/projects/trustedbsd/mac/sys/security/sebsd/ss/security.h#2 edit
... //depot/projects/trustedbsd/mac/sys/security/sebsd/ss/services.c#4 edit
... //depot/projects/trustedbsd/mac/sys/security/sebsd/ss/sidtab.c#4 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/security/sebsd/avc/avc.h#4 (text+ko) ====

@@ -218,7 +218,7 @@
 {
 	struct avc_entry *ae;
 	int             rc;
-	unsigned long	flags;
+/* 	unsigned long	flags; */
 	struct avc_entry entry;
 	__u32 seqno;
 

==== //depot/projects/trustedbsd/mac/sys/security/sebsd/sebsd.c#3 (text+ko) ====

@@ -72,7 +72,7 @@
 sysctl_rule(SYSCTL_HANDLER_ARGS)
 {
 	u_int namelen;
-	int error, index, *name;
+	int *name;
 
 	name = (int *)arg1;
 	namelen = arg2;
@@ -103,7 +103,11 @@
 	/* Destroy ruleset lock. */
 }
 
-void
+/*
+ * Initialize the SEBSD security server after the root partition has
+ * been mounted; policy is located on root partition.
+ */
+static void
 sebsd_create_root_mount(struct ucred *cred, struct mount *mp)
 {
 	printf("sebsd hook:: create_root_mount\n");
@@ -121,19 +125,4 @@
 
 MAC_POLICY_SET(sebsd_ops, trustedbsd_sebsd, "Security Enhanced BSD", 1);
 
-
-/*
- * Initialize the SEBSD security server after the root partition has
- * been mounted; policy is located on root partition.
- */
-void
-ss_init(void)
-{
-	if (security_init())
-		panic("SEBSD: can't initialize security server");
-}
-
-/* SYSINIT(sebsd, SI_SUB_SMP, SI_ORDER_ANY, ss_init, NULL) */
-/* SYSINIT(sebsd, SI_SUB_MOUNT_ROOT, SI_ORDER_ANY, ss_init, NULL) */
-
 #endif /* !MAC */

==== //depot/projects/trustedbsd/mac/sys/security/sebsd/ss/hashtab.c#3 (text+ko) ====

@@ -10,6 +10,7 @@
 #if defined(__FreeBSD__) && defined(_KERNEL)
 #include <sys/param.h>
 #include <sys/conf.h>
+#include <sys/systm.h>
 #include <sys/kernel.h>
 #endif /* FreeBSD _KERNEL */
 

==== //depot/projects/trustedbsd/mac/sys/security/sebsd/ss/init.c#4 (text+ko) ====

@@ -12,8 +12,10 @@
 #include <sys/param.h>
 #include <sys/conf.h>
 #include <sys/kernel.h>
+#include <sys/malloc.h>
 
 #include <security/sebsd/linux-compat.h>
+#include <security/sebsd/sebsd.h>
 #include <security/sebsd/ss/fileutils.h>
 #include <security/sebsd/ss/global.h>
 #include <security/sebsd/ss/policydb.h>

==== //depot/projects/trustedbsd/mac/sys/security/sebsd/ss/policydb.c#3 (text+ko) ====

@@ -43,7 +43,7 @@
 /* 
  * Initialize the role table.
  */
-int roles_init(policydb_t *p)
+static int roles_init(policydb_t *p)
 {
 	char *key = 0;
 	role_datum_t *role;

==== //depot/projects/trustedbsd/mac/sys/security/sebsd/ss/security.h#2 (text+ko) ====

@@ -22,9 +22,6 @@
 #include <linux/flask/flask.h>
 #endif /* __FreeBSD__ */
 
-/* Initialize the security server */
-int security_init(void); 
-
 /*
  * Compute access vectors based on a SID pair for
  * the permissions in a particular class.

==== //depot/projects/trustedbsd/mac/sys/security/sebsd/ss/services.c#4 (text+ko) ====

@@ -31,6 +31,7 @@
 #include <security/sebsd/linux-compat.h>
 #include <security/sebsd/flask.h>
 #include <security/sebsd/avc/avc.h>
+#include <security/sebsd/avc/avc_ss.h>
 
 #include <security/sebsd/ss/global.h>
 #include <security/sebsd/ss/context.h>

==== //depot/projects/trustedbsd/mac/sys/security/sebsd/ss/sidtab.c#4 (text+ko) ====

@@ -100,7 +100,7 @@
 	return 0;
 }
 
-
+#if defined(__FreeBSD__) && !defined(_KERNEL)
 int sidtab_remove(sidtab_t * s, security_id_t sid)
 {
 	int hvalue;
@@ -132,7 +132,7 @@
 	s->nel--;
 	return 0;
 }
-
+#endif /* __FreeBSD__ && !_KERNEL */
 
 context_struct_t *
  sidtab_search(sidtab_t * s, security_id_t sid)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204301925.g3UJPpL56888>