[PC-BSD Commits] r21452 - pcbsd/current/src-qt4/pc-updategui

svn at pcbsd.org svn at pcbsd.org
Mon Feb 11 10:17:10 PST 2013


Author: kris
Date: 2013-02-11 18:17:09 +0000 (Mon, 11 Feb 2013)
New Revision: 21452

Modified:
   pcbsd/current/src-qt4/pc-updategui/mainWin.cpp
Log:

Dont run browser as root when showing patch details



Modified: pcbsd/current/src-qt4/pc-updategui/mainWin.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-updategui/mainWin.cpp	2013-02-11 17:57:28 UTC (rev 21451)
+++ pcbsd/current/src-qt4/pc-updategui/mainWin.cpp	2013-02-11 18:17:09 UTC (rev 21452)
@@ -54,9 +54,13 @@
   if ( listUpdates.at(listViewUpdates->row(cItem)).at(7).isEmpty() )
      return;
 
+  QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+  QString username = env.value( "LOGNAME" );
+
+
   QString url = listUpdates.at(listViewUpdates->row(cItem)).at(7);
   qDebug() << url;
-  system("openwith '" + url.toLatin1() + "' &"); 
+  system("su -m " + username.toLatin1() + " -c 'openwith " + url.toLatin1() + "' &"); 
 }
 
 //Check whether an update was selected to enable the button



More information about the Commits mailing list