Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/nmbd/asyncdns.c

    r740 r988  
    33   a async DNS handler
    44   Copyright (C) Andrew Tridgell 1997-1998
    5    
     5
    66   This program is free software; you can redistribute it and/or modify
    77   it under the terms of the GNU General Public License as published by
    88   the Free Software Foundation; either version 3 of the License, or
    99   (at your option) any later version.
    10    
     10
    1111   This program is distributed in the hope that it will be useful,
    1212   but WITHOUT ANY WARRANTY; without even the implied warranty of
    1313   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1414   GNU General Public License for more details.
    15    
     15
    1616   You should have received a copy of the GNU General Public License
    1717   along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2020#include "includes.h"
    2121#include "nmbd/nmbd.h"
     22#include "lib/util/sys_rw_data.h"
    2223
    2324/***************************************************************************
     
    3132
    3233        pull_ascii_nstring(qname, sizeof(qname), question->name);
    33  
     34
    3435        if (!addr.s_addr) {
    3536                /* add the fail to WINS cache of names. give it 1 hour in the cache */
     
    9192                NTSTATUS status;
    9293
    93                 status = read_data(fd_in, (char *)&r, sizeof(r));
     94                status = read_data_ntstatus(fd_in, (char *)&r, sizeof(r));
    9495
    9596                if (!NT_STATUS_IS_OK(status)) {
     
    136137  create a child process to handle DNS lookups
    137138  ****************************************************************************/
    138 void start_async_dns(void)
     139void start_async_dns(struct messaging_context *msg)
    139140{
    140141        int fd1[2], fd2[2];
     
    148149        }
    149150
    150         child_pid = sys_fork();
     151        child_pid = fork();
    151152
    152153        if (child_pid) {
     
    167168        CatchSignal(SIGTERM, sig_term);
    168169
    169         status = reinit_after_fork(nmbd_messaging_context(),
    170                                    nmbd_event_context(),
    171                                    procid_self(), true);
     170        status = reinit_after_fork(msg, nmbd_event_context(), true, NULL);
    172171
    173172        if (!NT_STATUS_IS_OK(status)) {
     
    206205  check the DNS queue
    207206  ****************************************************************************/
    208 void run_dns_queue(void)
     207void run_dns_queue(struct messaging_context *msg)
    209208{
    210209        struct query_record r;
     
    219218                close(fd_in);
    220219                close(fd_out);
    221                 start_async_dns();
    222         }
    223 
    224         status = read_data(fd_in, (char *)&r, sizeof(r));
     220                start_async_dns(msg);
     221        }
     222
     223        status = read_data_ntstatus(fd_in, (char *)&r, sizeof(r));
    225224
    226225        if (!NT_STATUS_IS_OK(status)) {
Note: See TracChangeset for help on using the changeset viewer.