Geoff Roberts
04/11/2021 3:05 AM
post121372
|
I am trying to get a process (resource manager) to successfully call resmgr_attach() without failing with EPERM. The
process is not owned by root and not executed by a root user.
The following - based on an example I found - and what I interpret from the procmgr_ability() documentation - is not
working for me. procmgr_ability() always returns 1 (EPERM) and errno is set to (EOK).
procmgr_ability(0, PROCMGR_ADN_NONROOT | PROCMGR_AOP_ ALLOW | PROCMGR_AID_ABLE_PRIV,
PROCMGR_ADN_NONROOT | PROCMGR_AOP_ALLOW | PROCMGR_AID_PATHSPACE |
PROCMGR_AID_EOL);
As far as I know the program doesn't have the abilities locked (why would it?) and there are no "temporary ID's.
All I want to do is create /dev/something without the process being owned and executed by root. I don't want it owned by
root and then set the "set UID on execution bit" if I can avoid it (chown 0:0 program;chmod a+s program) as this seems
to defeat the reason for procmgr_ability() to exist! :-)
What am I doing wrong? What am I missing?
Thanks,
Geoff.
|
|
|