mysql55: sh: /bin/ps: Operation not permitted

Rainer Müller raimue at macports.org
Sat Dec 14 02:02:08 PST 2013


On 2013-12-14 10:04, Joshua Root wrote:
> On 2013-12-14 11:03 , Bradley Giesbrecht wrote:
>> Is this a problem or a red herring?
>>
>> Is sandboxing possibly preventing access to /bin/ps?
>>
>> CMakeLists.txt:
>> ...
>> IF(NOT FIND_PROC)
>>   # SysV style
>>   EXECUTE_PROCESS(COMMAND ps -ef OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE result)
>> MESSAGE(FATAL_ERROR "MACPORTS: SysV style result='${result}'")
>> ...
>>
>>
>> Result:
>> ...
>> sh: /bin/ps: Operation not permitted
>> sh: /bin/ps: Operation not permitted
>> CMake Error at scripts/CMakeLists.txt:126 (MESSAGE):
>>   MACPORTS: SysV style result='Operation not permitted'
>> ...
> 
> Sandboxed programs cannot run setuid executables. No exceptions.

Oh, I wasn't aware of that, that's good to know.

> If you need to disable sandboxing, set portsandbox_active to false in
> your Portfile. Ideally only do that for the duration of the specific
> invocation of 'system' that needs it, and restore its previous value
> afterwards.

I think disabling sandboxing would be overkill here. The cmake script
tries to find out whether to use 'ps -uaxww' or 'ps -ef' to find a
running process. There is already a hardcoded command for Linux some
lines above that in the CMakeLists.txt, so that could be extended with a
fixed command for Darwin/Mac OS X.

Rainer


More information about the macports-dev mailing list