Re: How to safely kill all processes owned by a user on macOS
Re: How to safely kill all processes owned by a user on macOS
- Subject: Re: How to safely kill all processes owned by a user on macOS
- From: Alastair Houghton <email@hidden>
- Date: Wed, 18 Oct 2017 11:31:38 +0100
> On 18 Oct 2017, at 02:24, Daniel Peebles <email@hidden> wrote:
>
> The obvious thing we tried before was to launch a new process, set(e)uid to
> the user in question, then kill(-1, SIGKILL). That will kill all running
> processes under that user (including the killer!), but unfortunately in High
> Sierra (and possibly earlier), it also crashes the entire system and I'm
> unsure how long it'll be until it's fixed:
> http://www.openwall.com/lists/oss-security/2017/10/12/1
Has this been submitted to <email@hidden>? The ability to take
out the system is quite clearly a security issue; there are Macs installed with
guest user access, for instance, where this would be troublesome.
> Does anyone have other ideas, possibly informed by obscure macOS internal
> behavior, for how to effectively kill all processes owned by a user?
You could try killing just those processes in the same process group, if that’s
sufficient for your purposes (i.e. kill(0, SIGKILL)). Of course, that may also
trigger the bug, I don’t know.
Alternatively, perhaps you can explain what you’re trying to achieve by killing
all the processes belonging to a particular user? Maybe there’s something else
you could do instead?
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden