diff options
author | Josh Wilsdon <jwilsdon@joyent.com> | 2016-03-19 05:20:17 +0000 |
---|---|---|
committer | Josh Wilsdon <jwilsdon@joyent.com> | 2016-03-19 05:20:17 +0000 |
commit | 43952ba6b83053a338a690d361a3fa450513d64e (patch) | |
tree | ea0714169af117096804daf902031e09b5bb6ae3 | |
parent | 868d62fdba8df95378d6e17a5b6154e3fd228de9 (diff) | |
download | illumos-joyent-43952ba6b83053a338a690d361a3fa450513d64e.tar.gz |
fix for OS-5221
-rw-r--r-- | usr/src/cmd/fs.d/nfs/lib/nfs_sec.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr/src/cmd/fs.d/nfs/lib/nfs_sec.c b/usr/src/cmd/fs.d/nfs/lib/nfs_sec.c index 06dc44a12c..af83923825 100644 --- a/usr/src/cmd/fs.d/nfs/lib/nfs_sec.c +++ b/usr/src/cmd/fs.d/nfs/lib/nfs_sec.c @@ -45,6 +45,7 @@ #include <stdlib.h> #include <syslog.h> #include <synch.h> +#include <zone.h> #include <rpc/rpc.h> #include <nfs/nfs_sec.h> #include <rpc/rpcsec_gss.h> @@ -707,12 +708,17 @@ get_seconfig(int whichway, char *name, int num, { char line[BUFSIZ]; /* holds each line of NFSSEC_CONF */ FILE *fp; /* file stream for NFSSEC_CONF */ + char nfssec_conf[MAXPATHLEN]; + const char *zroot = zone_get_nroot(); if ((whichway == GETBYNAME) && (name == NULL)) return (SC_NOTFOUND); + (void) snprintf(nfssec_conf, sizeof (nfssec_conf), "%s%s", zroot != NULL ? + zroot : "", NFSSEC_CONF); + (void) mutex_lock(&matching_lock); - if ((fp = fopen(NFSSEC_CONF, "r")) == NULL) { + if ((fp = fopen(nfssec_conf, "r")) == NULL) { (void) mutex_unlock(&matching_lock); return (SC_OPENFAIL); } |