From 2382357622e1acd0c6488f647244be4daf91bcf8 Mon Sep 17 00:00:00 2001 From: David Smith Date: Fri, 28 Oct 2011 10:44:58 -0500 Subject: [PATCH] PR 13128: Rework of commit f2013cc91ea1dba576661d6b746ee28658c8bc51 (ported) Based on peer feedback: - Compare privilege credentials as sets, not levels. - Send privilege credentials as a ctl message at startup. - Send startup ctl messages (tzinfo, relocations, privilege_credentials) on the same control channel. Ensure channel is closed properly on error. --- runtime/task_finder2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/task_finder2.c b/runtime/task_finder2.c index 52760dc53..433f89a91 100644 --- a/runtime/task_finder2.c +++ b/runtime/task_finder2.c @@ -790,7 +790,7 @@ __stp_utrace_attach_match_filename(struct task_struct *tsk, /* Notice that "pid == 0" (which means to probe all * threads) falls through. */ -#if STP_PRIVILEGE < STP_PR_STAPDEV +#if ! STP_PRIVILEGE_CONTAINS (STP_PRIVILEGE, STP_PR_STAPDEV) /* Make sure unprivileged users only probe their own threads. */ if (_stp_uid != tsk_euid) { if (tgt->pid != 0) { @@ -1573,7 +1573,7 @@ stap_start_task_finder(void) /* Notice that "pid == 0" (which means to * probe all threads) falls through. */ -#if STP_PRIVILEGE < STP_PR_STAPDEV +#if ! STP_PRIVILEGE_CONTAINS (STP_PRIVILEGE, STP_PR_STAPDEV) /* Make sure unprivileged users only probe their own threads. */ if (_stp_uid != tsk_euid) { if (tgt->pid != 0 || _stp_target) { -- 2.43.5