On 03/12/2014 07:27 PM, Jussi Laako wrote:
On 12.3.2014 11:41, Carsten Haitzler wrote:
imho most of these are legacy "mistakes" we have had to live with. we
shouldn't emulate them in apps, daemons or libraries. the mail and spool
at least. /dev/mqueue /var/tmp or /tmp (and /var/run/username) are well
known locations that can be cleaned up.

We still have to be able to deal with those. gumd is not written to be specific to Tizen, it should work on any Linux distro.

There's no standard way to list/find items in mqueue/sem/shm or Linux anonymous socket (AF_UNIX name prefixed by \0) namespaces so we cannot clean up those and I don't think it is straight as a job of gumd.

well you could just do the equivalen of "find / -print -uid ID -exec 'rm -rf'" :)

/var/run/username is cleaned up PAM, because it is specified that it must not survive across sessions.

any resouce stil around is now accessible by the new user recycling the
uid. shm/semaphores/mqs honestly should be cleaned up on clean exit of
any user processes that use them (unlink them etc.). (they can leak and
hang around though on unclean exits). if you still are running processes
as the uid on deletion... then that needs to be fixed by ensuring they
are all terminated on user delete.

We terminate the processes on user deletion, but especially if we need to SIGKILL those, anything that would need unlink to be cleaned up will be left over.

I would say Unix multiuser as such is racy when it comes to adding/deleting users. There's nothing across the system to enforce those operations to be atomic in overall system scope.

you should at least be NICE and first kill with a SIGINT ... and wait a bit for them to exit. if they are still around after a few seconds (lets say 5) then SIGKILL them. sigkilling out of the box is just rude. :)

_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev


--
The above message is intended solely for the named addressee and may
contain trade secret, industrial technology or privileged and
confidential information otherwise protected under applicable law
including the Unfair Competition Prevention and Trade Secret Protection
Act. Any unauthorized dissemination, distribution, copying or use of the
information contained in this communication is strictly prohibited. If
you have received this communication in error, please notify the sender
by email and delete this communication immediately.

_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev

Reply via email to