s3: Remove unused code
authorVolker Lendecke <vl@samba.org>
Mon, 20 Jun 2011 20:25:20 +0000 (22:25 +0200)
committerVolker Lendecke <vlendec@samba.org>
Tue, 21 Jun 2011 13:36:01 +0000 (15:36 +0200)
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jun 21 15:36:01 CEST 2011 on sn-devel-104

source3/Makefile.in
source3/winbindd/winbindd_wins.c [deleted file]
source3/wscript_build

index 7e1ebfacb24930c28087956e1ed13935afa30934..59f9032ea2bff5425ca925c5194da7824e4ba6d1 100644 (file)
@@ -1353,7 +1353,6 @@ WINBINDD_OBJ1 = \
                winbindd/winbindd_pam.o   \
                winbindd/winbindd_misc.o  \
                winbindd/winbindd_cm.o    \
-               winbindd/winbindd_wins.o  \
                winbindd/winbindd_wins_byip.o  \
                winbindd/winbindd_wins_byname.o  \
                winbindd/winbindd_msrpc.o \
diff --git a/source3/winbindd/winbindd_wins.c b/source3/winbindd/winbindd_wins.c
deleted file mode 100644 (file)
index 25c04df..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   Winbind daemon - WINS related functions
-
-   Copyright (C) Andrew Tridgell 1999
-   Copyright (C) Herb Lewis 2002
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-#include "winbindd.h"
-#include "libsmb/nmblib.h"
-
-#undef DBGC_CLASS
-#define DBGC_CLASS DBGC_WINBIND
-
-static struct sockaddr_storage *lookup_byname_backend(TALLOC_CTX *mem_ctx,
-                                                     const char *name,
-                                                     int *count)
-{
-       struct sockaddr_storage *return_ss = NULL;
-       int j;
-       NTSTATUS status;
-
-       *count = 0;
-
-       /* always try with wins first */
-       status = resolve_wins(name, 0x20, mem_ctx, &return_ss, count);
-       if (NT_STATUS_IS_OK(status)) {
-               if ( *count == 0 )
-                       return NULL;
-               return return_ss;
-       }
-
-       /* uggh, we have to broadcast to each interface in turn */
-       for (j=iface_count() - 1;
-            j >= 0;
-            j--) {
-               const struct sockaddr_storage *bcast_ss = iface_n_bcast(j);
-               if (!bcast_ss) {
-                       continue;
-               }
-               status = name_query(name, 0x20, True, True,bcast_ss,
-                                   mem_ctx, &return_ss, count, NULL);
-               if (NT_STATUS_IS_OK(status)) {
-                       break;
-               }
-       }
-
-       return return_ss;
-}
-
-/* Get IP from hostname */
-
-void winbindd_wins_byname(struct winbindd_cli_state *state)
-{
-       struct sockaddr_storage *ip_list = NULL;
-       int i, count, maxlen, size;
-       fstring response;
-       char addr[INET6_ADDRSTRLEN];
-
-       /* Ensure null termination */
-       state->request->data.winsreq[sizeof(state->request->data.winsreq)-1]='\0';
-
-       DEBUG(3, ("[%5lu]: wins_byname %s\n", (unsigned long)state->pid,
-               state->request->data.winsreq));
-
-       *response = '\0';
-       maxlen = sizeof(response) - 1;
-
-       ip_list = lookup_byname_backend(
-               state->mem_ctx, state->request->data.winsreq, &count);
-       if (ip_list != NULL){
-               for (i = count; i ; i--) {
-                       print_sockaddr(addr, sizeof(addr), &ip_list[i-1]);
-                       size = strlen(addr);
-                       if (size > maxlen) {
-                               TALLOC_FREE(ip_list);
-                               request_error(state);
-                               return;
-                       }
-                       if (i != 0) {
-                               /* Clear out the newline character */
-                               /* But only if there is something in there,
-                               otherwise we clobber something in the stack */
-                               if (strlen(response)) {
-                                       response[strlen(response)-1] = ' ';
-                               }
-                       }
-                       strlcat(response,addr,sizeof(response));
-                       strlcat(response,"\t",sizeof(response));
-               }
-               size = strlen(state->request->data.winsreq) + strlen(response);
-               if (size > maxlen) {
-                   TALLOC_FREE(ip_list);
-                   request_error(state);
-                   return;
-               }
-               strlcat(response,state->request->data.winsreq,sizeof(response));
-               strlcat(response,"\n",sizeof(response));
-               TALLOC_FREE(ip_list);
-       } else {
-               request_error(state);
-               return;
-       }
-
-       strlcpy(state->response->data.winsresp,
-               response,
-               sizeof(state->response->data.winsresp));
-
-       request_ok(state);
-}
index 52134ea6a2b7121db2616fa087f8d45ee5b3c7a2..53c412e4617d5a9aae876c99baf5e22252894baf 100755 (executable)
@@ -250,7 +250,6 @@ WINBINDD_SRC1 = '''winbindd/winbindd.c
                    winbindd/winbindd_pam.c
                    winbindd/winbindd_misc.c
                    winbindd/winbindd_cm.c
-                   winbindd/winbindd_wins.c
                    winbindd/winbindd_wins_byip.c
                    winbindd/winbindd_wins_byname.c
                    winbindd/winbindd_msrpc.c