On 03/12/2014 06:28 PM, Jussi Laako wrote:
On 12.3.2014 3:42, Carsten Haitzler wrote:
there should be no resources outside a homedir. simple. if there is a
default system config - it is owned by the system. it stays because any
newly created user will copy/start with that config (and if
needed/desired write a copy of that to $HOME/somewhere). if there are
user resources outside the users homedir (other than temporary things
like /tmp or /var/run that can get nuked at a reboot etc.)... it's just
plain wrong™. :) it's the app's job to deal with loading a system config
if no user config is done, to deal with writing out user config,
handling config upgrades etc.
/etc/skel is supported by gumd.
that's all we ever need - even if we need that much at all.
Any files with userid ownership outside of $HOME should be cleaned up,
because once the /etc/passwd entry is gone, there is no guarantees how
soon the userid is reused. Waiting for next boot is not sufficient.
Don't forget at least /var/mail/<username> and possible entries in
/var/spool and /var/tmp. What to do with blocked cups print jobs?
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.
I'm not sure what will happen to /dev/mqueue and named shared memory
and semaphore entries in case uid is reused and some app didn't clean
up it's things (call mq_unlink()/sem_unlink()/etc).
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.
_______________________________________________
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