source: proiecte/PPPP/gdm/debian/patches/03_hide_system_users.patch @ 134

Last change on this file since 134 was 134, checked in by (none), 14 years ago

gdm sources with the modifications for webcam

File size: 1.4 KB
  • gui/simple-greeter/gdm-user-manager.c

    #
    # Description: Do not show system users in the "frequent users" list
    # Ubuntu: https://launchpad.net/bugs/395281
    # Upstream: http://bugzilla.gnome.org/show_bug.cgi?id=587708
    #
    diff -Nur -x '*.orig' -x '*~' gdm-2.27.90/gui/simple-greeter/gdm-user-manager.c gdm-2.27.90.new/gui/simple-greeter/gdm-user-manager.c
    old new  
    11601160        gboolean res;
    11611161        char    *username;
    11621162        gulong   frequency;
     1163        struct passwd *pwent;
    11631164        GdmUser *user;
    11641165
    11651166        frequency = 0;
     
    11751176                return;
    11761177        }
    11771178
     1179        /* do not show system users; we cannot use gdm_user_manager_get_user()
     1180         * here since this creates/signals users as a side effect */
     1181        pwent = getpwnam (username);
     1182        if (pwent == NULL) {
     1183                g_warning ("Unable to lookup user name %s: %s", username, g_strerror (errno));
     1184                return;
     1185        }
     1186        if (pwent->pw_uid < DEFAULT_MINIMAL_UID) {
     1187                g_debug ("GdmUserManager: excluding user '%s'", username);
     1188                return;
     1189        }
     1190
    11781191        user = gdm_user_manager_get_user (manager, username);
    11791192        if (user == NULL) {
    11801193                g_debug ("GdmUserManager: unable to lookup user '%s'", username);
Note: See TracBrowser for help on using the repository browser.