s3-util: remove the s3 nterr.c
authorAndrew Tridgell <tridge@samba.org>
Fri, 17 Jun 2011 04:40:07 +0000 (14:40 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 17 Jun 2011 07:09:00 +0000 (17:09 +1000)
this is now in common code

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source3/Makefile.in
source3/include/proto.h
source3/libsmb/nterr.c [deleted file]
source3/wscript_build

index 3ef754182bab926e67324ab7386156f8ce748d13..9140659c8f458a438a5d84849c4f255b86c4937f 100644 (file)
@@ -541,7 +541,7 @@ LIBNMB_OBJ = libsmb/unexpected.o libsmb/namecache.o libsmb/nmblib.o \
             libsmb/namequery.o ../libcli/nbt/lmhosts.o ../libcli/dns/dns_hosts_file.o libsmb/conncache.o \
             libads/dns.o libads/sitename_cache.o
 
-NTERR_OBJ = ../libcli/util/nterr.o libsmb/nterr.o libsmb/smberr.o
+NTERR_OBJ = ../libcli/util/nterr.o libsmb/smberr.o
 DOSERR_OBJ = ../libcli/util/doserr.o
 ERRORMAP_OBJ = ../libcli/util/errormap.o libsmb/errormap.o
 DCE_RPC_ERR_OBJ = ../librpc/rpc/dcerpc_error.o
index f3643078c45c14c4bd74ab5a4ca1ab7937e17ff7..98445d89b5dd4819b3a6586812a426a6c32a1767 100644 (file)
@@ -1095,13 +1095,6 @@ bool get_dc_name(const char *domain,
                fstring srv_name,
                struct sockaddr_storage *ss_out);
 
-/* The following definitions come from libsmb/nterr.c  */
-
-const char *nt_errstr(NTSTATUS nt_code);
-const char *get_friendly_nt_error_msg(NTSTATUS nt_code);
-NTSTATUS nt_status_string_to_code(const char *nt_status_str);
-NTSTATUS nt_status_squash(NTSTATUS nt_status);
-
 /* The following definitions come from libsmb/ntlmssp.c  */
 struct ntlmssp_state;
 NTSTATUS ntlmssp_set_username(struct ntlmssp_state *ntlmssp_state, const char *user) ;
diff --git a/source3/libsmb/nterr.c b/source3/libsmb/nterr.c
deleted file mode 100644 (file)
index a4a3883..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *  Unix SMB/CIFS implementation.
- *  RPC Pipe client / server routines
- *  Copyright (C) Luke Kenneth Casson Leighton 1997-2001.
- *
- *  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/>.
- */
-
-/* NT error codes.  please read nterr.h */
-
-#include "includes.h"
-
-extern const nt_err_code_struct nt_errs[];
-extern const nt_err_code_struct nt_err_desc[];
-
-#include "smb_ldap.h"
-#undef strcasecmp
-
-/*****************************************************************************
- Returns an NT error message.  not amazingly helpful, but better than a number.
- *****************************************************************************/
-
-const char *nt_errstr(NTSTATUS nt_code)
-{
-       int idx = 0;
-       char *result;
-
-       if (NT_STATUS_IS_DOS(nt_code)) {
-               return smb_dos_err_name(NT_STATUS_DOS_CLASS(nt_code),
-                                       NT_STATUS_DOS_CODE(nt_code));
-       }
-
-       while (nt_errs[idx].nt_errstr != NULL) {
-               if (NT_STATUS_V(nt_errs[idx].nt_errcode) ==
-                   NT_STATUS_V(nt_code)) {
-                       return nt_errs[idx].nt_errstr;
-               }
-               idx++;
-       }
-
-       result = talloc_asprintf(talloc_tos(), "NT code 0x%08x",
-                                NT_STATUS_V(nt_code));
-       SMB_ASSERT(result != NULL);
-       return result;
-}
-
index f09b8707f143bf4096bde4053e486a873885d3fd..901721573ca07239670420d7b864fdaedff86570 100755 (executable)
@@ -1064,7 +1064,7 @@ bld.SAMBA3_SUBSYSTEM('ldb3',
                     deps='samba-util-common')
 
 bld.SAMBA3_SUBSYSTEM('errors3',
-                     source='libsmb/nterr.c libsmb/errormap.c libsmb/smberr.c lib/errmap_unix.c', 
+                     source='libsmb/errormap.c libsmb/smberr.c lib/errmap_unix.c',
                      deps='LIBCLI_ERRORS')
 
 bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR',