From: gilles Date: Tue, 6 Oct 2015 06:07:28 +0000 (+0000) Subject: fix chdir() call for the sake of correctness X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a94ff62f202615d15edd72a8795db3a79fca02c4;p=openbsd fix chdir() call for the sake of correctness reported by qualys --- diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c index 2344a2d49fb..eeb9e3d3bc9 100644 --- a/usr.sbin/smtpd/smtpctl.c +++ b/usr.sbin/smtpd/smtpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpctl.c,v 1.126 2015/10/06 05:48:34 gilles Exp $ */ +/* $OpenBSD: smtpctl.c,v 1.127 2015/10/06 06:07:28 gilles Exp $ */ /* * Copyright (c) 2013 Eric Faurot @@ -639,7 +639,7 @@ do_show_queue(int argc, struct parameter *argv) if (!srv_connect()) { log_init(1); queue_init("fs", 0); - if (chroot(PATH_SPOOL) == -1 || chdir(".") == -1) + if (chroot(PATH_SPOOL) == -1 || chdir("/") == -1) err(1, "%s", PATH_SPOOL); fts = fts_open(qpath, FTS_PHYSICAL|FTS_NOCHDIR, NULL); if (fts == NULL)