diff options
author | comex | 2015-01-29 21:31:11 -0500 |
---|---|---|
committer | comex | 2015-01-29 21:31:11 -0500 |
commit | 6fecd889e388f7642969d58bfe429a756d29413f (patch) | |
tree | f5f28651b14e46294df34040428303f156163f29 /ios-bootstrap/unrestrict.c | |
parent | "Fix" broken launchd injection stuff. (diff) | |
download | substitute-6fecd889e388f7642969d58bfe429a756d29413f.tar.gz |
a bunch of stuff that should have been committed separately
Diffstat (limited to 'ios-bootstrap/unrestrict.c')
-rw-r--r-- | ios-bootstrap/unrestrict.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ios-bootstrap/unrestrict.c b/ios-bootstrap/unrestrict.c index e9ab4eb..b77bdf5 100644 --- a/ios-bootstrap/unrestrict.c +++ b/ios-bootstrap/unrestrict.c @@ -6,6 +6,13 @@ #include <stdio.h> int main(int argc, char **argv) { + char filename[128]; + sprintf(filename, "/tmp/wtf.%ld", + (long) getpid()); + FILE *fp = fopen(filename, "w"); + if (!fp) + return 1; + #define syslog(a, b...) fprintf(fp, b) if (argc != 3) { syslog(LOG_EMERG, "unrestrict: wrong number of args"); return 1; @@ -34,6 +41,7 @@ int main(int argc, char **argv) { } char *err = NULL; + syslog(LOG_EMERG, "unrestrict: unrestricting %d (%s)", (int) pid, should_resume); int sret = substitute_ios_unrestrict((pid_t) pid, should_resume[0] == '1', &err); if (sret) { syslog(LOG_EMERG, "unrestrict: substitute_ios_unrestrict => %d (%s)", |