Changeset 158 for branches/samba-3.0/source/nsswitch
- Timestamp:
- Sep 30, 2008, 7:14:08 AM (17 years ago)
- Location:
- branches/samba-3.0/source/nsswitch
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/nsswitch/wb_common.c
r71 r158 183 183 184 184 if (lstat(dir, &st) == -1) { 185 errno = ENOENT; 185 186 return -1; 186 187 } … … 188 189 if (!S_ISDIR(st.st_mode) || 189 190 (st.st_uid != 0 && st.st_uid != geteuid())) { 191 errno = ENOENT; 190 192 return -1; 191 193 } … … 211 213 212 214 if (lstat(path, &st) == -1) { 215 errno = ENOENT; 213 216 return -1; 214 217 } … … 218 221 if (!S_ISSOCK(st.st_mode) || 219 222 (st.st_uid != 0 && st.st_uid != geteuid())) { 223 errno = ENOENT; 220 224 return -1; 221 225 } … … 364 368 365 369 if (winbind_open_pipe_sock(recursing, need_priv) == -1) { 370 errno = ENOENT; 366 371 return -1; 367 372 } … … 571 576 if (write_sock(request, sizeof(*request), 572 577 request->flags & WBFLAG_RECURSE, need_priv) == -1) { 578 /* Set ENOENT for consistency. Required by some apps */ 579 errno = ENOENT; 580 573 581 return NSS_STATUS_UNAVAIL; 574 582 } … … 577 585 (write_sock(request->extra_data.data, request->extra_len, 578 586 request->flags & WBFLAG_RECURSE, need_priv) == -1)) { 587 /* Set ENOENT for consistency. Required by some apps */ 588 errno = ENOENT; 589 579 590 return NSS_STATUS_UNAVAIL; 580 591 } … … 600 611 /* Wait for reply */ 601 612 if (read_reply(response) == -1) { 613 /* Set ENOENT for consistency. Required by some apps */ 614 errno = ENOENT; 615 602 616 return NSS_STATUS_UNAVAIL; 603 617 } -
branches/samba-3.0/source/nsswitch/winbindd.c
r140 r158 47 47 /* Reload configuration */ 48 48 49 static BOOL reload_services_file( void)49 static BOOL reload_services_file(const char *logfile) 50 50 { 51 51 BOOL ret; … … 62 62 reopen_logs(); 63 63 ret = lp_load(dyn_CONFIGFILE,False,False,True,True); 64 65 /* if this is a child, restore the logfile to the special 66 name - <domain>, idmap, etc. */ 67 if (logfile && *logfile) 68 lp_set_logfile(logfile); 64 69 65 70 reopen_logs(); … … 189 194 /* Flush various caches */ 190 195 flush_caches(); 191 reload_services_file( );196 reload_services_file((const char *) private_data); 192 197 } 193 198 … … 727 732 728 733 /* check if HUP has been received and reload files */ 729 void winbind_check_sighup( void)734 void winbind_check_sighup(const char *logfile) 730 735 { 731 736 if (do_sighup) { … … 733 738 DEBUG(3, ("got SIGHUP\n")); 734 739 735 msg_reload_services(MSG_SMB_CONF_UPDATED, pid_to_procid(0), NULL, 0, NULL);740 msg_reload_services(MSG_SMB_CONF_UPDATED, pid_to_procid(0), NULL, 0, logfile); 736 741 do_sighup = False; 737 742 } … … 910 915 911 916 winbind_check_sigterm(true); 912 winbind_check_sighup( );917 winbind_check_sighup(NULL); 913 918 914 919 if (do_sigusr2) { … … 1008 1013 COPYRIGHT_STARTUP_MESSAGE) ); 1009 1014 1010 if (!reload_services_file( )) {1015 if (!reload_services_file(NULL)) { 1011 1016 DEBUG(0, ("error opening config file\n")); 1012 1017 exit(1); -
branches/samba-3.0/source/nsswitch/winbindd_dual.c
r140 r158 103 103 }; 104 104 105 static void async_request_fail(struct winbindd_async_request *state); 105 106 static void async_main_request_sent(void *private_data, BOOL success); 106 107 static void async_request_sent(void *private_data, BOOL success); … … 128 129 state->mem_ctx = mem_ctx; 129 130 state->child = child; 131 state->reply_timeout_event = NULL; 130 132 state->request = request; 131 133 state->response = response; … … 147 149 if (!success) { 148 150 DEBUG(5, ("Could not send async request\n")); 149 150 state->response->length = sizeof(struct winbindd_response); 151 state->response->result = WINBINDD_ERROR; 152 state->continuation(state->private_data, False); 151 async_request_fail(state); 153 152 return; 154 153 } … … 1025 1024 /* check for signals */ 1026 1025 winbind_check_sigterm(false); 1027 winbind_check_sighup(); 1026 winbind_check_sighup(override_logfile ? NULL : 1027 child->logfilename); 1028 1028 1029 1029 run_events(winbind_event_context(), 0, NULL, NULL); -
branches/samba-3.0/source/nsswitch/winbindd_proto.h
r140 r158 19 19 void request_ok(struct winbindd_cli_state *state); 20 20 void request_finished_cont(void *private_data, BOOL success); 21 void winbind_check_sighup( void);21 void winbind_check_sighup(const char *logfile); 22 22 void winbind_check_sigterm(bool in_parent); 23 23 int main(int argc, char **argv, char **envp);
Note:
See TracChangeset
for help on using the changeset viewer.