0
I have the following problem. While executing:
void main(void){
uid_t getuid(void);
gid_t getgid(void);
uid_t user_id;
gid_t group_id;
printf("user_id: %d\n",user_id);
printf("group_id: %d\n",group_id);
exit(0);
}
I have as return:
user_id: 134513819,group_id: -1216946176.
It was not to return
user_id: 0,group_id: 0.
Since the file belongs to root and is running as root.
Solved. It was just assign to user_id=getuid() and done. Thank you and how much libraries were included.
– uthacod