X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fsession.c;h=f8134f8ad966a950b0c97f13bbb18f2ba12d89b9;hp=95395c282a2ab79d89b23450a3cc531bea7e28ad;hb=d7b377ed1acd4043bde353d99122e0e56fa4e975;hpb=f2b3ef9f7d7adf6cc0678cd5933b638f5a9e75a6 diff --git a/src/bin/lttng-sessiond/session.c b/src/bin/lttng-sessiond/session.c index 95395c282..f8134f8ad 100644 --- a/src/bin/lttng-sessiond/session.c +++ b/src/bin/lttng-sessiond/session.c @@ -1296,18 +1296,13 @@ error: } /* - * Check if the UID or GID match the session. Root user has access to all + * Check if the UID matches the session. Root user has access to all * sessions. */ -int session_access_ok(struct ltt_session *session, uid_t uid, gid_t gid) +bool session_access_ok(struct ltt_session *session, uid_t uid) { assert(session); - - if (uid != session->uid && gid != session->gid && uid != 0) { - return 0; - } else { - return 1; - } + return (uid == session->uid) || uid == 0; } /*