at linux and gcc 2.96-98 environment
thx
at linux and gcc 2.96-98 environment
thx
try using the setuid() function. It accepts the new uid as type uid_t, and returns 0 if successful, -1 if not. If you want to change the real uid, you can use setreuid(), which accepts the real uid and the effective uid as uid_t. I'm pretty sure you need both <unistd.h> and <sys/types.h>