Hi,
In my program I’m calling this “resmgr_attach” for resource allocation. My program compiles without any issues but not able to run the program, it popups this message “resmgr_attach: Operation not permitted”. I run this program in my user privilage not in the root.
Also, I tried to set the effective user id before calling resmgr_attach(), but still get the same message.
I tried this method to set the effective user id from my program
uid_t euid, ruid;
gid_t egid, rgid;
…
euid = geteuid();
egid = getegid();
ruid = getuid();
rgid = getgid();
setegid(rgid);
seteuid(ruid);
resmgr_attach(…)
setegid(egid);
seteuid(euid);
Please correct me If i have made any mistake in this.
Thanks in Advance,
Subu