s3-build: Provide a run-time shim to work around duplicate symbols
[nivanova/samba-autobuild/.git] / source3 / smbd / proto.h
index b1ebf994cf4bee2d91743ae151d0d6014ab77e51..adeaf688996ec22dfbb9e2c6a5dff727077a4574 100644 (file)
@@ -1,3 +1,50 @@
+/*
+ *  Unix SMB/CIFS implementation.
+ *  Main SMB server routines
+ *
+ *  Copyright (C) Andrew Tridgell                      1992-2002,2006
+ *  Copyright (C) Jeremy Allison                       1992-2010
+ *  Copyright (C) Volker Lendecke                      1993-2009
+ *  Copyright (C) John H Terpstra                      1995-1998
+ *  Copyright (C) Luke Kenneth Casson Leighton         1996-1998
+ *  Copyright (C) Paul Ashton                          1997-1998
+ *  Copyright (C) Tim Potter                           1999-2000
+ *  Copyright (C) T.D.Lee@durham.ac.uk                 1999
+ *  Copyright (C) Ying Chen                            2000
+ *  Copyright (C) Shirish Kalele                       2000
+ *  Copyright (C) Andrew Bartlett                      2001-2003
+ *  Copyright (C) Alexander Bokovoy                    2002,2005
+ *  Copyright (C) Simo Sorce                           2001-2002,2009
+ *  Copyright (C) Andreas Gruenbacher                  2002
+ *  Copyright (C) Jim McDonough <jmcd@us.ibm.com>      2002
+ *  Copyright (C) Martin Pool                          2002
+ *  Copyright (C) Luke Howard                          2003
+ *  Copyright (C) Stefan (metze) Metzmacher            2003,2009
+ *  Copyright (C) Steve French                         2005
+ *  Copyright (C) Gerald (Jerry) Carter                        2006
+ *  Copyright (C) James Peach                          2006-2007
+ *  Copyright (C) Jelmer Vernooij                      2002-2003
+ *  Copyright (C) Michael Adam                         2007
+ *  Copyright (C) Rishi Srivatsavai                    2007
+ *  Copyright (C) Tim Prouty                           2009
+ *  Copyright (C) Gregor Beck                          2011
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _SMBD_PROTO_H_
+#define _SMBD_PROTO_H_
 
 /* The following definitions come from smbd/signing.c  */
 
@@ -63,6 +110,9 @@ bool push_blocking_lock_request( struct byte_range_lock *br_lck,
                uint64_t offset,
                uint64_t count,
                uint64_t blocking_smblctx);
+void smbd_cancel_pending_lock_requests_by_fid(files_struct *fsp,
+                       struct byte_range_lock *br_lck,
+                       enum file_close_type close_type);
 void cancel_pending_lock_requests_by_fid(files_struct *fsp,
                        struct byte_range_lock *br_lck,
                        enum file_close_type close_type);
@@ -189,6 +239,8 @@ void DirCacheAdd(struct smb_Dir *dirp, const char *name, long offset);
 bool SearchDir(struct smb_Dir *dirp, const char *name, long *poffset);
 NTSTATUS can_delete_directory(struct connection_struct *conn,
                                const char *dirname);
+NTSTATUS smbd_can_delete_directory(struct connection_struct *conn,
+                               const char *dirname);
 
 /* The following definitions come from smbd/dmapi.c  */
 
@@ -623,6 +675,10 @@ void contend_level2_oplocks_begin(files_struct *fsp,
                                  enum level2_contention_type type);
 void contend_level2_oplocks_end(files_struct *fsp,
                                enum level2_contention_type type);
+void smbd_contend_level2_oplocks_begin(files_struct *fsp,
+                                 enum level2_contention_type type);
+void smbd_contend_level2_oplocks_end(files_struct *fsp,
+                               enum level2_contention_type type);
 void share_mode_entry_to_message(char *msg, const struct share_mode_entry *e);
 void message_to_share_mode_entry(struct share_mode_entry *e, char *msg);
 bool init_oplocks(struct messaging_context *msg_ctx);
@@ -999,11 +1055,18 @@ bool stat_cache_lookup(connection_struct *conn,
                        char **pp_dirpath,
                        char **pp_start,
                        SMB_STRUCT_STAT *pst);
+void smbd_send_stat_cache_delete_message(struct messaging_context *msg_ctx,
+                                   const char *name);
 void send_stat_cache_delete_message(struct messaging_context *msg_ctx,
                                    const char *name);
 void stat_cache_delete(const char *name);
+#if BUILD_TDB2
+struct tdb_data;
+unsigned int fast_string_hash(struct tdb_data *key);
+#else
 struct TDB_DATA;
 unsigned int fast_string_hash(struct TDB_DATA *key);
+#endif
 bool reset_stat_cache( void );
 
 /* The following definitions come from smbd/statvfs.c  */
@@ -1054,10 +1117,13 @@ bool change_to_user(connection_struct *conn, uint16 vuid);
 bool change_to_user_by_session(connection_struct *conn,
                               const struct auth_serversupplied_info *session_info);
 bool change_to_root_user(void);
+bool smbd_change_to_root_user(void);
 bool become_authenticated_pipe_user(struct auth_serversupplied_info *session_info);
 bool unbecome_authenticated_pipe_user(void);
 void become_root(void);
 void unbecome_root(void);
+void smbd_become_root(void);
+void smbd_unbecome_root(void);
 bool become_user(connection_struct *conn, uint16 vuid);
 bool become_user_by_session(connection_struct *conn,
                            const struct auth_serversupplied_info *session_info);
@@ -1133,3 +1199,5 @@ void *avahi_start_register(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
 /* The following definitions come from smbd/msg_idmap.c */
 
 void msg_idmap_register_msgs(struct messaging_context *ctx);
+
+#endif /* _SMBD_PROTO_H_ */