diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2004-10-05 22:16:31 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2004-10-05 22:16:31 +0000 |
commit | 59fdf30f9270823808555ba22630aff50781a00b (patch) | |
tree | 5f903abb72d10da71af8559a6c08eed398da43d3 | |
parent | f8135176c9478ce295ff79c953698612ffdfa2dd (diff) | |
download | src-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
-rw-r--r-- | usr.sbin/newsyslog/newsyslog.c | 2 |
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); |