You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libcap-ng/SOURCES/libcap-ng-0.8.1-procfs-last...

18 lines
373 B

diff -ru a/src/cap-ng.c b/src/cap-ng.c
--- a/src/cap-ng.c
+++ b/src/cap-ng.c
@@ -204,12 +204,7 @@
int fd;
fd = open("/proc/sys/kernel/cap_last_cap", O_RDONLY);
- if (fd == -1) {
- if (errno != ENOENT) {
- m.state = CAPNG_ERROR;
- return;
- }
- } else {
+ if (fd >= 0) {
char buf[8];
int num = read(fd, buf, sizeof(buf) - 1);
if (num > 0) {