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.

/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.

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

Reply via email to