diff options
author | jylefort <jylefort@FreeBSD.org> | 2006-12-06 19:16:29 +0800 |
---|---|---|
committer | jylefort <jylefort@FreeBSD.org> | 2006-12-06 19:16:29 +0800 |
commit | 796690ebeaf7aa0222f3a236bc19c304efc5a81c (patch) | |
tree | 68b6279fce7c4c98c7f4f0f0e4d84df7a0065b4f /audio | |
parent | a86ea2c8aa119a6ae87a40b8a9d7e10bf1c0ef25 (diff) | |
download | freebsd-ports-gnome-796690ebeaf7aa0222f3a236bc19c304efc5a81c.tar.gz freebsd-ports-gnome-796690ebeaf7aa0222f3a236bc19c304efc5a81c.tar.zst freebsd-ports-gnome-796690ebeaf7aa0222f3a236bc19c304efc5a81c.zip |
Install the program setuid-root so that it can set realtime priority,
and drop root privileges early in main().
Diffstat (limited to 'audio')
-rw-r--r-- | audio/lmms/Makefile | 7 | ||||
-rw-r--r-- | audio/lmms/files/patch-src_core_main.cpp | 20 |
2 files changed, 26 insertions, 1 deletions
diff --git a/audio/lmms/Makefile b/audio/lmms/Makefile index 21c96373b789..d6f57154a135 100644 --- a/audio/lmms/Makefile +++ b/audio/lmms/Makefile @@ -7,7 +7,7 @@ PORTNAME= lmms PORTVERSION= 20061204 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= audio MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= jylefort @@ -49,4 +49,9 @@ post-patch: pre-configure: @cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${LIBTOOLIZE} +post-install: + # make it setuid-root to be able to set realtime priority + # (root privileges are dropped in the main routine) + ${CHMOD} u+s ${PREFIX}/bin/lmms + .include <bsd.port.mk> diff --git a/audio/lmms/files/patch-src_core_main.cpp b/audio/lmms/files/patch-src_core_main.cpp new file mode 100644 index 000000000000..42964de206ef --- /dev/null +++ b/audio/lmms/files/patch-src_core_main.cpp @@ -0,0 +1,20 @@ +--- src/core/main.cpp.orig Mon Dec 4 15:22:34 2006 ++++ src/core/main.cpp Wed Dec 6 11:52:51 2006 +@@ -49,6 +49,9 @@ + #include <sched.h> + #endif + ++#include <sys/types.h> ++#include <unistd.h> ++ + + #include "main_window.h" + #include "embed.h" +@@ -89,6 +92,7 @@ + printf( "could not set realtime priority.\n" ); + } + #endif ++ setuid(getuid()); // drop root privileges + + QApplication app( argc, argv ); + |