mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	freebsd/libshare: nfs: make nfs_is_shared() thread-safe
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:
		
							parent
							
								
									501da8d433
								
							
						
					
					
						commit
						faad85637b
					
				@ -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);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user