Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 209b86a66ab613934c3799821baa65c7 > files > 4

rtpproxy-1.2.1-10.git2121113.fc18.src.rpm

From c5eb808da0a29539d0dfc887dc2c8b54c9b5ecaa Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sun, 19 Sep 2010 15:33:31 +0400
Subject: [PATCH 4/7] Allow group users write to the controlling UNIX-socket.

No visible changes for BSD users, so this is Linux-only
related issue. See this RHBZ for rationale:

https://bugzilla.redhat.com/626863

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
 main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/main.c b/main.c
index 58b3a28..75b3031 100644
--- a/main.c
+++ b/main.c
@@ -420,6 +420,8 @@ init_controlfd(struct cfg *cf)
 	if ((cf->stable.run_uname != NULL || cf->stable.run_gname != NULL) &&
 	  chown(cmd_sock, cf->stable.run_uid, cf->stable.run_gid) == -1)
 	    err(1, "can't set owner of the socket");
+	if (chmod(cmd_sock, 0775) == -1)
+	    err(1, "can't allow rw acces to group");
 	if (listen(controlfd, 32) != 0)
 	    err(1, "can't listen on a socket");
     } else {
-- 
1.8.1