diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2020-01-24 18:51:46 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2020-01-24 18:51:46 +0000 |
commit | b78ed6489e0bb89796f015fcd59b8c9e0cd538d4 (patch) | |
tree | d76f0a0c9a31b0af47181e7b8310fa626f2475fc | |
parent | 95eec0a0796f2cc4b52eefad3915f098057aaeb8 (diff) |
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) |