Ignore:
Timestamp:
Sep 30, 2008, 7:14:08 AM (17 years ago)
Author:
Paul Smedley
Message:

Update source to 3.0.32

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  
    183183       
    184184        if (lstat(dir, &st) == -1) {
     185                errno = ENOENT;
    185186                return -1;
    186187        }
     
    188189        if (!S_ISDIR(st.st_mode) ||
    189190            (st.st_uid != 0 && st.st_uid != geteuid())) {
     191                errno = ENOENT;
    190192                return -1;
    191193        }
     
    211213
    212214        if (lstat(path, &st) == -1) {
     215                errno = ENOENT;
    213216                return -1;
    214217        }
     
    218221        if (!S_ISSOCK(st.st_mode) ||
    219222            (st.st_uid != 0 && st.st_uid != geteuid())) {
     223                errno = ENOENT;
    220224                return -1;
    221225        }
     
    364368       
    365369        if (winbind_open_pipe_sock(recursing, need_priv) == -1) {
     370                errno = ENOENT;
    366371                return -1;
    367372        }
     
    571576        if (write_sock(request, sizeof(*request),
    572577                       request->flags & WBFLAG_RECURSE, need_priv) == -1) {
     578                /* Set ENOENT for consistency.  Required by some apps */
     579                errno = ENOENT;
     580               
    573581                return NSS_STATUS_UNAVAIL;
    574582        }
     
    577585            (write_sock(request->extra_data.data, request->extra_len,
    578586                        request->flags & WBFLAG_RECURSE, need_priv) == -1)) {
     587                /* Set ENOENT for consistency.  Required by some apps */
     588                errno = ENOENT;
     589
    579590                return NSS_STATUS_UNAVAIL;
    580591        }
     
    600611        /* Wait for reply */
    601612        if (read_reply(response) == -1) {
     613                /* Set ENOENT for consistency.  Required by some apps */
     614                errno = ENOENT;
     615
    602616                return NSS_STATUS_UNAVAIL;
    603617        }
  • branches/samba-3.0/source/nsswitch/winbindd.c

    r140 r158  
    4747/* Reload configuration */
    4848
    49 static BOOL reload_services_file(void)
     49static BOOL reload_services_file(const char *logfile)
    5050{
    5151        BOOL ret;
     
    6262        reopen_logs();
    6363        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);
    6469
    6570        reopen_logs();
     
    189194        /* Flush various caches */
    190195        flush_caches();
    191         reload_services_file();
     196        reload_services_file((const char *) private_data);
    192197}
    193198
     
    727732
    728733/* check if HUP has been received and reload files */
    729 void winbind_check_sighup(void)
     734void winbind_check_sighup(const char *logfile)
    730735{
    731736        if (do_sighup) {
     
    733738                DEBUG(3, ("got SIGHUP\n"));
    734739
    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);
    736741                do_sighup = False;
    737742        }
     
    910915
    911916        winbind_check_sigterm(true);
    912         winbind_check_sighup();
     917        winbind_check_sighup(NULL);
    913918
    914919        if (do_sigusr2) {
     
    10081013                  COPYRIGHT_STARTUP_MESSAGE) );
    10091014
    1010         if (!reload_services_file()) {
     1015        if (!reload_services_file(NULL)) {
    10111016                DEBUG(0, ("error opening config file\n"));
    10121017                exit(1);
  • branches/samba-3.0/source/nsswitch/winbindd_dual.c

    r140 r158  
    103103};
    104104
     105static void async_request_fail(struct winbindd_async_request *state);
    105106static void async_main_request_sent(void *private_data, BOOL success);
    106107static void async_request_sent(void *private_data, BOOL success);
     
    128129        state->mem_ctx = mem_ctx;
    129130        state->child = child;
     131        state->reply_timeout_event = NULL;
    130132        state->request = request;
    131133        state->response = response;
     
    147149        if (!success) {
    148150                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);
    153152                return;
    154153        }
     
    10251024                /* check for signals */
    10261025                winbind_check_sigterm(false);
    1027                 winbind_check_sighup();
     1026                winbind_check_sighup(override_logfile ? NULL :
     1027                        child->logfilename);
    10281028
    10291029                run_events(winbind_event_context(), 0, NULL, NULL);
  • branches/samba-3.0/source/nsswitch/winbindd_proto.h

    r140 r158  
    1919void request_ok(struct winbindd_cli_state *state);
    2020void request_finished_cont(void *private_data, BOOL success);
    21 void winbind_check_sighup(void);
     21void winbind_check_sighup(const char *logfile);
    2222void winbind_check_sigterm(bool in_parent);
    2323int main(int argc, char **argv, char **envp);
Note: See TracChangeset for help on using the changeset viewer.