Date: Mon, 7 Nov 2005 15:25:22 GMT From: Todd Miller <millert@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 86418 for review Message-ID: <200511071525.jA7FPMcA096638@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=86418 Change 86418 by millert@millert_ibook on 2005/11/07 15:24:50 style(9) cleanup Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/mach_av.c#5 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/mach_av.c#5 (text+ko) ==== @@ -68,25 +68,25 @@ int sebsd_check_ipc_method1(int subj, int obj, int msgid) { - struct msgid_classinfo *mcl = hashtab_search(msgid2class, &msgid); - int i; + struct msgid_classinfo *mcl; + struct av_decision ad; + access_vector_t perms; + int cl; /* * Return allowed for messages in an unknown subsystem. * Instead, we probably should make a check against a * new permission to be added to mach_port for this purpose. */ - if (!mcl) + mcl = hashtab_search(msgid2class, &msgid); + if (mcl == NULL) return 0; - struct av_decision avd; - int cl = (msgid-mcl->baseid) / (8*sizeof(access_vector_t)); - access_vector_t perms; - + cl = msgid-mcl->baseid / (8 * sizeof(access_vector_t)); if (cl >= mcl->nclasses) - return (1); /* bad message, access denied */ + return (1); /* bad message, access denied */ perms = (access_vector_t)1 << - (msgid - mcl->baseid - cl * 8 * sizeof(access_vector_t)); - return avc_has_perm_audit(subj, obj, mcl->classes[cl], perms, &avd); + (msgid - mcl->baseid - (cl * 8 * sizeof(access_vector_t))); + return avc_has_perm_audit(subj, obj, mcl->classes[cl], perms, &ad); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511071525.jA7FPMcA096638>