summaryrefslogtreecommitdiff
path: root/usr/src/cmd/fs.d/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/fs.d/mount.c')
-rw-r--r--usr/src/cmd/fs.d/mount.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/usr/src/cmd/fs.d/mount.c b/usr/src/cmd/fs.d/mount.c
index 3fdb498f2c..8c8d7034fe 100644
--- a/usr/src/cmd/fs.d/mount.c
+++ b/usr/src/cmd/fs.d/mount.c
@@ -18,11 +18,6 @@
*
* CDDL HEADER END
*/
-
-/*
- * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
- */
-
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
@@ -30,6 +25,8 @@
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2019 Nexenta by DDN, Inc. All rights reserved.
*/
#include <stdio.h>
@@ -55,6 +52,7 @@
#include <stropts.h>
#include <sys/conf.h>
#include <locale.h>
+#include <priv.h>
#include "fslib.h"
#define VFS_PATH "/usr/lib/fs"
@@ -822,6 +820,17 @@ doexec(char *fstype, char *newargv[])
}
/*
+ * Some file system types need pfexec.
+ */
+ if (strcmp(fstype, "smbfs") == 0 &&
+ setpflags(PRIV_PFEXEC, 1) != 0) {
+ (void) fprintf(stderr,
+ gettext("mount: unable to set PFEXEC flag: %s\n"),
+ strerror(errno));
+ exit(1);
+ }
+
+ /*
* Try to exec the fstype dependent portion of the mount.
* See if the directory is there before trying to exec dependent
* portion. This is only useful for eliminating the