1

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?

1
  • Maybe I'm a bit late, but chmod 4777 is refused from the Springboard (your app should crash on launch). You should use 755, owner:grout root:wheel Commented Apr 13, 2011 at 21:03

2 Answers 2

2

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

Sign up to request clarification or add additional context in comments.

Comments

1

Be sure your have your setuid binary hidden behind a wrapper that is not setuid. See Cydia or iFile for an example of how it's done.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.