libshare: nfs: commonify nfs_{init,fini}_tmpfile(), nfs_disable_share()

Also open the temp file cloexec

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Wilson <gwilson@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #11886
This commit is contained in:
наб
2021-04-11 19:42:07 +02:00
committed by Brian Behlendorf
parent a3d387b31d
commit 8357bbff1f
5 changed files with 101 additions and 132 deletions
+4
View File
@@ -24,6 +24,8 @@
* Copyright (c) 2011 Gunnar Beutner
* Copyright (c) 2019, 2020 by Delphix. All rights reserved.
*/
#ifndef _LIBSPL_LIBSHARE_IMPL_H
#define _LIBSPL_LIBSHARE_IMPL_H
typedef struct sa_share_fsinfo {
char *shareopts;
@@ -59,3 +61,5 @@ typedef struct sa_fstype {
} sa_fstype_t;
sa_fstype_t *register_fstype(const char *name, const sa_share_ops_t *ops);
#endif /* _LIBSPL_LIBSHARE_IMPL_H */