+Sun Jan 9 01:40:23 CET 2000 Wichert Akkerman <wakkerma@debian.org>
+
+ * scripts/cl-debian.pl: Allow space between `#' and the bugnumber in the
+ changelog scripts
+ * scripts/start-stop-daemon.c: test for __sparc__ instead
+ * scripts/Makefile.in: add optlib to CFLAGS
+ * utils/start-stop-daemon.c: add option to chroot first, patch from Marco d'Itri
+ * utils/start-stop-daemon.8: document chroot option
+ * dselect/pkgtop.cc: use waddnstr to print package description instead of waddch
+
Fri Jan 7 18:24:45 CET 2000 Wichert Akkerman <wakkerma@debian.org>
* dselect/method.cc: pass admindir to dpkg
Juho Vuori <javuori@cc.helsinki.fi>
Kim-Minh Kaplan <kkaplan@cdfhp3.in2p3.fr>
Klee Dienes <klee@debian.org>
+Marco d'Itri <md@linux.it>
Marcus Brinkmann <brinkmd@debian.org>
Masato Taruishi <taru@debian.or.jp>
Matt Welsh <mdw@sunsite.unc.edu>
+
+* start-stop-daemon: write pidfile before we chroot?
+
+------------------------------------------------------------------------------
+
+Old TODO entries from IWJ:
+
Here are some currently-known inadequacies:
urgent
dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ([2.12])
+AC_PREREQ([2.13])
AC_INIT(include/dpkg.h.in)
AC_CONFIG_HEADER(config.h)
+dpkg (1.6.7) unstable; urgency=low
+
+ * start-stop-daemon can chroot now, Closes: Bug#54513
+ * Allow space between # and the bugnumber in the changelog
+ * Display package description with waddnstr, Closes: Bug#54313
+
+ -- Wichert Akkerman <wakkerma@debian.org> UNRELEASED
+
dpkg (1.6.6) unstable; urgency=low
* dpkg-buildpackage supports debsign, Closes: Bug#58333
i= description_width;
p= info->description ? info->description : "";
- while (i>0 && *p && *p != '\n') { waddch(listpad,*p); i--; p++; }
+ while (i>0 && *p && *p != '\n') { waddnstr(listpad,p,1); i--; p++; }
} else {
$f{'Changes'} =~ s/\n$//;
$f{'Changes'} =~ s/^/\n/;
-while ($f{'Changes'} =~ /closes:\s*(?:bug)?\#\d+(?:,\s*(?:bug)?\#\d+)*/ig) {
+while ($f{'Changes'} =~ /closes:\s*(?:bug)?\#\s*\d+(?:,\s*(?:bug)?\#\s*\d+)*/ig) {
push(@closes, $& =~ /\#(\d+)/g);
}
$f{'Closes'} = join(' ',sort { $a <=> $b} @closes);
include ../Makefile.conf
+CFLAGS += $(top_srcdir)/optlib
+
SSD_SOURCES = start-stop-daemon.c
SSD_OBJECTS = $(patsubst %.c, %.o, $(SSD_SOURCES))
SSD_MANPAGES = start-stop-daemon.8
groups that the user isn't normally a member of (like adding per/process
group membership for generic users like `nobody').
.TP
+.I -r|--chroot root
+Chdir and chroot to
+.B root
+before starting the process. Please note that the pidfile is also written
+after the chroot.
+.TP
.I -b|--background
Typically used with programs that don't detach on their own. This option
will force
#define OSLinux
#elif defined(__GNU__)
#define OSHURD
-#elif defined(Sparc)
+#elif defined(__sparc__)
#define OSsunos
#else
#error Unknown architecture - cannot build start-stop-daemon
static const char *userspec = NULL;
static char *changeuser = NULL;
static char *changegroup = NULL;
+static char *changeroot = NULL;
static const char *cmdname = NULL;
static char *execname = NULL;
static char *startas = NULL;
{ "signal", 1, NULL, 's'},
{ "test", 0, NULL, 't'},
{ "user", 1, NULL, 'u'},
+ { "chroot", 1, NULL, 'r'},
{ "verbose", 0, NULL, 'v'},
{ "exec", 1, NULL, 'x'},
{ "chuid", 1, NULL, 'c'},
int c;
for (;;) {
- c = getopt_long(argc, argv, "HKSVa:n:op:qs:tu:vx:c:bm",
+ c = getopt_long(argc, argv, "HKSVa:n:op:qr:s:tu:vx:c:bm",
longopts, (int *) 0);
if (c == -1)
break;
changeuser = strtok(changeuser, ":");
changegroup = strtok(NULL, ":");
break;
+ case 'r': /* --chroot /new/root */
+ changeroot = optarg;
+ break;
case 'b': /* --background */
background = 1;
break;
else
printf(")");
}
+ if (changeroot != NULL)
+ printf(" in directory %s", changeroot);
printf(".\n");
exit(0);
}
if (quietmode < 0)
printf("Starting %s...\n", startas);
*--argv = startas;
+ if (changeroot != NULL) {
+ if (chdir(changeroot) < 0)
+ fatal("Unable to chdir() to %s", changeroot);
+ if (chroot(changeroot) < 0)
+ fatal("Unable to chroot() to %s", changeroot);
+ }
if (changeuser != NULL) {
if (setgid(runas_gid))
fatal("Unable to set gid to %d", runas_gid);