diff options
author | hjl <hjl> | 2001-05-28 18:37:30 +0000 |
---|---|---|
committer | hjl <hjl> | 2001-05-28 18:37:30 +0000 |
commit | 63049fd3c95c67df5ac175c746f8ec9058f8a76c (patch) | |
tree | 95ec382a3ba940674829f2e994351c7eedf0324d /utils/mountd | |
parent | 86ae664e66c439354cb4f959e9f289059e7760a4 (diff) | |
download | nfs-utils-63049fd3c95c67df5ac175c746f8ec9058f8a76c.tar.gz nfs-utils-63049fd3c95c67df5ac175c746f8ec9058f8a76c.tar.xz nfs-utils-63049fd3c95c67df5ac175c746f8ec9058f8a76c.zip |
2001-05-28 H.J. Lu <hjl@lucon.org>
* 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.
Diffstat (limited to 'utils/mountd')
-rw-r--r-- | utils/mountd/mountd.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 <arpa/inet.h> #include <unistd.h> #include <stdlib.h> +#include <string.h> #include <getopt.h> #include <errno.h> #include <fcntl.h> @@ -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"); */ |