diff options
author | наб <[email protected]> | 2021-04-11 20:12:50 +0200 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2021-06-23 13:22:14 -0700 |
commit | faad85637b21ded0e454cd339c770a17a2fb28f1 (patch) | |
tree | a78861626bdc9f88b2ada16b73301167d54f876a | |
parent | 501da8d433f3e9a56c1b61b2f2973e0553cd42f7 (diff) |
freebsd/libshare: nfs: make nfs_is_shared() thread-safe
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Wilson <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #11886
-rw-r--r-- | lib/libshare/os/freebsd/nfs.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libshare/os/freebsd/nfs.c b/lib/libshare/os/freebsd/nfs.c index 9cd7dfa95..130d521b7 100644 --- a/lib/libshare/os/freebsd/nfs.c +++ b/lib/libshare/os/freebsd/nfs.c @@ -361,14 +361,10 @@ nfs_disable_share(sa_share_impl_t impl_share) return (error); } -/* - * NOTE: This function returns a static buffer and thus is not thread-safe. - */ static boolean_t nfs_is_shared(sa_share_impl_t impl_share) { - static char line[MAXLINESIZE]; - char *s, last; + char *s, last, line[MAXLINESIZE]; size_t len; char *mntpoint = impl_share->sa_mountpoint; size_t mntlen = strlen(mntpoint); |