aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2004-10-05 22:16:31 +0000
committerBrooks Davis <brooks@FreeBSD.org>2004-10-05 22:16:31 +0000
commit59fdf30f9270823808555ba22630aff50781a00b (patch)
tree5f903abb72d10da71af8559a6c08eed398da43d3 /usr.sbin
parentf8135176c9478ce295ff79c953698612ffdfa2dd (diff)
downloadsrc-59fdf30f9270823808555ba22630aff50781a00b.tar.gz
src-59fdf30f9270823808555ba22630aff50781a00b.zip
Don't prepend the directory specified by -d when the file is a relative
path. Doing so makes no sense. I'm not sure allowing relative paths makes sense either, but I'm not going to break that now.
Notes
Notes: svn path=/head/; revision=136174
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/newsyslog/newsyslog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c
index 590dbf66f00f..632cc6ae308e 100644
--- a/usr.sbin/newsyslog/newsyslog.c
+++ b/usr.sbin/newsyslog/newsyslog.c
@@ -340,7 +340,7 @@ init_entry(const char *fname, struct conf_entry *src_entry)
if (tempwork == NULL)
err(1, "malloc of conf_entry for %s", fname);
- if (destdir == NULL)
+ if (destdir == NULL || fname[0] != '/')
tempwork->log = strdup(fname);
else
asprintf(&tempwork->log, "%s%s", destdir, fname);