Description: force execution via root, dropping ordinary user rights via sudo.
             The original upstream source code uses Shell calls, sending clear
             passwords to sudo command. These passwords can be intercepted via
             ps command or other methods.
Author: Joao Eriberto Mota Filho <eriberto@debian.org>
Last-Update: 2015-02-22
Fowarded: yes
Index: linssid-2.7/linssid-app/MainForm.cpp
===================================================================
--- linssid-2.7.orig/linssid-app/MainForm.cpp
+++ linssid-2.7/linssid-app/MainForm.cpp
@@ -5,6 +5,7 @@
  * Created on October 25, 2012, 11:43 AM
  */
 
+#include <stdio.h>
 #include <iostream>
 #include <fstream>
 #include <string>
@@ -372,7 +373,9 @@ void MainForm::getUserID() {
     if (geteuid() == 0) {
         pwStatus = NOTNEEDED; // must be running as root or with root privilege
     } else {
-        passBox pwDialog1;
+        printf ("You need root privileges to run this program.\nTry to use 'gksudo' (read the LinSSID manpage to configure).\n");
+        exit(0);
+/*        passBox pwDialog1;
         for (int pwTry = 0; pwTry < 3; pwTry++) {
             if (pwTry == 0) pwDialog1.setPassPrompt("First shot:");
             else if (pwTry == 1) pwDialog1.setPassPrompt("Second try:");
@@ -390,7 +393,7 @@ void MainForm::getUserID() {
             MainForm::mainFormWidget.runBtn->setChecked(false);
             QMessageBox::warning(0, "password fail", "Unable to verify password");
             exit(1);
-        }
+        } */
     }
 }
 
Index: linssid-2.7/linssid-app/linssid.desktop
===================================================================
--- linssid-2.7.orig/linssid-app/linssid.desktop
+++ linssid-2.7/linssid-app/linssid.desktop
@@ -3,7 +3,7 @@ Version=2.7
 Name=LinSSID
 GenericName=
 Comment=Find local wireless attach points
-Exec=linssid
+Exec=gksudo linssid
 Icon=/usr/share/pixmaps/linssid48.png
 Terminal=false
 Type=Application
Index: linssid-2.7/linssid-app/README_2.7
===================================================================
--- linssid-2.7.orig/linssid-app/README_2.7
+++ linssid-2.7/linssid-app/README_2.7
@@ -74,8 +74,3 @@ Version 1.4:
 * Imposes minimum 0.5 second "nap time" between scans so that poorly written drivers crash less.
 * Updates the UOI vendor database
 * Improves concurrency of wifi scanning and main form updating.
-
-The wireless tools that LinSSID uses require root privilege to access. If your machine has sudo, the best way to run is to launch the program and let it ask you for a password. That way it will only use root privilege to execute a few privileged system commands, but LinSSID itself will not run as a root process. The other way to run LinSSID is to launch it from a root account or with su or sudo. It will run, but in my opinion that's a bit more dangerous. One never knows what nasty bugs may be waiting to damage.
-
-Please report bugs on the discussion tab at the project web page:
-https://sourceforge.net/projects/linssid/
