Skip to content

Commit

Permalink
Add root user check. Closes KJCracks#151
Browse files Browse the repository at this point in the history
  • Loading branch information
NinjaLikesCheez committed Dec 22, 2016
1 parent 2546f6f commit 36bfe31
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Binary file not shown.
Binary file modified Clutch/.DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions Clutch/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#import <sys/time.h>
#import "ClutchPrint.h"
#import "NSTask.h"
#include <unistd.h>

int diff_ms(struct timeval t1, struct timeval t2)
{
Expand Down Expand Up @@ -64,6 +65,11 @@ int main (int argc, const char * argv[])

@autoreleasepool
{
if (getuid() != 0) { // Clutch needs to be root user to run
[[ClutchPrint sharedInstance] print:@"Clutch needs to be run as the root user, please change user and rerun."];

return 0;
}

if (SYSTEM_VERSION_LESS_THAN(NSFoundationVersionNumber_iOS_6_0)) {

Expand Down

0 comments on commit 36bfe31

Please sign in to comment.