Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Add a check to pc-soundconfig to make sure that it is starting up wit…
Browse files Browse the repository at this point in the history
…h root permissions (does not function as user).
  • Loading branch information
Ken Moore committed Mar 24, 2014
1 parent b127b0c commit 9c8d91a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src-qt4/pc-soundconfig/main.cpp
Expand Up @@ -6,8 +6,16 @@
#include "ui_snddialog.h"
#include "../config.h"

#include <unistd.h>

int main( int argc, char ** argv )
{
// Make sure we are running as root
if (getuid() != 0) {
qDebug("Error, needs to be run as root");
exit(1);
}

QApplication a(argc, argv);

QTranslator translator;
Expand Down

0 comments on commit 9c8d91a

Please sign in to comment.