$OpenBSD: patch-kdesu_kdesu_kdesu_cpp,v 1.2 2003/01/27 19:22:50 espie Exp $ --- kdesu/kdesu/kdesu.cpp.orig Sun Sep 15 23:08:45 2002 +++ kdesu/kdesu/kdesu.cpp Thu Jan 9 23:22:00 2003 @@ -266,10 +266,12 @@ int main(int argc, char *argv[]) KConfig *config = KGlobal::config(); config->setGroup("Passwords"); int timeout = config->readNumEntry("Timeout", defTimeout); + bool useSudo = config->readBoolEntry("Sudo", defSudo); // Check if we need a password SuProcess proc; proc.setUser(auth_user); + proc.setUseSudo(useSudo); int needpw = proc.checkNeedPassword(); if (needpw < 0) { @@ -287,7 +289,8 @@ int main(int argc, char *argv[]) QCString password; if (needpw) { - KDEsuDialog *dlg = new KDEsuDialog(user, auth_user, keep && !terminal); + KDEsuDialog *dlg = new KDEsuDialog(user, auth_user, keep && !terminal, + useSudo); dlg->addLine(i18n("Command:"), command); if ((priority != 50) || (scheduler != SuProcess::SchedNormal)) { @@ -326,6 +329,7 @@ int main(int argc, char *argv[]) proc.setTerminal(terminal); proc.setErase(true); proc.setUser(user); + proc.setUseSudo(useSudo); if (!new_dcop) { proc.setXOnly(true);