Blame SOURCES/kde-workspace-4.8.2-bz#732830-login.patch

652846
diff -up kde-workspace-4.8.2/kdm/CMakeLists.txt.bz#732830-login kde-workspace-4.8.2/kdm/CMakeLists.txt
652846
--- kde-workspace-4.8.2/kdm/CMakeLists.txt.bz#732830-login	2012-03-30 00:02:31.000000000 +0200
652846
+++ kde-workspace-4.8.2/kdm/CMakeLists.txt	2012-03-30 13:38:35.094493727 +0200
652846
@@ -33,6 +33,11 @@ set(backgroundlib_SRCS
652846
     ${CMAKE_CURRENT_SOURCE_DIR}/kcm/background/bgsettings.cpp
652846
 )
652846
 
652846
+set(kdmminmaxuidlib_SRCS
652846
+    ${CMAKE_CURRENT_SOURCE_DIR}/kdm-minmaxuid.c
652846
+    ${CMAKE_CURRENT_SOURCE_DIR}/kdm-minmaxuid.h
652846
+)
652846
+
652846
 # after confci is defined
652846
 add_subdirectory(backend)
652846
 add_subdirectory(kfrontend)
652846
diff -up kde-workspace-4.8.2/kdm/config.def.bz#732830-login kde-workspace-4.8.2/kdm/config.def
652846
--- kde-workspace-4.8.2/kdm/config.def.bz#732830-login	2012-03-30 00:02:31.000000000 +0200
652846
+++ kde-workspace-4.8.2/kdm/config.def	2012-03-30 13:38:35.112493501 +0200
652846
@@ -2288,9 +2288,13 @@ Instance: #*/
652846
 Update: upd_minshowuid
652846
 Comment:
652846
  Special case of HiddenUsers: users with a non-zero UID less than this number
652846
- will not be shown as well.
652846
+ will not be shown as well.  Setting this to -1 means that the limit should be
652846
+ determined in a platform-specific way (by reading /etc/login.defs or using a
652846
+ compiled-in default).
652846
 Description:
652846
- See <option>ShowUsers</option>.
652846
+ See <option>ShowUsers</option>.  Setting this to -1 means that the limit
652846
+ should be determined in a platform-specific way (by reading
652846
+ <filename>/etc/login.defs</filename> or using a compiled-in default).
652846
 
652846
 Key: MaxShowUID
652846
 Type: int
652846
@@ -2301,9 +2305,11 @@ Instance: #*/
652846
 Update: upd_maxshowuid
652846
 Comment:
652846
  Complement to MinShowUID: users with a UID greater than this number will
652846
- not be shown as well.
652846
+ not be shown as well.  Unlike MinShowUID, the special value -1 is not
652846
+ supported.
652846
 Description:
652846
- See <option>ShowUsers</option>.
652846
+ See <option>ShowUsers</option>.  Unlike <option>MinShowUID</option>, the
652846
+ special value -1 is not supported.
652846
 
652846
 Key: SortUsers
652846
 Type: bool
652846
diff -up kde-workspace-4.8.2/kdm/kcm/CMakeLists.txt.bz#732830-login kde-workspace-4.8.2/kdm/kcm/CMakeLists.txt
652846
--- kde-workspace-4.8.2/kdm/kcm/CMakeLists.txt.bz#732830-login	2012-03-30 00:02:31.000000000 +0200
652846
+++ kde-workspace-4.8.2/kdm/kcm/CMakeLists.txt	2012-03-30 13:38:35.114493477 +0200
652846
@@ -15,6 +15,7 @@ kde4_add_ui_files(kcmbackgroundlib_SRCS
652846
     background/bgadvanced_ui.ui)
652846
 
652846
 set(kcm_kdm_PART_SRCS ${kcmbackgroundlib_SRCS} ${backgroundlib_SRCS}
652846
+   ${kdmminmaxuidlib_SRCS}
652846
    background.cpp
652846
    kdm-gen.cpp
652846
    kdm-dlg.cpp
652846
diff -up kde-workspace-4.8.2/kdm/kcm/kdm-users.cpp.bz#732830-login kde-workspace-4.8.2/kdm/kcm/kdm-users.cpp
652846
--- kde-workspace-4.8.2/kdm/kcm/kdm-users.cpp.bz#732830-login	2012-03-30 00:02:31.000000000 +0200
652846
+++ kde-workspace-4.8.2/kdm/kcm/kdm-users.cpp	2012-03-30 13:38:35.123493365 +0200
652846
@@ -58,6 +58,9 @@
652846
 #include <unistd.h>
652846
 #include <pwd.h>
652846
 
652846
+#include "../kdm-minmaxuid.h"
652846
+
652846
+
652846
 extern KConfig *config;
652846
 
652846
 extern int handleActionReply(QWidget *parent, const KAuth::ActionReply &reply);
652846
@@ -80,28 +83,11 @@ static int executeFaceAction(QWidget *pa
652846
 KDMUsersWidget::KDMUsersWidget(QWidget *parent)
652846
     : QWidget(parent)
652846
 {
652846
-#ifdef __linux__
652846
-    struct stat st;
652846
-    if (!stat("/etc/debian_version", &st)) { /* debian */
652846
-        defminuid = "1000";
652846
-        defmaxuid = "29999";
652846
-    } else if (!stat("/usr/portage", &st)) { /* gentoo */
652846
-        defminuid = "1000";
652846
-        defmaxuid = "65000";
652846
-    } else if (!stat("/etc/mandrake-release", &st)) { /* mandrake - check before redhat! */
652846
-        defminuid = "500";
652846
-        defmaxuid = "65000";
652846
-    } else if (!stat("/etc/redhat-release", &st)) { /* redhat */
652846
-        defminuid = "100";
652846
-        defmaxuid = "65000";
652846
-    } else /* if (!stat("/etc/SuSE-release", &st)) */ { /* suse */
652846
-        defminuid = "500";
652846
-        defmaxuid = "65000";
652846
-    }
652846
-#else
652846
-    defminuid = "1000";
652846
-    defmaxuid = "65000";
652846
-#endif
652846
+    int minUid, maxUid;
652846
+
652846
+    getDefaultMinMaxUids(&minUid, &maxUid);
652846
+    defminuid = QString::number(minUid);
652846
+    defmaxuid = QString::number(maxUid);
652846
 
652846
     m_userPixDir = config->group("X-*-Greeter").readEntry("FaceDir",
652846
             QString(KStandardDirs::installPath("data") + "kdm/faces" + '/'));
652846
diff -up kde-workspace-4.8.2/kdm/kcm/main.cpp.bz#732830-login kde-workspace-4.8.2/kdm/kcm/main.cpp
652846
--- kde-workspace-4.8.2/kdm/kcm/main.cpp.bz#732830-login	2012-03-30 00:02:31.000000000 +0200
652846
+++ kde-workspace-4.8.2/kdm/kcm/main.cpp	2012-03-30 13:38:35.135493214 +0200
652846
@@ -59,6 +59,7 @@
652846
 #include <pwd.h>
652846
 #include <grp.h>
652846
 
652846
+#include "../kdm-minmaxuid.h"
652846
 
652846
 K_PLUGIN_FACTORY(KDMFactory, registerPlugin<KDModule>();)
652846
 K_EXPORT_PLUGIN(KDMFactory("kdmconfig"))
652846
@@ -393,13 +394,14 @@ void KDModule::propagateUsers()
652846
 {
652846
     groupmap.clear();
652846
     emit clearUsers();
652846
+    int realminuid = interpretMinUid(minshowuid);
652846
     QMap<QString, int> lusers;
652846
     QMap<QString, QPair<int, QStringList> >::const_iterator it;
652846
     QStringList::ConstIterator jt;
652846
     QMap<QString, int>::Iterator gmapi;
652846
     for (it = usermap.constBegin(); it != usermap.constEnd(); ++it) {
652846
         int uid = it.value().first;
652846
-        if (!uid || (uid >= minshowuid && uid <= maxshowuid)) {
652846
+        if (!uid || (uid >= realminuid && uid <= maxshowuid)) {
652846
             lusers[it.key()] = uid;
652846
             for (jt = it.value().second.begin(); jt != it.value().second.end(); ++jt)
652846
                 if ((gmapi = groupmap.find(*jt)) == groupmap.end()) {
652846
@@ -415,6 +417,8 @@ void KDModule::propagateUsers()
652846
 
652846
 void KDModule::slotMinMaxUID(int min, int max)
652846
 {
652846
+    int oldrealmin = interpretMinUid(minshowuid);
652846
+    int newrealmin = interpretMinUid(min);
652846
     if (updateOK) {
652846
         QMap<QString, int> alusers, dlusers;
652846
         QMap<QString, QPair<int, QStringList> >::const_iterator it;
652846
@@ -424,8 +428,8 @@ void KDModule::slotMinMaxUID(int min, in
652846
             int uid = it.value().first;
652846
             if (!uid)
652846
                 continue;
652846
-            if ((uid >= minshowuid && uid <= maxshowuid) &&
652846
-                    !(uid >= min && uid <= max)) {
652846
+            if ((uid >= oldrealmin && uid <= maxshowuid) &&
652846
+                    !(uid >= newrealmin && uid <= max)) {
652846
                 dlusers[it.key()] = uid;
652846
                 for (jt = it.value().second.begin();
652846
                         jt != it.value().second.end(); ++jt) {
652846
@@ -435,8 +439,8 @@ void KDModule::slotMinMaxUID(int min, in
652846
                         dlusers['@' + *jt] = -uid;
652846
                     }
652846
                 }
652846
-            } else if ((uid >= min && uid <= max) &&
652846
-                       !(uid >= minshowuid && uid <= maxshowuid)) {
652846
+            } else if ((uid >= newrealmin && uid <= max) &&
652846
+                       !(uid >= oldrealmin && uid <= maxshowuid)) {
652846
                 alusers[it.key()] = uid;
652846
                 for (jt = it.value().second.begin();
652846
                         jt != it.value().second.end(); ++jt)
652846
diff -up kde-workspace-4.8.2/kdm/kdm-minmaxuid.c.bz#732830-login kde-workspace-4.8.2/kdm/kdm-minmaxuid.c
652846
--- kde-workspace-4.8.2/kdm/kdm-minmaxuid.c.bz#732830-login	2012-03-30 13:38:35.137493189 +0200
652846
+++ kde-workspace-4.8.2/kdm/kdm-minmaxuid.c	2012-03-30 13:38:35.137493189 +0200
652846
@@ -0,0 +1,152 @@
652846
+/*
652846
+ * Utilities for handling the UID range allocated for non-system user
652846
+ */
652846
+
652846
+#include <stdio.h>
652846
+#include <sys/stat.h>
652846
+#ifdef __linux__
652846
+#include <assert.h>
652846
+#include <errno.h>
652846
+#include <inttypes.h>
652846
+#include <regex.h>
652846
+#include <stdlib.h>
652846
+#include <string.h>
652846
+#endif
652846
+
652846
+#include "kdm-minmaxuid.h"
652846
+
652846
+static void internalMinMaxUids(int *minUid, int *maxUid, int staticValues)
652846
+{
652846
+    struct stat st;
652846
+
652846
+#ifdef __linux__
652846
+    if (!stat("/etc/debian_version", &st)) { /* debian */
652846
+        *minUid = 1000;
652846
+        *maxUid = 29999;
652846
+    } else if (!stat("/usr/portage", &st)) { /* gentoo */
652846
+        *minUid = 1000;
652846
+        *maxUid = 65000;
652846
+    } else if (!stat("/etc/mandrake-release", &st)) { /* mandrake - check before redhat! */
652846
+        *minUid = 500;
652846
+        *maxUid = 65000;
652846
+    } else if (!stat("/etc/redhat-release", &st)) { /* redhat */
652846
+	if (!staticValues && !stat("/etc/login.defs", &st))
652846
+	    *minUid = -1;
652846
+	else
652846
+	    *minUid = 100;
652846
+        *maxUid = 65000;
652846
+    } else /* if (!stat("/etc/SuSE-release", &st)) */ { /* suse */
652846
+        *minUid = 500;
652846
+        *maxUid = 65000;
652846
+    }
652846
+#else
652846
+    *minUid = 1000;
652846
+    *maxUid = 65000;
652846
+#endif
652846
+}
652846
+
652846
+void getDefaultMinMaxUids(int *minUid, int *maxUid)
652846
+{
652846
+    internalMinMaxUids(minUid, maxUid, 0);
652846
+}
652846
+
652846
+#ifdef __linux__
652846
+static int getLoginDefsMinUid(void)
652846
+{
652846
+    int res;
652846
+    char *buf;
652846
+    size_t buf_size;
652846
+    ssize_t line_len;
652846
+    regex_t re;
652846
+    FILE *f;
652846
+
652846
+    f = fopen("/etc/login.defs", "r");
652846
+    if (f == NULL)
652846
+	return -1;
652846
+
652846
+    /* No, this is not particularly nice, but "compatible" is more important
652846
+       than "beautiful". */
652846
+    if (regcomp(&re,
652846
+		"^[ \t]*"	/* Initial whitespace */
652846
+		"([^ \t]+)"	/* Variable name */
652846
+		"[ \t][ \t\"]*"	/* Separator - yes, may have multiple "s */
652846
+		"("
652846
+		"([^\"]*)\".*"	/* Value, case 1 - terminated by " */
652846
+		/* Value, case 2 - only drop trailing [[:space:]] */
652846
+		"|([^\"]*[^[:space:]])?[[:space:]]*"
652846
+		")$", REG_EXTENDED) != 0)
652846
+	abort();
652846
+
652846
+    buf = NULL;
652846
+    buf_size = 0;
652846
+    res = -1;
652846
+    while ((line_len = getline(&buf, &buf_size, f)) > 0) {
652846
+	regmatch_t match[5];
652846
+	const char *name, *value;
652846
+
652846
+	if (line_len > 0 && buf[line_len - 1] == '\n')
652846
+	    buf[line_len - 1] = '\0';
652846
+
652846
+	if (regexec(&re, buf, sizeof(match) / sizeof(*match), match, 0) != 0)
652846
+	    continue;
652846
+
652846
+	assert(match[1].rm_so != -1);
652846
+	name = buf + match[1].rm_so;
652846
+	if (*name == '#')
652846
+	    continue;
652846
+	/* The "separator" is at least one character long, so we can safely
652846
+	   overwrite it with '\0'. */
652846
+	buf[match[1].rm_eo] = '\0';
652846
+
652846
+	if (match[3].rm_so != -1) {
652846
+	    value = buf + match[3].rm_so;
652846
+	    buf[match[3].rm_eo] = '\0';
652846
+	} else if (match[4].rm_so != -1) {
652846
+	    value = buf + match[4].rm_so;
652846
+	    buf[match[4].rm_eo] = '\0';
652846
+	} else
652846
+	    value = "";
652846
+
652846
+	/* fprintf(stderr, "\tMatched: %s = %s!\n", name, value); */
652846
+
652846
+	if (strcmp(name, "UID_MIN") == 0) {
652846
+	    intmax_t imax;
652846
+	    char *p;
652846
+
652846
+	    errno = 0;
652846
+	    imax = strtoimax(value, &p, 10);
652846
+	    if (errno == 0 && *p == '\0' && p != value && (uid_t)imax == imax)
652846
+		res = imax;
652846
+	}
652846
+    }
652846
+    free(buf);
652846
+
652846
+    regfree(&re);
652846
+    fclose(f);
652846
+
652846
+    return res;
652846
+}
652846
+#endif
652846
+
652846
+int interpretMinUid(int minUid)
652846
+{
652846
+    int res, dummy;
652846
+
652846
+    if (minUid != -1)
652846
+	return minUid;
652846
+#ifdef __linux__
652846
+    res = getLoginDefsMinUid();
652846
+    if (res != -1)
652846
+	return res;
652846
+#endif
652846
+    internalMinMaxUids(&res, &dummy, 1);
652846
+    return res;
652846
+}
652846
+
652846
+#ifdef TESTING
652846
+int main(void)
652846
+{
652846
+    printf("interpretMinUid returns %d\n", interpretMinUid(-1));
652846
+    return 0;
652846
+}
652846
+#endif
652846
diff -up kde-workspace-4.8.2/kdm/kdm-minmaxuid.h.bz#732830-login kde-workspace-4.8.2/kdm/kdm-minmaxuid.h
652846
--- kde-workspace-4.8.2/kdm/kdm-minmaxuid.h.bz#732830-login	2012-03-30 13:38:35.148493053 +0200
652846
+++ kde-workspace-4.8.2/kdm/kdm-minmaxuid.h	2012-03-30 13:38:35.138493177 +0200
652846
@@ -0,0 +1,25 @@
652846
+/*
652846
+ * Utilities for handling the UID range allocated for non-system user
652846
+ */
652846
+
652846
+#ifndef KDM_MINMAXUID_H
652846
+#define KDM_MINMAXUID_H
652846
+
652846
+#ifdef __cplusplus
652846
+extern "C" {
652846
+#endif
652846
+
652846
+/* Get platform-specific defaults for minShowUID and maxShowUID.
652846
+   Never fails. */
652846
+void getDefaultMinMaxUids(int *minUid, int *maxUid);
652846
+
652846
+/* Return the lower limit of user UIDs, based on supplied minShowUID value
652846
+   (i.e. interpret the value -1). */
652846
+int interpretMinUid(int minUid);
652846
+
652846
+#ifdef __cplusplus
652846
+}
652846
+#endif
652846
+
652846
+
652846
+#endif
652846
diff -up kde-workspace-4.8.2/kdm/kfrontend/CMakeLists.txt.bz#732830-login kde-workspace-4.8.2/kdm/kfrontend/CMakeLists.txt
652846
--- kde-workspace-4.8.2/kdm/kfrontend/CMakeLists.txt.bz#732830-login	2012-03-30 00:02:31.000000000 +0200
652846
+++ kde-workspace-4.8.2/kdm/kfrontend/CMakeLists.txt	2012-03-30 13:38:35.149493040 +0200
652846
@@ -52,6 +52,7 @@ set(kdm_greet_SRCS
652846
 	utils.cpp
652846
 	utils.h
652846
 	${kdmthemer_SRCS}
652846
+	${kdmminmaxuidlib_SRCS}
652846
 )
652846
 
652846
 if (XDMCP)
652846
@@ -93,7 +94,7 @@ kde4_add_executable(krootimage ${krootim
652846
 target_link_libraries(krootimage ${KDE4_KDEUI_LIBS} ${X11_X11_LIB} ${QIMAGEBLITZ_LIBRARIES})
652846
 install(TARGETS krootimage DESTINATION ${LIBEXEC_INSTALL_DIR})
652846
 
652846
-set(genkdmconf_SRCS genkdmconf.c)
652846
+set(genkdmconf_SRCS genkdmconf.c ${kdmminmaxuidlib_SRCS})
652846
 macro_add_file_dependencies(genkdmconf.c ${confci})
652846
 kde4_add_executable(genkdmconf NOGUI ${genkdmconf_SRCS})
652846
 macro_add_compile_flags(genkdmconf -U_REENTRANT)
652846
diff -up kde-workspace-4.8.2/kdm/kfrontend/genkdmconf.c.bz#732830-login kde-workspace-4.8.2/kdm/kfrontend/genkdmconf.c
652846
--- kde-workspace-4.8.2/kdm/kfrontend/genkdmconf.c.bz#732830-login	2012-03-30 00:02:31.000000000 +0200
652846
+++ kde-workspace-4.8.2/kdm/kfrontend/genkdmconf.c	2012-03-30 13:49:49.760059248 +0200
652846
@@ -58,6 +58,8 @@ Foundation, Inc., 51 Franklin Street, Fi
652846
 # endif
652846
 #endif
652846
 
652846
+#include "../kdm-minmaxuid.h"
652846
+
652846
 #define WANT_CONF_GEN
652846
 #include <config.ci>
652846
 
652846
@@ -2008,7 +2010,7 @@ upd_showusers(Entry *ce, Section *cs)
652846
     }
652846
 }
652846
 
652846
-static const char *defminuid, *defmaxuid;
652846
+static char defminuid[64], defmaxuid[64];
652846
 
652846
 static void
652846
 upd_minshowuid(Entry *ce, Section *cs ATTR_UNUSED)
652846
@@ -2034,16 +2036,18 @@ upd_hiddenusers(Entry *ce, Section *cs)
652846
     char *nv;
652846
     const char *msu, *pt, *et;
652846
     struct passwd *pw;
652846
-    unsigned minuid, maxuid;
652846
+    int minuid, maxuid;
652846
     char nbuf[128];
652846
 
652846
     if (!ce->active)
652846
         return;
652846
 
652846
     msu = getFqVal(cs->name, "MinShowUID", "0");
652846
-    sscanf(msu, "%u", &minuid);
652846
+    sscanf(msu, "%d", &minuid);
652846
     msu = getFqVal(cs->name, "MaxShowUID", "65535");
652846
-    sscanf(msu, "%u", &maxuid);
652846
+    sscanf(msu, "%d", &maxuid);
652846
+
652846
+    minuid = interpretMinUid(minuid);
652846
 
652846
     nv = 0;
652846
     pt = ce->value;
652846
@@ -2057,7 +2061,7 @@ upd_hiddenusers(Entry *ce, Section *cs)
652846
         }
652846
         if ((pw = getpwnam(nbuf))) {
652846
             if (!pw->pw_uid ||
652846
-                (pw->pw_uid >= minuid && pw->pw_uid <= maxuid))
652846
+                (pw->pw_uid >= (uid_t)minuid && pw->pw_uid <= (uid_t)maxuid))
652846
             {
652846
                 if (nv)
652846
                     strCat(&nv, ",%s", nbuf);
652846
@@ -3000,7 +3004,7 @@ int main(int argc, char **argv)
652846
     StrList *fp;
652846
     Section *cs;
652846
     Entry *ce, **cep;
652846
-    int i, ap, locals, foreigns;
652846
+    int i, ap, locals, foreigns, minuid, maxuid;
652846
     int no_old_xdm = 0, no_old_kde = 0;
652846
     struct stat st;
652846
 
652846
@@ -3239,27 +3243,9 @@ int main(int argc, char **argv)
652846
             }
652846
         }
652846
     }
652846
-#ifdef __linux__
652846
-    if (!stat("/etc/debian_version", &st)) { /* debian */
652846
-        defminuid = "1000";
652846
-        defmaxuid = "29999";
652846
-    } else if (!stat("/usr/portage", &st)) { /* gentoo */
652846
-        defminuid = "1000";
652846
-        defmaxuid = "65000";
652846
-    } else if (!stat("/etc/mandrake-release", &st)) { /* mandrake - check before redhat! */
652846
-        defminuid = "500";
652846
-        defmaxuid = "65000";
652846
-    } else if (!stat("/etc/redhat-release", &st)) { /* redhat */
652846
-        defminuid = "100";
652846
-        defmaxuid = "65000";
652846
-    } else /* if (!stat("/etc/SuSE-release", &st)) */ { /* suse */
652846
-        defminuid = "500";
652846
-        defmaxuid = "65000";
652846
-    }
652846
-#else
652846
-    defminuid = "1000";
652846
-    defmaxuid = "65000";
652846
-#endif
652846
+    getDefaultMinMaxUids(&minuid, &maxuid);
652846
+    sprintf(defminuid, "%d", minuid);
652846
+    sprintf(defmaxuid, "%d", maxuid);
652846
     for (i = 0; i <= CONF_MAX_PRIO; i++)
652846
         for (cs = config; cs; cs = cs->next)
652846
             for (ce = cs->ents; ce; ce = ce->next)
652846
diff -up kde-workspace-4.8.2/kdm/kfrontend/kgreeter.cpp.bz#732830-login kde-workspace-4.8.2/kdm/kfrontend/kgreeter.cpp
652846
--- kde-workspace-4.8.2/kdm/kfrontend/kgreeter.cpp.bz#732830-login	2012-03-30 00:02:31.000000000 +0200
652846
+++ kde-workspace-4.8.2/kdm/kfrontend/kgreeter.cpp	2012-03-30 13:38:35.163492865 +0200
652846
@@ -66,6 +66,8 @@ Foundation, Inc., 51 Franklin Street, Fi
652846
 #include <X11/Xlib.h>
652846
 #include <fixx11h.h>
652846
 
652846
+#include "../kdm-minmaxuid.h"
652846
+
652846
 class UserListView : public QListWidget {
652846
   public:
652846
     UserListView(QWidget *parent = 0)
652846
@@ -389,12 +391,13 @@ KGreeter::insertUsers()
652846
             default_pix.fill(0);
652846
         }
652846
     }
652846
+    int realLowUserId = interpretMinUid(_lowUserId);
652846
     if (_showUsers == SHOW_ALL) {
652846
         UserList noUsers(_noUsers);
652846
         QSet<QString> dupes;
652846
         for (setpwent(); (ps = getpwent()) != 0;) {
652846
             if (*ps->pw_dir && *ps->pw_shell &&
652846
-                (ps->pw_uid >= (unsigned)_lowUserId ||
652846
+                (ps->pw_uid >= (unsigned)realLowUserId ||
652846
                  (!ps->pw_uid && _showRoot)) &&
652846
                 ps->pw_uid <= (unsigned)_highUserId &&
652846
                 !noUsers.hasUser(ps->pw_name) &&
652846
@@ -413,7 +416,7 @@ KGreeter::insertUsers()
652846
             QSet<QString> dupes;
652846
             for (setpwent(); (ps = getpwent()) != 0;) {
652846
                 if (*ps->pw_dir && *ps->pw_shell &&
652846
-                    (ps->pw_uid >= (unsigned)_lowUserId ||
652846
+                    (ps->pw_uid >= (unsigned)realLowUserId ||
652846
                      (!ps->pw_uid && _showRoot)) &&
652846
                     ps->pw_uid <= (unsigned)_highUserId &&
652846
                     (users.hasUser(ps->pw_name) ||