iphone以root身份运行应用程序 [英] iphone run app as root
问题描述
我正在为一个越狱iphone编写一个gcc的gui包装,现在差不多完成了。然而,当它运行时我得到这个输出 ld:无法打开输出文件进行写入:a.out,errno = 1 collect2:ld返回1退出状态
。
我相信这与应用程序运行的privelages有关。我曾尝试过cydia开发者常见问题解答中的setuid技巧。任何人都可以请帮忙吗?
编辑
这是我目前使用的包装:
#!/ usr / bin / bash
dir = $(dirname$ 0)
exec$ {dir}/ GUI\ GCC_ $ 0
我也使用了chmod 4777,并将所有者:group修改为root:wheel。
我做的一切正确吗?
它的工作原理是当我这样做时:
setuid(0);
system(做根源);
//检查你是谁b $ b系统(whoami);
您可以安装ps -U root的软件包来查看您是否是root用户,或者
I am writing a gui wrapper for gcc for a jailbroken iphone, etc. and it is almost done. However, I get this output when it is run ld: can't open output file for writing : a.out, errno=1 collect2:ld return 1 exit status
.
I believe this has to do with the privelages the app runs with. I have tried the setuid trick in the cydia developer faq. Can anyone please help?
EDIT
this is the wrapper I am currently using:
#!/usr/bin/bash
dir=$(dirname "$0")
exec "${dir}"/GUI\ GCC_ "$0"
also I used chmod 4777 and changes the owner:group to root:wheel.
Am i doing everything right?
It worked when I did it like this:
setuid(0); system("Do root stuff");
// To check who you are system("whoami");
You can install the Package for "ps -U root" to see if you are root, or
这篇关于iphone以root身份运行应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!