Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/web/diagnose.c

    r414 r740  
    33   diagnosis tools for web admin
    44   Copyright (C) Andrew Tridgell 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 "web/swat_proto.h"
     22#include "lib/winbind_util.h"
     23#include "libsmb/libsmb.h"
    2224
    2325#ifdef WITH_WINBIND
     
    3638{
    3739        struct in_addr loopback_ip;
    38         int fd, count, flags;
     40        int count;
    3941        struct sockaddr_storage *ss_list;
    4042        struct sockaddr_storage ss;
     43        NTSTATUS status;
    4144
    4245        loopback_ip.s_addr = htonl(INADDR_LOOPBACK);
    4346        in_addr_to_sockaddr_storage(&ss, loopback_ip);
    4447
    45         if ((fd = open_socket_in(SOCK_DGRAM, 0, 3,
    46                                  &ss, True)) != -1) {
    47                 if ((ss_list = name_query(fd, "__SAMBA__", 0,
    48                                           True, True, &ss,
    49                                           &count, &flags, NULL)) != NULL) {
    50                         SAFE_FREE(ss_list);
    51                         close(fd);
    52                         return True;
    53                 }
    54                 close (fd);
     48        status = name_query("__SAMBA__", 0,
     49                            True, True, &ss,
     50                            talloc_tos(), &ss_list, &count,
     51                            NULL);
     52        if (NT_STATUS_IS_OK(status)) {
     53                TALLOC_FREE(ss_list);
     54                return True;
    5555        }
    5656
Note: See TracChangeset for help on using the changeset viewer.