[PATCH] wrong parameter quoting in diversion of start-stop-daemon

Bug #419081 reported by Duncan Sands
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ltsp (Ubuntu)
Fix Released
Low
Scott Balneaves

Bug Description

The ltsp-server package diverts (in the client chroot) /sbin/start-stop-daemon to
/sbin/start-stop-daemon.real. The new start-stop-daemon is a simple wrapper that
calls start-stop-daemon.real if LTSP_HANDLE_DAEMONS is not set to false. Unfortunately
the wrapper passes on the parameters using $*, which doesn't handle quoted parameters
correctly. I noticed this because /etc/cron.daily/man-db does
  start-stop-daemon --start --pidfile /dev/null --startas /bin/sh \
 --oknodo --chuid man -- -c \
 "find /var/cache/man -type f -name '*.gz' -atime +6 -print0 | \
  xargs -r0 rm -f"
and the find-piped-to-xargs part gets expanded to the wrong thing by the start-stop-daemon
wrapper, causing the contents of the entire root filesystem to be dumped to the output.
This can be easily fixed as follows:

--- /usr/share/ltsp/scripts/start-stop-daemon.orig 2009-08-26 09:35:44.000000000 +0200
+++ /usr/share/ltsp/scripts/start-stop-daemon 2009-08-26 09:35:57.000000000 +0200
@@ -4,5 +4,5 @@
 #

 if [ "$LTSP_HANDLE_DAEMONS" != "false" ]; then
- /sbin/start-stop-daemon.real $*
+ /sbin/start-stop-daemon.real "$@"
 fi

Revision history for this message
Scott Balneaves (sbalneav) wrote :

Thanks, I've patched the upstream source.

Changed in ltsp (Ubuntu):
assignee: nobody → Scott Balneaves (sbalneav)
importance: Undecided → Low
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ltsp - 5.1.93-0ubuntu1

---------------
ltsp (5.1.93-0ubuntu1) lucid; urgency=low

  * Add launcher for ltsp-cluster-info
  * New upstream relesae (5.1.93)
   * localapps: Follow symlinks for sshfs
   * Move lts-parameters.txt to ltsp-docs-trunk
   * Add --tftpbootdir to ltsp-update-image
   * Add --exclude-dirs to ltsp-update-image
   * Update translations
   * Add ltsp-info script for troubleshooting
   * Add support for load balancing at login time
   * Fix quoting in ltsp-build-client (LP: #419081)
   * ltsp-build-client cleanup
   * Add ltsp-chroot script
   * Update LSB headers of init scripts
   * Use --print-architecture instead of the deprecated one
   * Add ltsp-cluster support to ltsp_config
   * Fix localapps script to allow for quoted arguments
   * Update udhcp to properly handle spaces
 -- Stephane Graber <email address hidden> Tue, 27 Oct 2009 00:13:32 -0400

Changed in ltsp (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.