From 45b9d3e776024bdbda3edddaf85d130367cdeb6e Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Tue, 12 Aug 2008 00:24:49 +0100 Subject: BitlBee 1.2.1-1. --- debian/changelog | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a569f4f8..897cc5fa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ -bitlbee (1.2-6) UNRELEASED; urgency=low +bitlbee (1.2.1-1) unstable; urgency=low - * Add Homepage and Vcs-Bzr fields. + * New upstream release. + * Add Homepage and Vcs-Bzr fields. (From Jelmer.) - -- Jelmer Vernooij Sun, 11 May 2008 14:18:16 +0200 + -- Wilmer van der Gaast Thu, 26 Jun 2008 00:07:50 +0100 bitlbee (1.2-5) unstable; urgency=low -- cgit v1.2.3 From 59c84c20ad924fedb9106599b96d2c48ff1cc316 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Tue, 12 Aug 2008 00:25:40 +0100 Subject: 1.2.1-1.1 (NMU by Don Armstrong). --- debian/changelog | 8 ++++++++ debian/postinst | 12 ++++++++++-- debian/prerm | 6 +++++- 3 files changed, 23 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 897cc5fa..fdff2d80 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +bitlbee (1.2.1-1.1) unstable; urgency=low + + * Non-Maintainer Upload + * Use invoke-rc.d as per policy. (Closes: #492637) [Thanks to Matt + Kraii] + + -- Don Armstrong Wed, 06 Aug 2008 06:57:18 -0700 + bitlbee (1.2.1-1) unstable; urgency=low * New upstream release. diff --git a/debian/postinst b/debian/postinst index 80249bfe..1363bfb6 100755 --- a/debian/postinst +++ b/debian/postinst @@ -64,7 +64,11 @@ if [ -e /usr/share/bitlbee/help.upgrading ]; then fi if [ -n "$2" -a "$BITLBEE_UPGRADE_DONT_RESTART" != "1" ]; then - /etc/init.d/bitlbee restart + if which invoke-rc.d >/dev/null 2>&1; then + invoke-rc.d bitlbee restart + else + /etc/init.d/bitlbee restart + fi fi ## If we're upgrading, we'll probably skip this next part @@ -90,5 +94,9 @@ else fi if [ -z "$2" ]; then - /etc/init.d/bitlbee start + if which invoke-rc.d >/dev/null 2>&1; then + invoke-rc.d bitlbee start + else + /etc/init.d/bitlbee start + fi fi diff --git a/debian/prerm b/debian/prerm index 5272e273..8426ab3a 100755 --- a/debian/prerm +++ b/debian/prerm @@ -9,5 +9,9 @@ if [ "$1" = "upgrade" ]; then mv /usr/share/bitlbee/help.txt /usr/share/bitlbee/help.upgrading fi else - /etc/init.d/bitlbee stop || exit 0 + if which invoke-rc.d >/dev/null 2>&1; then + invoke-rc.d bitblee stop || exit 0 + else + /etc/init.d/bitlbee stop || exit 0 + fi fi -- cgit v1.2.3 From 5d3b4e8b7373416c0f48543a6a97cbb3ea591051 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Tue, 12 Aug 2008 00:50:11 +0100 Subject: Fixed run-by-root problem (Debian bug 494656). --- debian/changelog | 9 ++++++++- debian/postinst | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index fdff2d80..f1e25040 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,15 @@ +bitlbee (1.2.1-2) unstable; urgency=low + + * Properly set the User= line to something sensible so BitlBee won't + run as root anymore. 1.2-5 was a bad upload. :-( (Closes: #494656) + + -- Wilmer van der Gaast Tue, 12 Aug 2008 00:36:03 +0100 + bitlbee (1.2.1-1.1) unstable; urgency=low * Non-Maintainer Upload * Use invoke-rc.d as per policy. (Closes: #492637) [Thanks to Matt - Kraii] + Kraai] -- Don Armstrong Wed, 06 Aug 2008 06:57:18 -0700 diff --git a/debian/postinst b/debian/postinst index 1363bfb6..4f5711ba 100755 --- a/debian/postinst +++ b/debian/postinst @@ -63,6 +63,13 @@ if [ -e /usr/share/bitlbee/help.upgrading ]; then fi fi +if ! grep -qi '^User *= *' /etc/bitlbee/bitlbee.conf; then + echo 'Updating configuration file, enabling User-setting...' + if ! sed -i -e 's/# *User *= *.*/User = bitlbee/i' /etc/bitlbee/bitlbee.conf; then + echo 'Failed! BitlBee may run as root now, please check your configs.' + fi +fi + if [ -n "$2" -a "$BITLBEE_UPGRADE_DONT_RESTART" != "1" ]; then if which invoke-rc.d >/dev/null 2>&1; then invoke-rc.d bitlbee restart -- cgit v1.2.3 From d301872cbf032a56c946cb92fa11b511aff3f243 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 24 Aug 2008 17:49:03 +0100 Subject: 1.2.1-3: * chown /var/lib/bitlbee/*.xml to bitlbee:bitlbee to clean up after 1.2-5 and the bugfix in 1.2.1-2. (Closes: #495877) * Moved BITLBEE_DISABLED check to only check when trying to *start* the daemon. (Closes: #488611) --- debian/bitlbee.init | 16 ++++++++++++---- debian/changelog | 9 +++++++++ debian/postinst | 2 +- 3 files changed, 22 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/bitlbee.init b/debian/bitlbee.init index f8fac49c..1ab1bc43 100755 --- a/debian/bitlbee.init +++ b/debian/bitlbee.init @@ -31,8 +31,6 @@ if [ -r /etc/default/$NAME ]; then . /etc/default/$NAME fi -[ "$BITLBEE_DISABLED" = "1" ] && exit 0 - # # Function that starts the daemon/service. @@ -40,9 +38,17 @@ fi d_start() { # Make sure BitlBee can actually write its PID... touch /var/run/bitlbee.pid - chown bitlbee /var/run/bitlbee.pid + chown bitlbee: /var/run/bitlbee.pid - start-stop-daemon --start --quiet --pidfile $PIDFILE \ + # Clean up after the bug between 1.2-5 and 1.2.1-2 where BitlBee ran + # as root. (#494656 and #495877) Fixing this in the postinst script + # is not enough since the user will restart his BitlBee after up- + # grading the package, and the BitlBee running as root will then + # save its settings, re-setting ownership of the file to root. + # TODO: Remove this after a few revisions. + find /var/lib/bitlbee -uid 0 -name '*.xml' -exec chown bitlbee: {} \; + + start-stop-daemon --start --quiet \ --exec $DAEMON -- -p $BITLBEE_PORT -P $PIDFILE $BITLBEE_OPTS } @@ -57,6 +63,8 @@ d_stop() { case "$1" in start) + [ "$BITLBEE_DISABLED" = "1" ] && exit 0 + echo -n "Starting $DESC: $NAME" d_start echo "." diff --git a/debian/changelog b/debian/changelog index f1e25040..1745e6c4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +bitlbee (1.2.1-3) unstable; urgency=high + + * chown /var/lib/bitlbee/*.xml to bitlbee:bitlbee to clean up after + 1.2-5 and the bugfix in 1.2.1-2. (Closes: #495877) + * Moved BITLBEE_DISABLED check to only check when trying to *start* + the daemon. (Closes: #488611) + + -- Wilmer van der Gaast Sat, 23 Aug 2008 18:53:54 +0100 + bitlbee (1.2.1-2) unstable; urgency=low * Properly set the User= line to something sensible so BitlBee won't diff --git a/debian/postinst b/debian/postinst index 4f5711ba..db324b65 100755 --- a/debian/postinst +++ b/debian/postinst @@ -79,7 +79,7 @@ if [ -n "$2" -a "$BITLBEE_UPGRADE_DONT_RESTART" != "1" ]; then fi ## If we're upgrading, we'll probably skip this next part -if [ -d $CONFDIR ] && chown -R bitlbee $CONFDIR; then +if [ -d $CONFDIR ] && chown -R bitlbee: $CONFDIR; then echo 'BitlBee (probably) already installed, skipping user/configdir installation' exit 0 fi -- cgit v1.2.3 From 0a4f6f4d3eff2944ff36a0bd6ec0986824f23ade Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 28 Aug 2008 23:27:34 +0100 Subject: Uploaded 1.2.2-1. Now patching up bitlbee.conf at build time to keep bzr/upstream separated from the Debian package. --- debian/changelog | 9 +++++++++ debian/patches/bitlbee.conf.diff | 13 +++++++++++++ debian/rules | 1 + 3 files changed, 23 insertions(+) create mode 100644 debian/patches/bitlbee.conf.diff (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1745e6c4..a11a67b8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +bitlbee (1.2.2-1) unstable; urgency=critical + + * New upstream version. + * Fixes a security issue (account hijacking), hence the high priority. + * Using a patch to set the User setting in bitlbee.conf properly to keep + upstream and Debian properly separated in my bzr tree. + + -- Wilmer van der Gaast Wed, 27 Aug 2008 23:59:50 +0100 + bitlbee (1.2.1-3) unstable; urgency=high * chown /var/lib/bitlbee/*.xml to bitlbee:bitlbee to clean up after diff --git a/debian/patches/bitlbee.conf.diff b/debian/patches/bitlbee.conf.diff new file mode 100644 index 00000000..b80bcb4c --- /dev/null +++ b/debian/patches/bitlbee.conf.diff @@ -0,0 +1,13 @@ +=== modified file 'bitlbee.conf' +--- debian/bitlbee/etc/bitlbee/bitlbee.conf 2008-08-26 22:33:54 +0000 ++++ debian/bitlbee/etc/bitlbee/bitlbee.conf 2008-08-27 23:18:13 +0000 +@@ -23,7 +23,7 @@ + ## If BitlBee is started by root as a daemon, it can drop root privileges, + ## and change to the specified user. + ## +-# User = bitlbee ++User = bitlbee + + ## DaemonPort/DaemonInterface: + ## + diff --git a/debian/rules b/debian/rules index 661cf30e..788e5006 100755 --- a/debian/rules +++ b/debian/rules @@ -54,6 +54,7 @@ binary-arch: build-arch install-arch cp doc/CHANGES debian/bitlbee/usr/share/doc/bitlbee/changelog cp utils/* debian/bitlbee/usr/share/doc/bitlbee/examples/ cp debian/bitlbee.init debian/bitlbee/etc/init.d/bitlbee + patch -p0 < debian/patches/bitlbee.conf.diff cd debian/bitlbee/usr/share/; \ gzip -9 doc/bitlbee/changelog.Debian doc/bitlbee/changelog doc/bitlbee/user-guide.txt \ doc/bitlbee/examples/* man/man8/bitlbee.8 man/man5/bitlbee.conf.5 -- cgit v1.2.3