Hi. I'm having some problems trying to understand what is going on here. Here's the program code:
Code:
//---------------file.c--------------
#include <unistd.h>
int main()
{
execl("/bin/bash","bash",NULL);
return 0;
}
//------------------End of file.c--------------
Then i compiled it and changed the permissions to the following:
-rwsrwxrwx 1 root root 11051 2005-12-14 01:57 file//SUID here
-rw-r--r-- 1 milosevic users 105 2005-12-14 01:48 file.c
Finally:
milosevic@slackws:~/c$ ./file
milosevic@slackws:~/c$ id
uid=1000(milosevic) gid=100(users) groups=100(users),11(floppy),17(audio),19(cdrom)
I just don't understand why i'm still milosevic, and not root.
Milosevic.