diff options
-rw-r--r-- | libcap/cap_text.c | 2 | ||||
-rw-r--r-- | progs/.gitignore | 1 | ||||
-rw-r--r-- | tests/uns_test.c | 7 |
3 files changed, 7 insertions, 3 deletions
diff --git a/libcap/cap_text.c b/libcap/cap_text.c index b0fad9d..87e0838 100644 --- a/libcap/cap_text.c +++ b/libcap/cap_text.c @@ -315,7 +315,7 @@ char *cap_to_name(cap_value_t cap) #endif char *tmp, *result; - asprintf(&tmp, "%u", cap); + (void) asprintf(&tmp, "%u", cap); result = _libcap_strdup(tmp); free(tmp); diff --git a/progs/.gitignore b/progs/.gitignore index 978229e..eed1982 100644 --- a/progs/.gitignore +++ b/progs/.gitignore @@ -5,3 +5,4 @@ getpcaps setcap verify-caps compare-cap +uns_test diff --git a/tests/uns_test.c b/tests/uns_test.c index 43470cf..41aa0a6 100644 --- a/tests/uns_test.c +++ b/tests/uns_test.c @@ -137,7 +137,10 @@ int main(int argc, char **argv) } } - write(fds.to[1], ".", 1); + if (write(fds.to[1], ".", 1) != 1) { + perror("failed to write '.'"); + exit(1); + } close(fds.to[1]); fprintf(stderr, "user namespace launched exploit worked - upgrade kernel\n"); @@ -149,6 +152,6 @@ int main(int argc, char **argv) bailok: fprintf(stderr, "exploit attempt failed\n"); - write(fds.to[1], "!", 1); + (void) write(fds.to[1], "!", 1); exit(0); } |