From 4140f2bfc141ee9a91723d274344769f8b11a5f9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 24 Oct 1998 06:36:22 +0000 Subject: make sure that apps can't close one of the internal smbw file descriptors by catching close attempts on those fds and returning EBADF. (This used to be commit 9d863fb1681a5b03696552e1d93fe339b4bae455) --- source3/smbwrapper/shared.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/smbwrapper/shared.c') diff --git a/source3/smbwrapper/shared.c b/source3/smbwrapper/shared.c index 7a5cbcee22..ef139414bc 100644 --- a/source3/smbwrapper/shared.c +++ b/source3/smbwrapper/shared.c @@ -212,3 +212,10 @@ int smbw_setenv(const char *name, const char *value) return ret; } +/***************************************************************** +return true if the passed fd is the SMBW_HANDLE +*****************************************************************/ +int smbw_shared_fd(int fd) +{ + return (shared_fd && shared_fd == fd); +} -- cgit