summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorNuno Santos <nsantos@apache.org>2008-04-01 15:23:01 +0000
committerNuno Santos <nsantos@apache.org>2008-04-01 15:23:01 +0000
commit39d5ad08610bd28822c77807c1a74a9d2c0be25a (patch)
tree09ed4afd5ef641584407219019a31bfe22d173ab /cpp
parent50b5c480e3960505e7d9e7adf765ad63af5c9fda (diff)
downloadqpid-python-39d5ad08610bd28822c77807c1a74a9d2c0be25a.tar.gz
QPID-892: Make qpidd daemon not run as root (rpm install)
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@643442 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rwxr-xr-xcpp/etc/qpidd2
-rw-r--r--cpp/qpidc.spec.in12
2 files changed, 12 insertions, 2 deletions
diff --git a/cpp/etc/qpidd b/cpp/etc/qpidd
index 821e50a9a2..55d885ef66 100755
--- a/cpp/etc/qpidd
+++ b/cpp/etc/qpidd
@@ -31,7 +31,7 @@ RETVAL=0
start() {
echo -n $"Starting Qpid AMQP daemon: "
- daemon --check $prog $prog --daemon $QPIDD_OPTIONS
+ daemon --check $prog "runuser -s /bin/sh qpidd -c \"$prog --daemon $QPIDD_OPTIONS\""
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch $lockfile
diff --git a/cpp/qpidc.spec.in b/cpp/qpidc.spec.in
index fd4a24b2e5..2819f02c45 100644
--- a/cpp/qpidc.spec.in
+++ b/cpp/qpidc.spec.in
@@ -5,7 +5,7 @@
Name: @PACKAGE@
Version: @VERSION@
-Release: 24%{?dist}
+Release: 25%{?dist}
Summary: Libraries for Qpid C++ client applications
Group: System Environment/Libraries
License: Apache Software License
@@ -69,6 +69,13 @@ Requires: openais-devel
Libraries and header files for developing extensions to the
Qpid broker daemon.
+%pre
+getent group qpidd >/dev/null || groupadd -r qpidd
+getent passwd qpidd >/dev/null || \
+ useradd -r -m -g qpidd -d %{_localstatedir}/lib/qpidd -s /sbin/nologin \
+ -c "Owner of Qpidd Daemons" qpidd
+exit 0
+
%prep
%setup -q
@@ -157,6 +164,9 @@ fi
/sbin/ldconfig
%changelog
+* Mon Mar 31 2008 Nuno Santos <nsantos@redhat.com> - 0.2-25
+- Create user qpidd, start qpidd service as qpidd
+
* Mon Feb 18 2008 Rafael Schloming <rafaels@redhat.com> - 0.2-24
- Bug fix for TCK issue in Beta 3