how to set SUID bit ???
Here is what I am doing:
as root creating the file test.pl:
#!/usr/bin/perl
printf("My uid is $> (%s)\n", (getpwuid($>))[0]);
then,
#chmod a+x ./test.pl
#chmod u+s ./test.pl
#./test.pl
My uid is 0 (root)
#ls -l
-rwsr-xr-x 1 root wheel 67 Mar 9 16:11 test.pl
after that, as administrator:
#./test.pl
My uid is 501 (administrator)
Why the SUID bit is not working ???
PB G4 Mac OS X (10.4.8)
as root creating the file test.pl:
#!/usr/bin/perl
printf("My uid is $> (%s)\n", (getpwuid($>))[0]);
then,
#chmod a+x ./test.pl
#chmod u+s ./test.pl
#./test.pl
My uid is 0 (root)
#ls -l
-rwsr-xr-x 1 root wheel 67 Mar 9 16:11 test.pl
after that, as administrator:
#./test.pl
My uid is 501 (administrator)
Why the SUID bit is not working ???
PB G4 Mac OS X (10.4.8)