summaryrefslogtreecommitdiff
path: root/source3/include/smb_macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include/smb_macros.h')
-rw-r--r--source3/include/smb_macros.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index 21ccdf295c..178fd9c358 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -77,6 +77,12 @@
#define OPEN_CONN(conn) ((conn) && (conn)->open)
#define IS_IPC(conn) ((conn) && (conn)->ipc)
#define IS_PRINT(conn) ((conn) && (conn)->printer)
+#define FSP_BELONGS_CONN(fsp,conn) do {\
+ extern struct current_user current_user;\
+ if (!((fsp) && (conn) && ((conn)==(fsp)->conn) && (current_user.vuid==(fsp)->vuid))) \
+ return(ERROR_DOS(ERRDOS,ERRbadfid));\
+ } while(0)
+
#define FNUM_OK(fsp,c) (OPEN_FSP(fsp) && (c)==(fsp)->conn && current_user.vuid==(fsp)->vuid)
#define CHECK_FSP(fsp,conn) do {\