After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 701514 - Able to total block the system by deleteing the gdm-manager user
Able to total block the system by deleteing the gdm-manager user
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
3.8.x
Other Linux
: Normal major
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-03 12:15 UTC by Ewan.LEBIDEAU-CANEVET
Modified: 2013-07-15 10:47 UTC
See Also:
GNOME target: ---
GNOME version: 3.7/3.8


Attachments
0001-user-accounts-Don-t-threat-system-account-once-added.patch (1.04 KB, patch)
2013-06-25 14:12 UTC, Philippe "RzR" Coval
none Details | Review
0001-user-accounts-Don-t-threat-system-account-once-added.patch (1.25 KB, patch)
2013-06-25 14:38 UTC, Philippe "RzR" Coval
needs-work Details | Review
0001-user-accounts-do-not-display-system-type-accounts.patch (1.28 KB, patch)
2013-07-10 18:25 UTC, Philippe "RzR" Coval
committed Details | Review

Description Ewan.LEBIDEAU-CANEVET 2013-06-03 12:15:28 UTC
User can notice that under some circumstances he can delete the gdm-manager user, leading total system block, reinstall necessary.

Steps :

1. Boot system
2. Go to settings - user settings and add another user
3. Make sure he is enabled and has a password
4. Unlock with Root password and select the "-" sign to delete it
5. At dialogue box if to delete files or keep them, do nothing
6. Press on username - and select switch user
7. Log in as the second user
8. After log in as the second user, select switch user
9. Log in as the first user
10. Notice the dialogue box that ask you to keep the files of the user, select keep
11. Receive error that user is logged in
12. Keep the error and notice in the foreground the gdm-manager user
13. Select gdm-manager daemon user and press "-" and select keep files
14. Observe the user has been deleted
15. Try to restart the computer, observe you can't
16. Hard reset with power button, observe system cannot recover anymore

Expected outcome

User cannot delete the gdm-manager user and should not see it in the user list

Actual outcome

User can delete the gdm-manager user and can see it in the list
Comment 1 Matthias Clasen 2013-06-03 17:34:55 UTC
That the gdm user appears in the list is clearly a bug. It is a bug in the accountsservice, but it should already be fixed in git (we added the gdm user to the blacklist). 

The fact that you can remove the gdm user if you have administrator privileges is not a bug, I'd say.
Comment 3 Jean-Benoit MARTIN 2013-06-24 15:11:15 UTC
The bug is still present with accountsservice 0.6.34 on fedora 19

A new user in accounts service path /org/freedesktop/Accounts/User102 (gdm)

is created

but gdm seems not in username_in_exclude_list from libaccountsservice
Comment 4 Philippe "RzR" Coval 2013-06-25 14:12:25 UTC
Created attachment 247737 [details] [review]
0001-user-accounts-Don-t-threat-system-account-once-added.patch

Hi,

Are you sure this bug should be closed, because I tested gnome-control-center HEAD along accountsservices-0.6.34 and the bug Is still present ...

So I thought that filtering system accounts will be safer to prevent this bug and probably others ...

Regards
Comment 5 Philippe "RzR" Coval 2013-06-25 14:38:24 UTC
Created attachment 247741 [details] [review]
0001-user-accounts-Don-t-threat-system-account-once-added.patch

Sorry This is 0001-user-accounts-Don-t-threat-system-account-once-added.patch
 
And I tested with gnome-control-center gnome-3-8 branch
Comment 6 Thomas Wood 2013-07-10 16:51:47 UTC
Review of attachment 247741 [details] [review]:

The approach appears to be fine, but please could you improve the commit message and coding style?

::: panels/user-accounts/um-user-panel.c
@@ +151,3 @@
 
+        if ( act_user_is_system_account( user ) ) {
+                return ; 

The spacing here is not consistent with the rest of the code and includes a trailing space.
Comment 7 Philippe "RzR" Coval 2013-07-10 18:25:37 UTC
Created attachment 248870 [details] [review]
0001-user-accounts-do-not-display-system-type-accounts.patch

Thanks, good to know accountsservices is "fine" the way it is
and this could be done that way in g-c-c...
(Else it looked a bit complicated)

Btw, I suppose the reference document is :
https://wiki.gnome.org/GTK+/BestPractices#Coding_Style

Regards
Comment 8 Thomas Wood 2013-07-15 10:47:41 UTC
Attachment 248870 [details] pushed to master and gnome-3-8 with an updated commit message.