diff options
author | 2020-01-24 18:51:45 +0000 | |
---|---|---|
committer | 2020-01-24 18:51:45 +0000 | |
commit | 07f4c7f89dbab61f7351f4929879341727a1a7d1 (patch) | |
tree | a93faad5279e146301969a69c9387dda8667b5fa | |
parent | Oops, one break too many removed; unbreak +tcp. (diff) | |
download | wireguard-openbsd-07f4c7f89dbab61f7351f4929879341727a1a7d1.tar.xz wireguard-openbsd-07f4c7f89dbab61f7351f4929879341727a1a7d1.zip |
simplify, no need to make a copy of the filename, pointer is fine
okay millert@ schwarze@
-rw-r--r-- | sbin/mountd/mountd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/mountd/mountd.c b/sbin/mountd/mountd.c index 40b09fc2cb7..5a5ed87d024 100644 --- a/sbin/mountd/mountd.c +++ b/sbin/mountd/mountd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mountd.c,v 1.87 2019/06/28 13:32:45 deraadt Exp $ */ +/* $OpenBSD: mountd.c,v 1.88 2020/01/24 18:51:45 espie Exp $ */ /* $NetBSD: mountd.c,v 1.31 1996/02/18 11:57:53 fvdl Exp $ */ /* @@ -210,7 +210,7 @@ void mountd_svc_run(void); struct exportlist *exphead; struct mountlist *mlhead; struct grouplist *grphead; -char exname[PATH_MAX]; +const char *exname; struct xucred def_anon = { .cr_uid = (uid_t) -2, .cr_gid = (gid_t) -2, @@ -265,7 +265,10 @@ main(int argc, char *argv[]) exphead = NULL; mlhead = NULL; - strlcpy(exname, argc == 1? *argv : _PATH_EXPORTS, sizeof(exname)); + if (argc == 1) + exname = *argv; + else + exname = _PATH_EXPORTS; openlog("mountd", LOG_PID, LOG_DAEMON); if (debug) |