From a94ff62f202615d15edd72a8795db3a79fca02c4 Mon Sep 17 00:00:00 2001 From: gilles Date: Tue, 6 Oct 2015 06:07:28 +0000 Subject: [PATCH] fix chdir() call for the sake of correctness reported by qualys --- usr.sbin/smtpd/smtpctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.20.1