I just wrote a test program ( while(true); ) and set the suid bit and the owner, but when the unprivileged user runs the program, it does not pay any attention to the suid bit as far as I can tell.
I don't know what I could have done wrong. Here are the permissions:
-rwsr-xr-x 1 privuser group 10385 2008-08-23 11:27 a.out
Here is the call from the regular user:
Here is what ps -aux reports:
privuser 32637 113 0.0 6900 840 pts/4 R+ 11:37 0:03 /home/privuser/bin/a.out
I think I got it! The default fstab option for suid vs. nosuid in suse is apparently nosuid. So I explicitly set it to suid and it appears to have finally started working right.
Now to test the actual functionality.
And it does NOTHING (*#$)(*#@
PS shows the user ID for the privileged user, but when the program tries to even access the shellscript (which I now have set to rwx------ so that only the privuser can run it) the rws program won't even access it.
Makes no sense...
Is there a special way to invoke suid?
Last edited by davidstvz; 08-23-2008 at 12:55 PM.