no_new_privs test container

Signed-off-by: Jess Frazelle <acidburn@google.com>
This commit is contained in:
Jess Frazelle 2017-06-06 01:29:41 -04:00
parent a9b27fbd66
commit dfb1db2d50
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3
3 changed files with 14 additions and 0 deletions

6
no_new_privs/Dockerfile Normal file
View File

@ -0,0 +1,6 @@
FROM alpine:latest
COPY nnp /usr/local/bin/nnp
RUN chmod +s /usr/local/bin/nnp
CMD ["/usr/local/bin/nnp"]

BIN
no_new_privs/nnp Executable file

Binary file not shown.

8
no_new_privs/nnp.c Normal file
View File

@ -0,0 +1,8 @@
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
int main(int argc, char *argv[]){
printf("Effective uid: %d\n", geteuid());
return 0;
}