Skip to content

Commit

Permalink
Removed SIP checking for OS version before El Capitan (Fixes #22)
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-poidevin committed May 15, 2017
1 parent d2c9222 commit 117e6da
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
26 changes: 18 additions & 8 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,20 +230,30 @@ bool MainWindow::isSIPEnabled(void)
{
QString SIPStatus;
QProcess process;
QSysInfo::MacVersion macVersion = QSysInfo::MacintoshVersion;

logger->write(" | Checking SIP Status\n");

//Execute commande line
process.start("csrutil status");
//SIP as been introduced since El Capitan
if(macVersion >= QSysInfo::MV_ELCAPITAN)
{
//Execute commande line
process.start("csrutil status");

//Wait forever until finished
process.waitForFinished(-1);
//Wait forever until finished
process.waitForFinished(-1);

//Get command line output
SIPStatus = process.readAllStandardOutput();
//Get command line output
SIPStatus = process.readAllStandardOutput();

//Close process
process.close();
//Close process
process.close();
}
else
{
logger->write("No SIP for this OS\n");
return false;
}

#ifndef WINDOWS
if(SIPStatus.contains("disable"))
Expand Down
1 change: 1 addition & 0 deletions mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <QInputDialog>
#include <QLabel>
#include <QPixmap>
#include <QSysInfo>

#include "logger.h"

Expand Down

0 comments on commit 117e6da

Please sign in to comment.