45429eb PROXY: Do not register signal with SA_SIGINFO

1 file Authored by lslebodn 8 years ago, Committed by jhrozek 8 years ago,
    PROXY: Do not register signal with SA_SIGINFO
    
    Argument "siginfo_t *siginfo" (void *__siginfo) was not used in
    signal handlers pc_init_sig_handler, proxy_child_sig_handler.
    
    siginfo is mostly used for additional information for about signal
    and precesses (@see man 2 sigaction) and we store needed information
    in custom context (private_data); It's tevent style.
    
    Why backend crashed:
    proxy_child_init_send creates request; forks a process and register
    handler for signal SIGCHLD. Talloc parent of tevent_signal is previously
    created request.
    
    If proxy_child fails (return code is not 0) then SIGCHLD is received
    handler pc_init_sig_handler is called. However pc_init_sig_handler can call
    tevent_req_error for request which calls request callback and released
    request.
    
    tevent_signal_destructor was called as a part of releasing
    tevent_signal. The destructor cleared siginfo in ring buffer for first time.
    Then tevent tried to clear the same siginfo in ring buffer for the secont time
    after returning from signal hander (pc_init_sig_handler). But it was already
    cleared and it caused dereference of NULL pointer.
    
    Resolves:
    https://fedorahosted.org/sssd/ticket/2654
    
    Reviewed-by: Michal Židek <mzidek@redhat.com>
    (cherry picked from commit df233bce93c6e6752cf22cd4244c85c94d68b17b)