From b65ce014f3880345f276e5bb98bb8d3d8889a24a Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 15 Mar 2023 11:55:19 +0600 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B8=D1=81=D0=BA=D0=B0=20=D0=BF=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ublexec.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ublexec.cc b/source/ublexec.cc index 3d67f24..b8c8fb5 100644 --- a/source/ublexec.cc +++ b/source/ublexec.cc @@ -797,6 +797,7 @@ void MainWindow::is_user_wheel(){ } void MainWindow::pars_users() { + int uid_max = 65534; while (true) { errno = 0; passwd* entry = getpwent(); @@ -806,11 +807,10 @@ void MainWindow::pars_users() { } break; } - if (entry->pw_uid >= 1000 && entry->pw_uid != 65534) { + if ((entry->pw_uid >= 1000 && entry->pw_uid != uid_max) || entry->pw_uid == 0) { cmbUser->append(entry->pw_name); } } - cmbUser->append("root"); endpwent(); }