summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-11-06 19:56:58 +0000
committerrwatson <rwatson@FreeBSD.org>2001-11-06 19:56:58 +0000
commit08fb9c82f6a1e785b0c657e5a77ba8dd814bb242 (patch)
treea6a854d2f40fa1d29f0376cefb148715a79216a5
parent9e980199c27d6691e18289e44a59ad59be7b8cf7 (diff)
downloadFreeBSD-src-08fb9c82f6a1e785b0c657e5a77ba8dd814bb242.zip
FreeBSD-src-08fb9c82f6a1e785b0c657e5a77ba8dd814bb242.tar.gz
o Remove double-indentation of sysctl_kern_securelvl. This change is
consistent with the one other function in the file, and prevents long lines in up-coming changes. This nominally pulls kern_mib.c a little further down the long path to style(9) compliance.
-rw-r--r--sys/kern/kern_mib.c61
1 files changed, 30 insertions, 31 deletions
diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c
index c59c9aa..008c7f7 100644
--- a/sys/kern/kern_mib.c
+++ b/sys/kern/kern_mib.c
@@ -183,42 +183,41 @@ int securelevel = -1;
static int
sysctl_kern_securelvl(SYSCTL_HANDLER_ARGS)
{
- int error, level;
-
- /*
- * If the process is in jail, return the maximum of the
- * global and local levels; otherwise, return the global
- * level.
- */
- if (req->p->p_ucred->cr_prison != NULL)
- level = imax(securelevel,
- req->p->p_ucred->cr_prison->pr_securelevel);
- else
- level = securelevel;
- error = sysctl_handle_int(oidp, &level, 0, req);
- if (error || !req->newptr)
- return (error);
- /*
- * Permit update only if the new securelevel exceeds the
- * global level, and local level if any.
- */
- if (req->p->p_ucred->cr_prison != NULL) {
+ int error, level;
+
+ /*
+ * If the process is in jail, return the maximum of the global and
+ * local levels; otherwise, return the global level.
+ */
+ if (req->p->p_ucred->cr_prison != NULL)
+ level = imax(securelevel,
+ req->p->p_ucred->cr_prison->pr_securelevel);
+ else
+ level = securelevel;
+ error = sysctl_handle_int(oidp, &level, 0, req);
+ if (error || !req->newptr)
+ return (error);
+ /*
+ * Permit update only if the new securelevel exceeds the
+ * global level, and local level if any.
+ */
+ if (req->p->p_ucred->cr_prison != NULL) {
#ifdef REGRESSION
- if (!regression_securelevel_nonmonotonic)
+ if (!regression_securelevel_nonmonotonic)
#endif /* !REGRESSION */
- if (level < imax(securelevel,
- req->p->p_ucred->cr_prison->pr_securelevel))
- return (EPERM);
+ if (level < imax(securelevel,
+ req->p->p_ucred->cr_prison->pr_securelevel))
+ return (EPERM);
req->p->p_ucred->cr_prison->pr_securelevel = level;
- } else {
+ } else {
#ifdef REGRESSION
- if (!regression_securelevel_nonmonotonic)
+ if (!regression_securelevel_nonmonotonic)
#endif /* !REGRESSION */
- if (level < securelevel)
- return (EPERM);
- securelevel = level;
- }
- return (error);
+ if (level < securelevel)
+ return (EPERM);
+ securelevel = level;
+ }
+ return (error);
}
SYSCTL_PROC(_kern, KERN_SECURELVL, securelevel,
OpenPOWER on IntegriCloud