PERFORCE change 79859 for review

Robert Watson rwatson at FreeBSD.org
Sat Jul 9 19:07:24 GMT 2005


http://perforce.freebsd.org/chv.cgi?CH=79859

Change 79859 by rwatson at rwatson_zoo on 2005/07/09 19:06:34

	Staticize functions not exposed ouside of their respective
	components.
	
	Mark currently unused functions as __unused.
	
	Deny/audit bitmasks revert to 32-bits with restoring access_vector_t
	to u32.

Affected files ...

.. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/conditional.c#5 edit
.. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/policydb.c#6 edit
.. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/services.c#11 edit

Differences ...

==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/conditional.c#5 (text+ko) ====

@@ -209,7 +209,7 @@
 	return 0;
 }
 
-int bool_isvalid(struct cond_bool_datum *b)
+static int bool_isvalid(struct cond_bool_datum *b)
 {
 	if (!(b->state == 0 || b->state == 1))
 		return 0;

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

@@ -102,7 +102,7 @@
 /*
  * Initialize the role table.
  */
-int roles_init(struct policydb *p)
+static int roles_init(struct policydb *p)
 {
 	char *key = NULL;
 	int rc;
@@ -483,7 +483,7 @@
 	cond_destroy_bool
 };
 
-void ocontext_destroy(struct ocontext *c, int i)
+static void ocontext_destroy(struct ocontext *c, int i)
 {
 	context_destroy(&c->context[0]);
 	context_destroy(&c->context[1]);

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

@@ -228,9 +228,9 @@
 	 * Initialize the access vectors to the default values.
 	 */
 	avd->allowed = 0;
-	avd->decided = 0xffffffffffffffffLL;
+	avd->decided = 0xffffffff;
 	avd->auditallow = 0;
-	avd->auditdeny = 0xffffffffffffffffLL;
+	avd->auditdeny = 0xffffffff;
 	avd->seqno = latest_granting;
 
 	/*
@@ -317,7 +317,7 @@
 		avd->allowed = requested;
 		avd->decided = requested;
 		avd->auditallow = 0;
-		avd->auditdeny = 0xffffffffffffffffLL;
+		avd->auditdeny = 0xffffffff;
 		avd->seqno = latest_granting;
 		return 0;
 	}
@@ -353,7 +353,7 @@
  * to point to this string and set `*scontext_len' to
  * the length of the string.
  */
-int context_struct_to_string(struct context *context, char **scontext, u32 *scontext_len)
+static int context_struct_to_string(struct context *context, char **scontext, u32 *scontext_len)
 {
 	char *scontextp;
 
@@ -1541,7 +1541,7 @@
 	return err;
 }
 
-int security_get_bools(int *len, char ***names, int **values)
+static __unused int security_get_bools(int *len, char ***names, int **values)
 {
 	int i, rc = ENOMEM;
 
@@ -1591,7 +1591,7 @@
 
 int security_commit_pending_bools(void)
 {
-	int i, rc = 0, seqno;
+	int i, rc = 0, seqno = 0;
 	struct cond_node *cur;
 
 	POLICY_WRLOCK;
@@ -1656,7 +1656,7 @@
 	return (ENOENT);
 }
 
-int security_set_bools(int len, int *values)
+static __unused int security_set_bools(int len, int *values)
 {
 	int i, rc = 0;
 	int lenp, seqno = 0;
@@ -1701,7 +1701,7 @@
 	return rc;
 }
 
-int security_get_bool_value(int bool)
+static __unused int security_get_bool_value(int bool)
 {
 	int rc = 0;
 	int len;


More information about the p4-projects mailing list