From 63049fd3c95c67df5ac175c746f8ec9058f8a76c Mon Sep 17 00:00:00 2001 From: hjl Date: Mon, 28 May 2001 18:37:30 +0000 Subject: 2001-05-28 H.J. Lu * utils/lockd/lockd.c (main): chdir to NFS_STATEDIR. * utils/mountd/mountd.c (main): Likewise. * utils/nfsd/nfsd.c (main): Likewise. * utils/rquotad/rquota_svc.c (main): Likewise. --- utils/mountd/mountd.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'utils/mountd/mountd.c') diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c index 8779afe..14f5fa2 100644 --- a/utils/mountd/mountd.c +++ b/utils/mountd/mountd.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -440,6 +441,12 @@ main(int argc, char **argv) if (optind != argc || !(nfs_version & 0x7)) usage(argv [0], 1); + if (chdir(NFS_STATEDIR)) { + fprintf(stderr, "%s: chdir(%s) failed: %s\n", + argv [0], NFS_STATEDIR, strerror(errno)); + exit(1); + } + /* Initialize logging. */ /* xlog_open("mountd"); */ -- cgit