On Thu, 27 Mar 2014 14:43, Ludwig Nussel <ludwig.nussel@...> wrote:
Henne Vogelsang wrote:
On 27.03.2014 13:25, Guido Berhoerster wrote:
* Henne Vogelsang <hvogel@...> [2014-03-27 11:51]:
On 26.03.2014 13:46, Ludwig Nussel wrote:
That's not what happens when installing packages. Packages typically call useradd in %pre. If the user already exists the useradd is either not called or the error ignored.
This sounds like the way more pressing thing to fix then. I guess this OSEP should be about enforcing a useradd macro in factory...
How do you suggest that should be "fixed"?
Simple: If some package adds a user/group during installation and that action fails, it shouldn't fail silently and expose the risks Ludwig mentioned...
You have to ignore the error. Reusing an already existing use is a features as the package can't make guesses about why the user already exists. Reasons for an already existing users might be that a package has been uinstalled and reinstalled, several packages using the same user or an admin pre-creating users to get fixed uids.
IMHO the macro is formulated the wrong way, change the macro, and you can use the error: Proposal for useradd macro: 'check for existing group' $prg_group || addgroup [options] $prg_group || trow group_error 'check for existing user' $prg_user || adduser [options] $prg_user || trow user_error note the 'check for existing ...' that is not in the macro atm. with it we can use the error of add(group|user) On the topic of underscore prefix, I'd propose that any new daemon users and groups should do that asap. As in: any valid incoming request for new daemon user / group names will get the answer ok with prefix, or have to plead a really strong case for without prefix. Let's start the progress. On the argument about cgroups and name-spaces, I'd like to add the following: IF using cgroups and name-spaces would really work THAT fine, all deamons would run under the UID / GID of 'daemon' e.g. numeric "2" so stop arguing in that direction before you fix all the underlaying issues, then you can come back and argue in this direction and bring valid proving with your arguments. As long as file access works with UID / GID any argument about cgroups and co. as a replacement is wasted space and resources. Prove me wrong, I dare you! *Prove* I say, with code. - Yamaban -- If I could get a firm grip on reality, I'd choke it. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org