]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
capability: also cap CAP_LAST_CAP at 63
authorLennart Poettering <lennart@poettering.net>
Thu, 21 Mar 2019 11:37:30 +0000 (12:37 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 21 Mar 2019 11:37:30 +0000 (12:37 +0100)
src/basic/capability-util.c

index 2c17e26016e23c37c996aecbcc7794c441af1b4b..03a6b660fb185aff65109724a0b78b520dc02951 100644 (file)
@@ -61,7 +61,7 @@ unsigned long cap_last_cap(void) {
         }
 
         /* fall back to syscall-probing for pre linux-3.2 */
-        p = (unsigned long) CAP_LAST_CAP;
+        p = MIN((unsigned long) CAP_LAST_CAP, 63U);
 
         if (prctl(PR_CAPBSET_READ, p) < 0) {