1 |
On 08/30/2017 05:25 AM, Michał Górny wrote: |
2 |
> |
3 |
> This package does not belong in Gentoo. We do packaging, not some ugly |
4 |
> malware that prevents users from uninstalling itself. Every package must |
5 |
> be uninstallable. Even if it destroys my system, developers have no |
6 |
> right to prevent valid uninstall action from proceeding. |
7 |
> |
8 |
|
9 |
So you're saying I should have it "sleep 2983702947523704" in prerm? |
10 |
|
11 |
=) |
12 |
|
13 |
I've been working on the user packages GLEP that I started and then |
14 |
forgot about sometime at the beginning of the year. I'm trying to finish |
15 |
up the reference implementation. |
16 |
|
17 |
When it comes to removing users, everyone's suggestions were along the |
18 |
same lines: |
19 |
|
20 |
1a. If you try to uninstall a user package, it should die(), because |
21 |
calling userdel can be a security risk if the user still owns |
22 |
files. |
23 |
|
24 |
1b. Same as 1a, with an I_KNOW_WHAT_I_AM_DOING override. |
25 |
|
26 |
2. We can scan the file system to see if the user owns anything, and |
27 |
if he doesn't, call userdel. If he does, warn the user, and die(). |
28 |
|
29 |
3. During upgrades, the existing user will be left in place. But If a |
30 |
user package tries to switch it's UID in a new version, check to |
31 |
make sure that the old UID doesn't own any files, maybe die(), etc. |
32 |
|
33 |
|
34 |
But all of them involve being able to die() out of a removal action. |
35 |
It's not refusing to uninstall the system user -- that's already the |
36 |
status quo -- it's just refusing to remove the /package/ given that we |
37 |
can't actually remove the system user. Trying to keep the system and the |
38 |
PM in agreement (with an override). |
39 |
|
40 |
Anyway, I was trying to implement (1b), so that's how I found myself |
41 |
asking this question. Since I'm providing an I_KNOW_WHAT_IM_DOING |
42 |
override, you still have the ability to shoot yourself in the foot, but |
43 |
for all of this to work I'd still need a way to stop an uninstallation. |