chiark / gitweb /
bus: creds - ignore EINVAL when acessing the (inactive) LSM /proc interface
authorKay Sievers <kay@vrfy.org>
Fri, 29 Nov 2013 10:52:22 +0000 (11:52 +0100)
committerKay Sievers <kay@vrfy.org>
Fri, 29 Nov 2013 10:52:22 +0000 (11:52 +0100)
src/libsystemd-bus/bus-creds.c

index 5ca70ccafa772ea673f55fac332005b306cea62f..454aeffb51a6d8d802e69326421d5fd26ee36151 100644 (file)
@@ -599,7 +599,7 @@ int bus_creds_add_more(sd_bus_creds *c, uint64_t mask, pid_t pid, pid_t tid) {
 
                 p = procfs_file_alloca(pid, "attr/current");
                 r = read_one_line_file(p, &c->label);
 
                 p = procfs_file_alloca(pid, "attr/current");
                 r = read_one_line_file(p, &c->label);
-                if (r < 0 && r != -ENOENT)
+                if (r < 0 && r != -ENOENT && r != -EINVAL)
                         return r;
                 else if (r >= 0)
                         c->mask |= SD_BUS_CREDS_SELINUX_CONTEXT;
                         return r;
                 else if (r >= 0)
                         c->mask |= SD_BUS_CREDS_SELINUX_CONTEXT;