Revert "Fix: sessiond: erroneous user check logic in session_access_ok"
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 17 Aug 2020 20:06:16 +0000 (16:06 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 17 Aug 2020 20:08:00 +0000 (16:08 -0400)
This reverts commit 4064563ea326f6f26d2c458009beb9ebdb3ba840.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ifbcfd0c18631cfca70b2ea85b16824bb26a2a446

src/bin/lttng-sessiond/session.c

index 3358648f6864323fbcd2d852bdf1296e7b01cf25..95395c282a2ab79d89b23450a3cc531bea7e28ad 100644 (file)
@@ -1303,13 +1303,7 @@ int session_access_ok(struct ltt_session *session, uid_t uid, gid_t gid)
 {
        assert(session);
 
-       if (uid == 0) {
-               return 1;
-       }
-
-       return uid == session->uid && gid == session->gid;
-
-       if ((uid != session->uid || gid != session->gid) && uid != 0) {
+       if (uid != session->uid && gid != session->gid && uid != 0) {
                return 0;
        } else {
                return 1;
This page took 0.033851 seconds and 4 git commands to generate.