On 19-11-10 12:09, Bas van der Vlies wrote:
> On 19-11-10 11:56, no-re...@cfengine.com wrote:
>> Forum: Cfengine Help
>> Subject: Re: Parent process selection
>> Author: Seva Gluschenko
>> Link to topic: https://cfengine.com/forum/read.php?3,19311,19328#msg-19328
>>
>> Correct me if I wrong, but ps output on different Unix systems cannot be 
>> exactly identical anyway, the further parsing is applied. Why not just use 
>> different process table access code instead?
>>
>> Moreover, security concerns tell us not to trust any external utilities, 
>> since rootkits typically hijack ps, ls and other system utilities to hide 
>> their presence.
>>
>
> That is true. But what does cfengine3 now uses for process checking? I
> think it relies for unix on the 'ps' command. That is why i have problems
> with the process_select bodies.
>

Sorry i did not read it correctly. every platform has a 'process table 
access code' . But for quick/simple fix we can adjust the ps command to 
only return the fields we are interested in. works on most platforms.

Btw the 'top' source is a good starting point and for linux it is 'simple' 
as shown with the small example.

-- 
********************************************************************
*  Bas van der Vlies                    e-mail: b...@sara.nl       *
*  SARA - Academic Computing Services   Amsterdam, The Netherlands *
********************************************************************
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to