$OpenBSD: patch-kdesu_kdesu_sudlg_cpp,v 1.5 2006/06/03 12:47:30 espie Exp $
--- kdesu/kdesu/sudlg.cpp.orig	Mon May 22 20:13:07 2006
+++ kdesu/kdesu/sudlg.cpp	Sun May 28 23:12:07 2006
@@ -12,10 +12,11 @@
 #include "sudlg.h"
 
 
-KDEsuDialog::KDEsuDialog(QCString user, QCString auth_user, bool enableKeep,const QString& icon, bool withIgnoreButton)
+KDEsuDialog::KDEsuDialog(QCString user, QCString auth_user, bool enableKeep,const QString& icon, bool useSudo, bool withIgnoreButton)
      : KPasswordDialog(Password, enableKeep, (withIgnoreButton ? User1:NoDefault), icon)
 {
     m_User = auth_user;
+    m_Sudo = useSudo;
     setCaption(i18n("Run as %1").arg(user));
 
     QString prompt;
@@ -34,6 +35,8 @@ KDEsuDialog::KDEsuDialog(QCString user, 
 	prompt = i18n("The action you requested needs additional privileges. "
 		"Please enter the password for \"%1\" below or click "
 		"Ignore to continue with your current privileges.").arg(m_User);
+    if (m_Sudo)
+	prompt += " (sudo)";
     setPrompt(prompt);
 
     if( withIgnoreButton )
@@ -49,6 +52,7 @@ bool KDEsuDialog::checkPassword(const ch
 {
     SuProcess proc;
     proc.setUser(m_User);
+    proc.setUseSudo(m_Sudo);
     int status = proc.checkInstall(password);
     switch (status)
     {
