summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.c b/main.c
index 7af7c55..8d07953 100644
--- a/main.c
+++ b/main.c
@@ -43,6 +43,10 @@ int main( int argc, char *argv[] ) {
};
assert( grouppw != NULL );
+ // literally the only security check
+ assert( grouppw->gr_gid != 0 );
+ assert( userpw->pw_uid != 0 );
+
if ( setgroups( 0, NULL ) != 0 )
assert_perror( errno );