linux
Monday, November 8, 2010
Check the root access in linux
#include
<unistd.h>
#include
<sys/types.h>
#include
<stdio.h>
int
{
{
printf(
}
main()
if
(getuid())
"Error Must be in rooot"
);
else
printf(
}
/////////////////////////////
Getuid returns 0 for root access
"u are in root"
);
Home
Subscribe to:
Posts (Atom)