summaryrefslogtreecommitdiff
path: root/community/murmur
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/murmur
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/murmur')
-rw-r--r--community/murmur/0003-fix-long-username-query.patch42
-rw-r--r--community/murmur/0004-fix-username-validation.patch36
-rw-r--r--community/murmur/ChangeLog36
-rw-r--r--community/murmur/PKGBUILD66
-rw-r--r--community/murmur/murmur.conf.d2
-rw-r--r--community/murmur/murmur.dbus.conf22
-rw-r--r--community/murmur/murmur.install33
-rw-r--r--community/murmur/murmur.logrotate.d6
-rw-r--r--community/murmur/murmur.rc.d40
9 files changed, 283 insertions, 0 deletions
diff --git a/community/murmur/0003-fix-long-username-query.patch b/community/murmur/0003-fix-long-username-query.patch
new file mode 100644
index 000000000..2fc52f70c
--- /dev/null
+++ b/community/murmur/0003-fix-long-username-query.patch
@@ -0,0 +1,42 @@
+commit 6b33dda344f89e5a039b7d79eb43925040654242
+Author: Benjamin Jemlich <pcgod@users.sourceforge.net>
+Date: Tue Jun 29 14:49:14 2010 +0200
+
+ Don't crash on long usernames
+
+diff --git a/src/murmur/Messages.cpp b/src/murmur/Messages.cpp
+index f12867a..de307ea 100644
+--- a/src/murmur/Messages.cpp
++++ b/src/murmur/Messages.cpp
+@@ -1231,6 +1231,9 @@ void Server::msgQueryUsers(ServerUser *uSource, MumbleProto::QueryUsers &msg) {
+
+ for (int i=0;i<msg.names_size();++i) {
+ QString name = u8(msg.names(i));
++ if (!validateUserName(name)) {
++ continue;
++ }
+ int id = getUserID(name);
+ if (id >= 0) {
+ name = getUserName(id);
+diff --git a/src/murmur/ServerDB.cpp b/src/murmur/ServerDB.cpp
+index 11b6906..7e15def 100644
+--- a/src/murmur/ServerDB.cpp
++++ b/src/murmur/ServerDB.cpp
+@@ -810,7 +810,7 @@ int Server::authenticate(QString &name, const QString &pw, const QStringList &em
+ TransactionHolder th;
+ QSqlQuery &query = *th.qsqQuery;
+
+- SQLPREP("SELECT `user_id`,`name`,`pw` FROM `%1users` WHERE `server_id` = ? AND `name` like ?");
++ SQLPREP("SELECT `user_id`,`name`,`pw` FROM `%1users` WHERE `server_id` = ? AND LOWER(`name`) = LOWER(?)");
+ query.addBindValue(iServerNum);
+ query.addBindValue(name);
+ SQLEXEC();
+@@ -1051,7 +1051,7 @@ int Server::getUserID(const QString &name) {
+ TransactionHolder th;
+
+ QSqlQuery &query = *th.qsqQuery;
+- SQLPREP("SELECT `user_id` FROM `%1users` WHERE `server_id` = ? AND `name` like ?");
++ SQLPREP("SELECT `user_id` FROM `%1users` WHERE `server_id` = ? AND LOWER(`name`) = LOWER(?)");
+ query.addBindValue(iServerNum);
+ query.addBindValue(name);
+ SQLEXEC();
diff --git a/community/murmur/0004-fix-username-validation.patch b/community/murmur/0004-fix-username-validation.patch
new file mode 100644
index 000000000..493f78ba5
--- /dev/null
+++ b/community/murmur/0004-fix-username-validation.patch
@@ -0,0 +1,36 @@
+commit 5c40cfeb4b5f8911df926c19f2dd628703840f64
+Author: Stefan Hacker <dd0t@users.sourceforge.net>
+Date: Tue Jun 29 23:39:16 2010 +0200
+
+ Don't validate the name before we are sure it wasn't already validated by an authenticator
+
+diff --git a/src/murmur/Messages.cpp b/src/murmur/Messages.cpp
+index de307ea..f12867a 100644
+--- a/src/murmur/Messages.cpp
++++ b/src/murmur/Messages.cpp
+@@ -1231,9 +1231,6 @@ void Server::msgQueryUsers(ServerUser *uSource, MumbleProto::QueryUsers &msg) {
+
+ for (int i=0;i<msg.names_size();++i) {
+ QString name = u8(msg.names(i));
+- if (!validateUserName(name)) {
+- continue;
+- }
+ int id = getUserID(name);
+ if (id >= 0) {
+ name = getUserName(id);
+diff --git a/src/murmur/ServerDB.cpp b/src/murmur/ServerDB.cpp
+index 7e15def..70b4ca4 100644
+--- a/src/murmur/ServerDB.cpp
++++ b/src/murmur/ServerDB.cpp
+@@ -1048,6 +1048,11 @@ int Server::getUserID(const QString &name) {
+ qhUserNameCache.insert(id, name);
+ return id;
+ }
++
++ if (!validateUserName(name)) {
++ return id;
++ }
++
+ TransactionHolder th;
+
+ QSqlQuery &query = *th.qsqQuery;
diff --git a/community/murmur/ChangeLog b/community/murmur/ChangeLog
new file mode 100644
index 000000000..7537836fa
--- /dev/null
+++ b/community/murmur/ChangeLog
@@ -0,0 +1,36 @@
+2010-02-11 Otto Allmendinger <otto.allmendinger@googlemail.com>
+ * 1.2.2-1:
+ bump to version 1.2.2
+
+2010-01-09 Otto Allmendinger <otto.allmendinger@googlemail.com>
+ * 1.2.1-1:
+ bump to version 1.2.1
+
+2009-12-18 Otto Allmendinger <otto.allmendinger@googlemail.com>
+ * 1.2.0-8:
+ included dbus configuration file, changed default dbus settings
+
+ * 1.2.0-7:
+ included manfile
+ renamed binary "murmur" to "murmurd" to be consistent with manfile
+ changed murmur user shell to /bin/false (shell access not required anymore)
+
+2009-12-17 Malte Rabenseifner <malte@zearan.de>
+ * 1.2.0-6:
+ included manfile
+ using mumbles included privilige dropping
+ added some files to backup array
+ added logrotate configuration file
+
+2009-12-15 Otto Allmendinger <otto.allmendinger@googlemail.com>
+ * 1.2.0-5 :
+ simplified dependencies
+ increased visibility of install messages
+
+ * 1.2.0-4 :
+ added boost to makedepends
+
+ * 1.2.0-3 :
+ added ChangeLog
+ added post_upgrade() function
+ added x86_64 to arch
diff --git a/community/murmur/PKGBUILD b/community/murmur/PKGBUILD
new file mode 100644
index 000000000..de2865f60
--- /dev/null
+++ b/community/murmur/PKGBUILD
@@ -0,0 +1,66 @@
+# $Id: PKGBUILD 40102 2011-02-20 03:59:25Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Otto Allmendinger <otto.allmendinger@googlemail.com>
+# Contributor: Malte Rabenseifner <malte@zearan.de>
+
+pkgname=murmur
+pkgver=1.2.3
+pkgrel=1
+pkgdesc="The voice chat application server for Mumble"
+arch=('i686' 'x86_64')
+url="http://mumble.sourceforge.net"
+license=('GPL')
+depends=('avahi' 'lsb-release' 'protobuf' 'qt>=4.4.0')
+makedepends=('boost')
+conflicts=('murmur-ice' 'murmur-static' 'murmur-git')
+backup=("etc/murmur.ini"
+ "etc/logrotate.d/murmur"
+ "etc/conf.d/murmur" )
+install="murmur.install"
+source=("http://downloads.sourceforge.net/mumble/mumble-$pkgver.tar.gz"
+ "murmur.rc.d"
+ "murmur.conf.d"
+ "murmur.dbus.conf"
+ "murmur.logrotate.d"
+)
+md5sums=('55804e3dfe98b16eeb40abca6c254625'
+ 'b99061be67c54bf0bb4a061fd1280281'
+ '11c1cc875e8021739ec2087252cf0533'
+ 'eddea4cdbd0bde4b960a67e16b5d5478'
+ 'c56726cb267ead68f37f35c28e36e6fa'
+)
+
+build() {
+ cd ${srcdir}/mumble-$pkgver
+
+ qmake main.pro CONFIG+="no-client no-ice"
+ make
+}
+
+package() {
+ cd ${srcdir}/mumble-$pkgver
+
+ sed -e "1i# vi:ft=cfg" \
+ -e "s|database=|database=/var/lib/murmur/murmur.sqlite|" \
+ -e "s|dbus=session|#dbus=system|" \
+ -e "s|#logfile=murmur.log|logfile=/var/log/murmur/murmur.log|" \
+ -e "s|#pidfile=|pidfile=/var/run/murmur/murmur.pid|" \
+ -e "s|#uname=|uname=murmur|" \
+ -i scripts/murmur.ini
+
+ install -dm755 ${pkgdir}/var/lib/murmur
+ install -dm755 ${pkgdir}/var/log/murmur
+ install -dm755 ${pkgdir}/var/run/murmur
+ install -Dm755 release/murmurd ${pkgdir}/usr/sbin/murmurd
+ install -Dm644 scripts/murmur.ini ${pkgdir}/etc/murmur.ini
+ install -Dm755 ${srcdir}/murmur.rc.d ${pkgdir}/etc/rc.d/murmur
+ install -Dm644 ${srcdir}/murmur.conf.d ${pkgdir}/etc/conf.d/murmur
+ install -Dm644 ${srcdir}/murmur.dbus.conf \
+ ${pkgdir}/etc/dbus-1/system.d/murmur.conf
+ install -Dm644 ${srcdir}/murmur.logrotate.d \
+ ${pkgdir}/etc/logrotate.d/murmur
+ install -Dm644 README ${pkgdir}/usr/share/doc/murmur/README
+ install -Dm644 man/murmurd.1 ${pkgdir}/usr/share/man/man1/murmurd.1
+}
+
+# vim: sw=2:ts=2 et:
diff --git a/community/murmur/murmur.conf.d b/community/murmur/murmur.conf.d
new file mode 100644
index 000000000..592194be9
--- /dev/null
+++ b/community/murmur/murmur.conf.d
@@ -0,0 +1,2 @@
+# Use /etc/murmur.ini as configuration file
+PARAMS="-ini /etc/murmur.ini"
diff --git a/community/murmur/murmur.dbus.conf b/community/murmur/murmur.dbus.conf
new file mode 100644
index 000000000..cf937d7b1
--- /dev/null
+++ b/community/murmur/murmur.dbus.conf
@@ -0,0 +1,22 @@
+<!-- vi: set ft=xml: -->
+<!--
+ As described in http://mumble.sourceforge.net/DBus,
+ but with different username
+-->
+<!DOCTYPE busconfig PUBLIC
+ "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+
+ <policy user="murmur">
+ <allow own="net.sourceforge.mumble.murmur"/>
+ </policy>
+ <policy user="root">
+ <allow own="net.sourceforge.mumble.murmur"/>
+ </policy>
+
+ <policy context="default">
+ <allow send_destination="net.sourceforge.mumble.murmur"/>
+ <allow receive_sender="net.sourceforge.mumble.murmur"/>
+ </policy>
+</busconfig>
diff --git a/community/murmur/murmur.install b/community/murmur/murmur.install
new file mode 100644
index 000000000..9e1446d2e
--- /dev/null
+++ b/community/murmur/murmur.install
@@ -0,0 +1,33 @@
+post_install() {
+
+ # bug: dbus reload here doesn't work
+ # workaround: it seems to work if you do it a few seconds later, manually
+ /etc/rc.d/dbus reload > /dev/null
+
+ /usr/bin/getent group murmur > /dev/null || /usr/sbin/groupadd murmur
+ /usr/bin/getent passwd murmur > /dev/null || \
+ /usr/sbin/useradd -d /var/lib/murmur -g murmur -s /bin/false murmur
+
+ chown -R murmur:murmur /var/lib/murmur
+ chown -R murmur:murmur /var/run/murmur
+ chown -R murmur:murmur /var/log/murmur
+
+ echo
+ echo '==> Set the SuperUser password with (as root):'
+ echo '==> murmurd -ini /etc/murmur.ini -supw PASSWORD'
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ [ -f /var/run/daemons/murmur ] && /etc/rc.d/murmur stop > /dev/null
+ killall -u murmur -5
+ sleep 1
+}
+
+post_remove() {
+ /etc/rc.d/dbus reload > /dev/null
+ /usr/sbin/userdel murmur > /dev/null
+}
diff --git a/community/murmur/murmur.logrotate.d b/community/murmur/murmur.logrotate.d
new file mode 100644
index 000000000..e113175ab
--- /dev/null
+++ b/community/murmur/murmur.logrotate.d
@@ -0,0 +1,6 @@
+/var/log/murmur/murmur.log {
+ missingok
+ postrotate
+ /bin/kill -HUP `cat /var/run/murmur/murmur.pid 2>/dev/null` 2> /dev/null || true
+ endscript
+}
diff --git a/community/murmur/murmur.rc.d b/community/murmur/murmur.rc.d
new file mode 100644
index 000000000..7a41e77da
--- /dev/null
+++ b/community/murmur/murmur.rc.d
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+CONF=/etc/conf.d/murmur
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+[ -f $CONF ] && . $CONF
+
+PID=$(pidof -o %PPID /usr/sbin/murmurd)
+case "$1" in
+ start)
+ stat_busy "Starting murmur"
+ [ -z "$PID" ] && /usr/sbin/murmurd $PARAMS
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon murmur
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping murmur"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon murmur
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0