1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-25 00:51:21 +00:00

Pass an explicit mode to open() so that the PID file is created with sane

permissions.

Reported by:	netchild
This commit is contained in:
Joe Marcus Clarke 2007-04-13 04:00:18 +00:00
parent 65cd892535
commit 0209be9092
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=189878
2 changed files with 12 additions and 0 deletions

View File

@ -8,6 +8,7 @@
PORTNAME= system-tools-backends
PORTVERSION= 2.2.1
PORTREVISION= 1
CATEGORIES= sysutils gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}

View File

@ -0,0 +1,11 @@
--- dispatcher/dispatcher.c.orig Thu Apr 12 23:55:38 2007
+++ dispatcher/dispatcher.c Thu Apr 12 23:57:40 2007
@@ -203,7 +203,7 @@ daemonize (void)
setsid ();
- if ((pidfile_fd = open (LOCALSTATEDIR "/run/system-tools-backends.pid", O_CREAT | O_WRONLY)) != -1)
+ if ((pidfile_fd = open (LOCALSTATEDIR "/run/system-tools-backends.pid", O_CREAT | O_WRONLY, 0600)) != -1)
{
str = g_strdup_printf ("%d", getpid ());
write (pidfile_fd, str, strlen (str));