Исправлена дыра в безопасности №8

pull/3/head^2
Igor Belitskiy 3 years ago
parent 4675320092
commit e936a3b221

@ -324,7 +324,6 @@ void MainWindow::unselect_icon(Gtk::IconView *icon_entry){
} }
void MainWindow::settings(){ void MainWindow::settings(){
system("nohup xhost + local: > /dev/null 2>&1 &");
this->pars_apps(); this->pars_apps();
this->get_builder(); this->get_builder();
this->event(); this->event();
@ -506,6 +505,11 @@ string MainWindow::start_cmd(string user_cmd){
} }
} }
} }
if (cmbUser->get_active_text().length()!=0){
string user_cmd_X = "xhost +SI:localuser:";
user_cmd_X += cmbUser->get_active_text();
system(user_cmd_X.c_str());
}
if ((cbxExecuteEpriority->get_active()) && (chbAnotherUser->get_active()==false)){ if ((cbxExecuteEpriority->get_active()) && (chbAnotherUser->get_active()==false)){
str_nice_cmd = " nice -n " + to_string(spinPriority->get_value_as_int()) + " "; str_nice_cmd = " nice -n " + to_string(spinPriority->get_value_as_int()) + " ";
} }

Loading…
Cancel
Save