mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-04-24 15:37:23 +00:00
rollback some changes since
1) systemd-user doesn't work correctly with session bus 2) systemd-user cannot set capabilities
This commit is contained in:
parent
9cf6552c71
commit
66e3a737d4
@ -11,7 +11,7 @@ set (PROJECT_CONTACT "esalexeev@gmail.com")
|
|||||||
set (PROJECT_LICENSE "GPLv3")
|
set (PROJECT_LICENSE "GPLv3")
|
||||||
set (PROJECT_VERSION_MAJOR 1)
|
set (PROJECT_VERSION_MAJOR 1)
|
||||||
set (PROJECT_VERSION_MINOR 3)
|
set (PROJECT_VERSION_MINOR 3)
|
||||||
set (PROJECT_VERSION_PATCH 0)
|
set (PROJECT_VERSION_PATCH 1)
|
||||||
set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
|
set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
|
||||||
string (TIMESTAMP CURRENT_DATE "%Y-%m-%d %H:%M" UTC)
|
string (TIMESTAMP CURRENT_DATE "%Y-%m-%d %H:%M" UTC)
|
||||||
string (TIMESTAMP CURRENT_YEAR "%Y")
|
string (TIMESTAMP CURRENT_YEAR "%Y")
|
||||||
|
@ -6,7 +6,6 @@ Documentation=man:netctlgui-helper(1) man:netctl-gui.conf(5)
|
|||||||
Type=dbus
|
Type=dbus
|
||||||
BusName=org.netctlgui.helper
|
BusName=org.netctlgui.helper
|
||||||
ExecStart=/usr/bin/netctlgui-helper --nodaemon --system
|
ExecStart=/usr/bin/netctlgui-helper --nodaemon --system
|
||||||
Capabilities=CAP_SETUID
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -55,6 +55,6 @@ add_executable (${SUBPROJECT} ${SOURCES} ${HEADERS} ${MOC_SOURCES} ${QRC_SOURCES
|
|||||||
target_link_libraries (${SUBPROJECT} ${PROJECT_LIBRARY} ${QT_NEEDED_LIBS})
|
target_link_libraries (${SUBPROJECT} ${PROJECT_LIBRARY} ${QT_NEEDED_LIBS})
|
||||||
# install properties
|
# install properties
|
||||||
install (TARGETS ${SUBPROJECT} DESTINATION bin)
|
install (TARGETS ${SUBPROJECT} DESTINATION bin)
|
||||||
# if (USE_CAPABILITIES)
|
if (USE_CAPABILITIES)
|
||||||
# install (CODE "exec_program (setcap ARGS \"cap_setuid=ep\" \"$ENV{DESTDIR}/bin/${SUBPROJECT}\")")
|
install (CODE "exec_program (setcap ARGS \"cap_setuid=ep\" \"$ENV{DESTDIR}/bin/${SUBPROJECT}\")")
|
||||||
# endif ()
|
endif ()
|
||||||
|
@ -95,21 +95,18 @@ void NetctlHelper::createInterface()
|
|||||||
if (!sessionBus.registerService(DBUS_HELPER_SERVICE)) {
|
if (!sessionBus.registerService(DBUS_HELPER_SERVICE)) {
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Could not register session service";
|
if (debug) qDebug() << PDEBUG << ":" << "Could not register session service";
|
||||||
if (debug) qDebug() << PDEBUG << ":" << sessionBus.lastError().message();
|
if (debug) qDebug() << PDEBUG << ":" << sessionBus.lastError().message();
|
||||||
return quitHelper();
|
|
||||||
}
|
}
|
||||||
if (!sessionBus.registerObject(DBUS_LIB_PATH,
|
if (!sessionBus.registerObject(DBUS_LIB_PATH,
|
||||||
new NetctlAdaptor(this, debug, configuration),
|
new NetctlAdaptor(this, debug, configuration),
|
||||||
QDBusConnection::ExportAllContents)) {
|
QDBusConnection::ExportAllContents)) {
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Could not register session library object";
|
if (debug) qDebug() << PDEBUG << ":" << "Could not register session library object";
|
||||||
if (debug) qDebug() << PDEBUG << ":" << sessionBus.lastError().message();
|
if (debug) qDebug() << PDEBUG << ":" << sessionBus.lastError().message();
|
||||||
return quitHelper();
|
|
||||||
}
|
}
|
||||||
if (!sessionBus.registerObject(DBUS_CTRL_PATH,
|
if (!sessionBus.registerObject(DBUS_CTRL_PATH,
|
||||||
new ControlAdaptor(this, debug, configuration),
|
new ControlAdaptor(this, debug, configuration),
|
||||||
QDBusConnection::ExportAllContents)) {
|
QDBusConnection::ExportAllContents)) {
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Could not register session control object";
|
if (debug) qDebug() << PDEBUG << ":" << "Could not register session control object";
|
||||||
if (debug) qDebug() << PDEBUG << ":" << sessionBus.lastError().message();
|
if (debug) qDebug() << PDEBUG << ":" << sessionBus.lastError().message();
|
||||||
return quitHelper();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user