Ignore:
Timestamp:
08/16/13 02:43:05 (14 months ago)
Author:
yurkis <yurkis@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
1f40abc
Parents:
256b8024
Message:

Add ability to qsudo to show privileged command. Privileged actions without description may cause high security risc (user don't know what action will be executed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/qsudo/mainwindow.cpp

    rb3051eb r49e8627  
    3636  connect(passwordLineEdit, SIGNAL(returnPressed()), this, SLOT(slotReturnPressed())); 
    3737  connect(passwordLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotPwdTextChanged(QString))); 
     38  connect(commandGroupBox,  SIGNAL(clicked(bool)), this, SLOT(slotExpandCommandClicked(bool))); 
    3839 
    3940  QPushButton* btn= buttonBox->button(QDialogButtonBox::Ok); 
    4041  if (btn) 
    4142      btn->setEnabled(false); 
     43 
     44  // Set command text 
     45  commandLabel->setVisible(false); 
     46  QString commText; 
     47  for ( int i = 1; i< qApp->argc() ; i++) 
     48  { 
     49      commText+=qApp->argv()[i]; 
     50  } 
     51  commandLabel->setText(commText); 
    4252} 
    4353 
     
    121131} 
    122132 
     133void MainWindow::slotExpandCommandClicked(bool isChecked) 
     134{ 
     135    commandLabel->setVisible(isChecked); 
     136} 
     137 
    123138void MainWindow::slotProcDone() 
    124139{ 
Note: See TracChangeset for help on using the changeset viewer.