|
Le 09/10/2013 17:39, Schaufler, Casey a
écrit :
I must miss something.SO_PEERCRED is fine. /proc/PID is *not*. Unless you have some way to ensure that the pid represents the right process you can't count on it. Also, it seems questionable that you should launch an application with a particular environment just because another application uses that environment. If 'SO_PREECRED is fine', the pid that we will be read is the correct pid of the caller. Then it seems that your "unless" clause will be validated and /proc/PID should be OK. For the environment, the need is quite simple to explain. When a request to launch an application is done by a user (by pressing a button, calling a Mime Type, ...) a message is pushed on a socket to get that application started. At the end of the chain the daemon Launchpad, which runs as root, will spawn the application for the user. That application must be launch in the user environment ($HOME, $DISPLAY, D-bus session ID, locale, ...) which is not static any more in multi user. -- Dominig ar Foll Senior Software Architect Open Source Technology Centre Intel SSG |
_______________________________________________ Dev mailing list [email protected] https://lists.tizen.org/listinfo/dev
