I have the sandbox enabled and use / sbin / ping with NSTask:
[task setLaunchPath:@"/sbin/ping"]; [task setArguments:[NSArray arrayWithObjects:@"-c10", iPAddress, nil]];
Everything works fine, and I get the expected result.
I also want to use / usr / sbin / traceroute with NSTask:
[task setLaunchPath:@"/usr/sbin/traceroute"]; [task setArguments:[NSArray arrayWithObject:iPAddress]];
But the task ends with the message: NSTask: Failed to create task for path '/ usr / sbin / traceroute': 22, "Invalid argument". Termination of the temporary process. * At the same time, sandbox logs: deny forbidden-exec-sugid
Why does it work with ping, but not with traceroute? And how do I get it to work with traceroute?
thanks!
source share