Reputation: 259
I need to lock pages of my program in memory. Program run under Solaris 10 OS from unprivileged user. I've tried to use: mlock(), mlockall() and plock(), but always get the same result:
plock/mlock/mlockall: Not owner
But it works from root. So can I lock pages of my program in memory from unprivileged user, somehow?
Thanks!
Upvotes: 5
Views: 652
Reputation: 259
I found decision and want to share it. May be it will be helpful for someone else. I modified privileges of user, under Solaris it can be done by next command:
usermod -K defaultpriv=basic,proc_lock_memory user
I think in Linux could be the same situation and it can be resolved using Linux capabilities.
Upvotes: 5