Mercurial > illumos > fmac
changeset 7887:f9ded24b041a
[fmac-discuss] [PATCH] Fix more cstyle issues
Fix more cstyle issues introduced by prior patches, in particular the
hasprocperm patch and the secctx patch.
uts/common/syscall/lgrpsys.c is still not clean with regard to
continuation indentation but the remaining warnings were not introduced
by our patches.
author | Stephen Smalley <sds@tycho.nsa.gov> |
---|---|
date | Fri, 17 Oct 2008 13:28:50 -0400 |
parents | 2b3705cc2d65 |
children | dc5a88b1d093 |
files | usr/src/uts/common/contract/process.c usr/src/uts/common/disp/class.c usr/src/uts/common/fs/xattr.c usr/src/uts/common/os/cpu.c usr/src/uts/common/os/klpd.c usr/src/uts/common/syscall/corectl.c usr/src/uts/common/syscall/lgrpsys.c |
diffstat | 7 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/contract/process.c Fri Oct 17 13:28:43 2008 -0400 +++ b/usr/src/uts/common/contract/process.c Fri Oct 17 13:28:50 2008 -0400 @@ -492,7 +492,7 @@ cankill = hasprocperm(tp->p_cred, ctp->conp_cred, PROCESS__SIGKILL); mutex_exit(&tp->p_crlock); if (cankill || (sp && prochasprocperm(tp, sp, CRED(), - PROCESS__SIGKILL))) + PROCESS__SIGKILL))) return (1); return (0);
--- a/usr/src/uts/common/disp/class.c Fri Oct 17 13:28:43 2008 -0400 +++ b/usr/src/uts/common/disp/class.c Fri Oct 17 13:28:50 2008 -0400 @@ -261,7 +261,7 @@ * Check basic permissions. */ if (!prochasprocperm(targpp, reqpp, reqpcredp, - PROCESS__SETSCHED)) { + PROCESS__SETSCHED)) { crfree(reqpcredp); return (EPERM); }
--- a/usr/src/uts/common/fs/xattr.c Fri Oct 17 13:28:43 2008 -0400 +++ b/usr/src/uts/common/fs/xattr.c Fri Oct 17 13:28:50 2008 -0400 @@ -683,13 +683,13 @@ break; case F_SECCTX: if (!secctx || - strlen(secctx) >= sizeof (xoap->xoa_secctx)) { + strlen(secctx) >= sizeof (xoap->xoa_secctx)) { nvlist_free(nvp); return (EINVAL); } XVA_SET_REQ(&xvattr, XAT_SECCTX); (void) strncpy(xoap->xoa_secctx, secctx, - sizeof (xoap->xoa_secctx)); + sizeof (xoap->xoa_secctx)); break; default: break;
--- a/usr/src/uts/common/os/cpu.c Fri Oct 17 13:28:43 2008 -0400 +++ b/usr/src/uts/common/os/cpu.c Fri Oct 17 13:28:50 2008 -0400 @@ -2505,7 +2505,7 @@ * or hasprocperm() fails. */ if (tp->t_cid == 0 || !hasprocperm(tp->t_cred, CRED(), - PROCESS__SETSCHED)) { + PROCESS__SETSCHED)) { *error = EPERM; thread_unlock(tp); return (0);
--- a/usr/src/uts/common/os/klpd.c Fri Oct 17 13:28:43 2008 -0400 +++ b/usr/src/uts/common/os/klpd.c Fri Oct 17 13:28:50 2008 -0400 @@ -550,7 +550,7 @@ mutex_enter(&pidlock); p = prfind(pid); if (p == NULL || !prochasprocperm(p, curproc, CRED(), - PROCESS__PTRACE)) { + PROCESS__PTRACE)) { mutex_exit(&pidlock); klpd_rele(kpd); return (set_errno(p == NULL ? ESRCH : EPERM));
--- a/usr/src/uts/common/syscall/corectl.c Fri Oct 17 13:28:43 2008 -0400 +++ b/usr/src/uts/common/syscall/corectl.c Fri Oct 17 13:28:50 2008 -0400 @@ -287,7 +287,7 @@ mutex_exit(&pidlock); mutex_enter(&p->p_crlock); if (!hasprocperm(p->p_cred, CRED(), - PROCESS__GETCORE)) + PROCESS__GETCORE)) error = EPERM; else if (p->p_corefile != NULL) rp = corectl_path_value(p->p_corefile); @@ -437,7 +437,7 @@ mutex_enter(&p->p_crlock); if (!(p->p_flag & SSYS) && hasprocperm(p->p_cred, CRED(), - PROCESS__SETCORE)) { + PROCESS__SETCORE)) { mutex_exit(&p->p_crlock); counterp->cc_count++; if (counterp->cc_path != NULL) {
--- a/usr/src/uts/common/syscall/lgrpsys.c Fri Oct 17 13:28:43 2008 -0400 +++ b/usr/src/uts/common/syscall/lgrpsys.c Fri Oct 17 13:28:50 2008 -0400 @@ -345,7 +345,7 @@ * affinity for LWP */ if (t->t_cid == 0 || !hasprocperm(t->t_cred, CRED(), - PROCESS__SETSCHED)) { + PROCESS__SETSCHED)) { thread_unlock(t); return (set_errno(EPERM)); } @@ -588,7 +588,7 @@ * thread */ if (t->t_cid == 0 || !hasprocperm(t->t_cred, CRED(), - PROCESS__SETSCHED)) { + PROCESS__SETSCHED)) { thread_unlock(t); return (set_errno(EPERM)); } @@ -960,7 +960,7 @@ * thread */ if (t->t_cid == 0 || !hasprocperm(t->t_cred, CRED(), - PROCESS__SETSCHED)) { + PROCESS__SETSCHED)) { thread_unlock(t); return (set_errno(EPERM)); }