From 085c66ec44ae2c31fa6eed915b18a3958c8a8ffe Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Mon, 24 Apr 2023 17:13:37 +0600 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BB=20=D0=BD=D0=B5?= =?UTF-8?q?=20=D0=BD=D1=83=D0=B6=D0=BD=D1=8B=D0=B5=20=D1=84=D1=83=D0=BD?= =?UTF-8?q?=D0=BA=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/util.cc | 29 ----------------------------- ubl-settings-bootloader.glade | 1 + 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/source/util.cc b/source/util.cc index 8d8c496..3236cc1 100644 --- a/source/util.cc +++ b/source/util.cc @@ -166,33 +166,4 @@ vector pars_users() { return vec_users; } -string read_passwd(string username) { - string passwd = ""; - std::string line; - std::ifstream in("/etc/shadow"); - if (in.is_open()) { - while (getline(in, line)) { - if (line.find(username) != string::npos) { - size_t index_start = line.find(":"); - if (index_start != string::npos) { - size_t index_end = line.find(":", index_start + 1); - passwd = line.substr(index_start+1, index_end - index_start-1); - break; - } - } - } - } - in.close(); - return passwd; -} - -int synopsis_show(string str_link) { - // gettext("https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/") - string cmd = "xdg-open " + str_link; - if (geteuid() == 0) { - string response_user = getlogin(); - cmd = "su -l " + response_user + " -c \" DISPLAY=$DISPLAY " + cmd + " \""; - } - return system(cmd.c_str()); -} } \ No newline at end of file diff --git a/ubl-settings-bootloader.glade b/ubl-settings-bootloader.glade index 075d966..0b6ec9d 100644 --- a/ubl-settings-bootloader.glade +++ b/ubl-settings-bootloader.glade @@ -1468,6 +1468,7 @@ specified priority True False + True True