Changeset 988 for vendor/current/source3/smbd/globals.c
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/smbd/globals.c
r860 r988 21 21 #include "smbd/smbd.h" 22 22 #include "smbd/globals.h" 23 #include " memcache.h"23 #include "../lib/util/memcache.h" 24 24 #include "messages.h" 25 25 #include <tdb.h> 26 27 #if defined(WITH_AIO)28 struct aio_extra *aio_list_head = NULL;29 struct tevent_signal *aio_signal_event = NULL;30 int aio_pending_size = 0;31 int outstanding_aio_calls = 0;32 #endif33 26 34 27 #ifdef USE_DMAPI 35 28 struct smbd_dmapi_context *dmapi_ctx = NULL; 36 29 #endif 37 38 39 bool dfree_broken = false;40 30 41 31 /* how many write cache buffers have been allocated */ … … 54 44 unsigned mangle_prefix = 0; 55 45 56 struct msg_state *smbd_msg_state = NULL;57 58 46 bool logged_ioctl_message = false; 59 47 60 48 time_t last_smb_conf_reload_time = 0; 61 49 time_t last_printer_reload_time = 0; 50 pid_t background_lpq_updater_pid = -1; 51 62 52 /**************************************************************************** 63 53 structure to hold a linked list of queued messages. 64 54 for processing. 65 55 ****************************************************************************/ 66 struct pending_message_list *deferred_open_queue = NULL;67 56 uint32_t common_flags2 = FLAGS2_LONG_PATH_COMPONENTS|FLAGS2_32_BIT_ERROR_CODES|FLAGS2_EXTENDED_ATTRIBUTES; 68 57 69 struct smb_ srv_trans_enc_ctx*partial_srv_trans_enc_ctx = NULL;70 struct smb_ srv_trans_enc_ctx*srv_trans_enc_ctx = NULL;58 struct smb_trans_enc_state *partial_srv_trans_enc_ctx = NULL; 59 struct smb_trans_enc_state *srv_trans_enc_ctx = NULL; 71 60 72 61 /* A stack of security contexts. We include the current context as being … … 92 81 char *LastDir = NULL; 93 82 94 /* Current number of oplocks we have outstanding. */ 95 int32_t exclusive_oplocks_open = 0; 96 int32_t level_II_oplocks_open = 0; 97 struct kernel_oplocks *koplocks = NULL; 98 99 int am_parent = 1; 83 struct smbd_parent_context *am_parent = NULL; 100 84 struct memcache *smbd_memcache_ctx = NULL; 101 85 bool exit_firsttime = true; 102 struct child_pid *children = 0;103 int num_children = 0;104 86 105 struct smbd_server_connection *smbd_server_conn = NULL; 106 107 struct smbd_server_connection *msg_ctx_to_sconn(struct messaging_context *msg_ctx) 108 { 109 struct server_id my_id, msg_id; 110 111 my_id = messaging_server_id(smbd_server_conn->msg_ctx); 112 msg_id = messaging_server_id(msg_ctx); 113 114 if (!procid_equal(&my_id, &msg_id)) { 115 return NULL; 116 } 117 return smbd_server_conn; 118 } 119 120 struct messaging_context *smbd_messaging_context(void) 121 { 122 struct messaging_context *msg_ctx = server_messaging_context(); 123 if (likely(msg_ctx != NULL)) { 124 return msg_ctx; 125 } 126 smb_panic("Could not init smbd's messaging context.\n"); 127 return NULL; 128 } 87 struct smbXsrv_client *global_smbXsrv_client = NULL; 129 88 130 89 struct memcache *smbd_memcache(void) … … 146 105 } 147 106 148 149 107 void smbd_init_globals(void) 150 108 { … … 152 110 153 111 ZERO_STRUCT(sec_ctx_stack); 154 155 smbd_server_conn = talloc_zero(smbd_event_context(), struct smbd_server_connection);156 if (!smbd_server_conn) {157 exit_server("failed to create smbd_server_connection");158 }159 160 smbd_server_conn->smb1.echo_handler.trusted_fd = -1;161 smbd_server_conn->smb1.echo_handler.socket_lock_fd = -1;162 112 }
Note:
See TracChangeset
for help on using the changeset viewer.