> Please be clearer about what you are trying to do. Do you want to
> make a fixed-function setuid program to execute specific commands,
> which can't be misused to execute other ones?
i want to execute ifconfig and iwconfig with all arguments without
root (with the owner) under android with some modification of the code
su.c
> execv("/system/bin/sh", exec_args);
> http://www.netmite.com/android/mydroid/1.6/system/extras/su/su.c
i found this functions in the code su.c
> printf("commancer l'execlp \n");
this is a commantaire
> execlp("/system/bin/sh", "sh", NULL);
i found this in the code su.c
> Why are you calling two exec functions?
i want to call the first but in the code su.c i found two functions
and i dont understand the role of the second function
>>and i changed its privilege with chmod 755 /data/data/..../su
with chmod: to be executable
> That makes it executable, not setuid root which is presumably what you
> want if it's going to manage the network hardware
i make an astuce (changing some parametres from setuid(uid))
setgid(gid) to setuid(0) setgid(0) to be like a root)
gid: the group id
uid: user id
> > my executable su stop in execv("/system/bin/sh", exec_args);
> "The exec() family of functions replaces the current process image
> with a new process image."
i dont understand the exact role of execv("/system/bin/sh",
exec_args); with "/system/bin/sh" ???
and with using setuid(0) and setgid(0) why this dont work ???
--
You received this message because you are subscribed to the Google Groups
"Android Security Discussions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/android-security-discuss?hl=en.