Messages in this thread Patch in this message | | | Date | Fri, 8 Oct 2004 15:24:30 -0700 | From | Chris Wright <> | Subject | Re: [PATCH] Realtime LSM |
| |
(relative to last one)
use in_group_p
--- security/realtime.c~cap_bprm_set 2004-10-08 15:21:03.835639904 -0700 +++ security/realtime.c 2004-10-08 15:23:13.574916536 -0700 @@ -60,26 +60,15 @@ MODULE_PARM_DESC(mlock, " enable memory locking privileges."); /* helper function for testing group membership */ -static inline int gid_ok(int gid, int e_gid) { - int i; - int rt_ok = 0; - +static inline int gid_ok(int gid, int e_gid) +{ if (gid == -1) return 0; if ((gid == e_gid) || (gid == current->gid)) return 1; - get_group_info(current->group_info); - for (i = 0; i < current->group_info->ngroups; ++i) { - if (gid == GROUP_AT(current->group_info, i)) { - rt_ok = 1; - break; - } - } - put_group_info(current->group_info); - - return rt_ok; + return in_group_p(gid); } int realtime_bprm_set_security(struct linux_binprm *bprm) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |