diff options
author | наб <[email protected]> | 2021-04-11 20:12:50 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-04-19 15:22:58 -0700 |
commit | 219acd907bf041b7c42b3c8874e22c5b86bafcb2 (patch) | |
tree | b0f5dc67e98279fb0199bc22a901578f66db8948 | |
parent | cc33149e5aa1929d4e21269ca88225ecf2a2cef3 (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 b0394dfab..56df3e666 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); |