Changeset 860 for vendor/current/source3/smbd/process.c
- Timestamp:
- May 12, 2014, 8:58:38 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/smbd/process.c
r746 r860 152 152 } 153 153 154 len = smb_len (buf_out) + 4;154 len = smb_len_large(buf_out) + 4; 155 155 156 156 ret = write_data(sconn->sock, buf_out+nwritten, len - nwritten); … … 920 920 DEBUG(10,("event_add_idle: %s %p\n", result->name, result->te)); 921 921 return result; 922 }923 924 static void smbd_sig_term_handler(struct tevent_context *ev,925 struct tevent_signal *se,926 int signum,927 int count,928 void *siginfo,929 void *private_data)930 {931 exit_server_cleanly("termination signal");932 }933 934 void smbd_setup_sig_term_handler(void)935 {936 struct tevent_signal *se;937 938 se = tevent_add_signal(smbd_event_context(),939 smbd_event_context(),940 SIGTERM, 0,941 smbd_sig_term_handler,942 NULL);943 if (!se) {944 exit_server("failed to setup SIGTERM handler");945 }946 }947 948 static void smbd_sig_hup_handler(struct tevent_context *ev,949 struct tevent_signal *se,950 int signum,951 int count,952 void *siginfo,953 void *private_data)954 {955 struct messaging_context *msg_ctx = talloc_get_type_abort(956 private_data, struct messaging_context);957 change_to_root_user();958 DEBUG(1,("Reloading services after SIGHUP\n"));959 reload_services(msg_ctx, smbd_server_conn->sock, False);960 if (am_parent) {961 pcap_cache_reload(ev, msg_ctx, &reload_pcap_change_notify);962 }963 }964 965 void smbd_setup_sig_hup_handler(struct tevent_context *ev,966 struct messaging_context *msg_ctx)967 {968 struct tevent_signal *se;969 970 se = tevent_add_signal(ev, ev, SIGHUP, 0, smbd_sig_hup_handler,971 msg_ctx);972 if (!se) {973 exit_server("failed to setup SIGHUP handler");974 }975 922 } 976 923 … … 2031 1978 */ 2032 1979 req->chain_outbuf = TALLOC_REALLOC_ARRAY( 2033 req, req->outbuf, uint8_t, smb_len(req->outbuf) + 4); 1980 req, req->outbuf, uint8_t, 1981 smb_len_large(req->outbuf) + 4); 2034 1982 if (req->chain_outbuf == NULL) { 2035 1983 smb_panic("talloc failed");
Note:
See TracChangeset
for help on using the changeset viewer.