Module Name:    src
Committed By:   elad
Date:           Fri Oct  2 23:06:33 UTC 2009

Modified Files:
        src/sys/secmodel/suser: secmodel_suser.c

Log Message:
- Squeeze function declarations where possible,
- KAUTH_RESULT_DEFER is the default (set at the beginning of each listener)
  and as such does not need to be set explicitly in the switches.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/secmodel/suser/secmodel_suser.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/secmodel/suser/secmodel_suser.c
diff -u src/sys/secmodel/suser/secmodel_suser.c:1.8 src/sys/secmodel/suser/secmodel_suser.c:1.9
--- src/sys/secmodel/suser/secmodel_suser.c:1.8	Fri Oct  2 23:00:02 2009
+++ src/sys/secmodel/suser/secmodel_suser.c	Fri Oct  2 23:06:33 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel_suser.c,v 1.8 2009/10/02 23:00:02 elad Exp $ */
+/* $NetBSD: secmodel_suser.c,v 1.9 2009/10/02 23:06:33 elad Exp $ */
 /*-
  * Copyright (c) 2006 Elad Efrat <[email protected]>
  * All rights reserved.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: secmodel_suser.c,v 1.8 2009/10/02 23:00:02 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: secmodel_suser.c,v 1.9 2009/10/02 23:06:33 elad Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -232,8 +232,7 @@
  */
 int
 secmodel_suser_generic_cb(kauth_cred_t cred, kauth_action_t action,
-    void *cookie, void *arg0, void *arg1,
-    void *arg2, void *arg3)
+    void *cookie, void *arg0, void *arg1, void *arg2, void *arg3)
 {
 	bool isroot;
 	int result;
@@ -256,7 +255,6 @@
 		break;
 
 	default:
-		result = KAUTH_RESULT_DEFER;
 		break;
 	}
 
@@ -272,8 +270,7 @@
  */
 int
 secmodel_suser_system_cb(kauth_cred_t cred, kauth_action_t action,
-    void *cookie, void *arg0, void *arg1,
-    void *arg2, void *arg3)
+    void *cookie, void *arg0, void *arg1, void *arg2, void *arg3)
 {
 	bool isroot;
 	int result;
@@ -392,7 +389,6 @@
 			break;
 
 		default:
-			result = KAUTH_RESULT_DEFER;
 			break;
 		}
 
@@ -439,7 +435,6 @@
 			break;
 
 		default:
-			result = KAUTH_RESULT_DEFER;
 			break;
 		}
 		break;
@@ -496,7 +491,6 @@
 		break;
 
 	default:
-		result = KAUTH_RESULT_DEFER;
 		break;
 	}
 
@@ -695,7 +689,6 @@
 		break;
 
 	default:
-		result = KAUTH_RESULT_DEFER;
 		break;
 	}
 
@@ -711,8 +704,7 @@
  */
 int
 secmodel_suser_network_cb(kauth_cred_t cred, kauth_action_t action,
-    void *cookie, void *arg0, void *arg1, void *arg2,
-    void *arg3)
+    void *cookie, void *arg0, void *arg1, void *arg2, void *arg3)
 {
 	bool isroot;
 	int result;
@@ -742,7 +734,6 @@
 			break;
 
 		default:
-			result = KAUTH_RESULT_DEFER;
 			break;
 		}
 
@@ -803,7 +794,6 @@
 			break;
 
 		default:
-			result = KAUTH_RESULT_DEFER;
 			break;
 		}
 		break;
@@ -870,7 +860,6 @@
 			break;
 
 		default:
-			result = KAUTH_RESULT_DEFER;
 			break;
 		}
 		break;
@@ -950,7 +939,6 @@
 
 
 	default:
-		result = KAUTH_RESULT_DEFER;
 		break;
 	}
 
@@ -966,8 +954,7 @@
  */
 int
 secmodel_suser_machdep_cb(kauth_cred_t cred, kauth_action_t action,
-    void *cookie, void *arg0, void *arg1, void *arg2,
-    void *arg3)
+    void *cookie, void *arg0, void *arg1, void *arg2, void *arg3)
 {
         bool isroot;
         int result;
@@ -994,7 +981,6 @@
 		break;
 
 	default:
-		result = KAUTH_RESULT_DEFER;
 		break;
 	}
 
@@ -1010,8 +996,7 @@
  */
 int
 secmodel_suser_device_cb(kauth_cred_t cred, kauth_action_t action,
-    void *cookie, void *arg0, void *arg1, void *arg2,
-    void *arg3)
+    void *cookie, void *arg0, void *arg1, void *arg2, void *arg3)
 {
 	struct tty *tty;
         bool isroot;
@@ -1100,7 +1085,6 @@
 		break;
 
 	default:
-		result = KAUTH_RESULT_DEFER;
 		break;
 	}
 

Reply via email to