Hi, I would like to use capability but my test failed. Help me please
Here is my problem : (I want to launch a shell and try capability with chmod)
header.version = _LINUX_CAPABILITY_VERSION;
header.pid = 0;
//data.effective = data.permitted = data.inheritable = 0;
data.effective = data.permitted = data.inheritable = CAP_SETUID;
perror("capset"); // Operation not permited
execl("/bin/sh", "/bin/sh", NULL);
What is pid in header?
What I must do for this code work?
Must I recompile the kernel with some change like said in :