[rtpproxy] Allow group users to write to controlling UNIX-socket (rhbz #626863)
Peter Lemenkov
peter at fedoraproject.org
Sun Sep 19 11:55:12 UTC 2010
commit 159a6ca97c7ee1b926fb89e6b1b6d620de50834b
Author: Peter Lemenkov <lemenkov at gmail.com>
Date: Sun Sep 19 15:55:03 2010 +0400
Allow group users to write to controlling UNIX-socket (rhbz #626863)
Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
.gitignore | 1 +
...-users-write-to-the-controlling-UNIX-sock.patch | 31 ++++++++++++++++++++
rtpproxy.spec | 9 ++++-
3 files changed, 39 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ab4b76f..5dd418a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
rtpproxy-1.2.1.tar.gz
+/rtpproxy-1.2.1.tar.gz
diff --git a/rtpproxy-0001-Allow-group-users-write-to-the-controlling-UNIX-sock.patch b/rtpproxy-0001-Allow-group-users-write-to-the-controlling-UNIX-sock.patch
new file mode 100644
index 0000000..150d751
--- /dev/null
+++ b/rtpproxy-0001-Allow-group-users-write-to-the-controlling-UNIX-sock.patch
@@ -0,0 +1,31 @@
+From 405b5cd613c44f5a72508db0b45bf6eeddc88a21 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Sun, 19 Sep 2010 15:33:31 +0400
+Subject: [PATCH 1/1] 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 at gmail.com>
+---
+ main.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/main.c b/main.c
+index 9776582..b5a1728 100644
+--- a/main.c
++++ b/main.c
+@@ -421,6 +421,8 @@ init_controlfd(struct cfg *cf)
+ if ((cf->run_uname != NULL || cf->run_gname != NULL) &&
+ chown(cmd_sock, cf->run_uid, cf->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.7.2.3
+
diff --git a/rtpproxy.spec b/rtpproxy.spec
index 802df9a..5a11334 100644
--- a/rtpproxy.spec
+++ b/rtpproxy.spec
@@ -1,6 +1,6 @@
Name: rtpproxy
Version: 1.2.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A symmetric RTP proxy
Group: Applications/Internet
License: BSD
@@ -8,6 +8,8 @@ URL: http://www.rtpproxy.org
Source0: http://b2bua.org/chrome/site/%{name}-%{version}.tar.gz
Source1: rtpproxy.sysconfig
Source2: rtpproxy.init
+# See https://bugzilla.redhat.com/626863
+Patch1: rtpproxy-0001-Allow-group-users-write-to-the-controlling-UNIX-sock.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gsm-devel
Requires(pre): /usr/sbin/useradd
@@ -24,7 +26,7 @@ rewriting SDP bodies in SIP messages that it processes.
%prep
%setup -q
-
+%patch1 -p1 -b .allow_rw_for_group
%build
%configure
@@ -70,6 +72,9 @@ fi
%changelog
+* Sun Sep 19 2010 Peter Lemenkov <lemenkov at gmail.com> - 1.2.1-2
+- Allow group users to write to controlling UNIX-socket (rhbz #626863)
+
* Sun Nov 1 2009 Peter Lemenkov <lemenkov at gmail.com> - 1.2.1-1
- Ver. 1.2.1
- Brand new init-script
More information about the scm-commits
mailing list