summaryrefslogtreecommitdiff
path: root/usr/src/cmd/fs.d/nfs/mountd/mountd.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/fs.d/nfs/mountd/mountd.c')
-rw-r--r--usr/src/cmd/fs.d/nfs/mountd/mountd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/src/cmd/fs.d/nfs/mountd/mountd.c b/usr/src/cmd/fs.d/nfs/mountd/mountd.c
index dbf4c11ea1..04f8ff1def 100644
--- a/usr/src/cmd/fs.d/nfs/mountd/mountd.c
+++ b/usr/src/cmd/fs.d/nfs/mountd/mountd.c
@@ -20,6 +20,7 @@
*
* Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2012 Joyent, Inc. All rights reserved.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
@@ -390,6 +391,13 @@ main(int argc, char *argv[])
exit(1);
}
+ /* Mountd cannot run in a non-global zone. */
+ if (getzoneid() != GLOBAL_ZONEID) {
+ (void) fprintf(stderr, "%s: can only run in the global zone\n",
+ argv[0]);
+ exit(1);
+ }
+
maxthreads = 0;
while ((c = getopt(argc, argv, "vrm:")) != EOF) {