mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-12 21:35:51 +00:00
remove suid bit to use capabilities
This commit is contained in:
@ -50,9 +50,8 @@ endif()
|
||||
|
||||
add_executable (${SUBPROJECT} ${SOURCES} ${HEADERS} ${MOC_SOURCES} ${QRC_SOURCES} ${TRANSLATIONS})
|
||||
target_link_libraries (${SUBPROJECT} ${PROJECT_LIBRARY} ${QT_NEEDED_LIBS})
|
||||
add_executable (${SUBPROJECT}-suid ${SOURCES} ${HEADERS} ${MOC_SOURCES} ${QRC_SOURCES} ${TRANSLATIONS})
|
||||
target_link_libraries (${SUBPROJECT}-suid ${PROJECT_LIBRARY} ${QT_NEEDED_LIBS})
|
||||
# install properties
|
||||
install (TARGETS ${SUBPROJECT} DESTINATION bin)
|
||||
install (TARGETS ${SUBPROJECT}-suid DESTINATION bin
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE SETUID)
|
||||
if (USE_CAPABILITIES)
|
||||
install (CODE "exec_program (setcap ARGS \\\"cap_setuid+iep cap_setgid+iep\\\" \"$ENV{DESTDIR}/bin/${SUBPROJECT}\")")
|
||||
endif ()
|
||||
|
@ -91,7 +91,7 @@ int main(int argc, char *argv[])
|
||||
args[QString("nodaemon")] = true;
|
||||
// check euid
|
||||
if (geteuid() != 0) {
|
||||
cout << QCoreApplication::translate("NetctlHelper", "The helper is running with EUID %1. Some functions will not be available.")
|
||||
cout << QCoreApplication::translate("NetctlHelper", "The helper is running with EUID %1. Some functions may not be available.")
|
||||
.arg(QString::number(geteuid())).toUtf8().data() << endl;
|
||||
cout << QCoreApplication::translate("NetctlHelper", "See security notes for more details.")
|
||||
.toUtf8().data() << endl;
|
||||
|
Reference in New Issue
Block a user