mirror_zfs/lib/libshare
Richard Yao dcce0dc5f0
Fix oversights from 4170ae4e
4170ae4ea6 was intended to tackle TOCTOU
race conditions reported by CodeQL, but as an oversight, a file
descriptor was not closed and some comments were not updated.
Interestingly, CodeQL did not complain about the file descriptor leak,
so there is room for improvement in how we configure it to try to detect
this issue so that we get early warning about this.

In addition, an optimization opportunity was missed by mistake in
lib/libshare/os/linux/smb.c, which prevented us from truly closing the
TOCTOU race. This was also caught by Coverity.

Reported-by: Coverity (CID 1524424)
Reported-by: Coverity (CID 1526804)
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14109
2022-10-31 10:01:04 -07:00
..
os Fix oversights from 4170ae4e 2022-10-31 10:01:04 -07:00
libshare_impl.h Make zfs-share service resilient to stale exports 2022-09-09 10:54:16 -07:00
libshare.c Make zfs-share service resilient to stale exports 2022-09-09 10:54:16 -07:00
Makefile.am autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00
nfs.c Fix unsafe string operations 2022-09-27 16:47:24 -07:00
nfs.h Make zfs-share service resilient to stale exports 2022-09-09 10:54:16 -07:00
smb.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00