Fix the mess with ldb includes.
[metze/samba/wip.git] / source4 / libcli / util / nterr.c
index 59d4bb0c1f8e6981d6666fb029f70b43bf7f289a..8371837dcb574d682f5282996053e5c201dae3a1 100644 (file)
@@ -5,7 +5,7 @@
  *  
  *  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 2 of the License, or
+ *  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,
  *  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, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 /* NT error codes.  please read nterr.h */
 
 #include "includes.h"
-#include "pstring.h"
-#include "libcli/ldap/ldap.h"
+#include "libcli/ldap/ldap_errors.h"
+#undef strcasecmp
 
 typedef struct
 {
@@ -546,7 +545,10 @@ static const nt_err_code_struct nt_errs[] =
         { "NT_STATUS_NO_MORE_ENTRIES", NT_STATUS_NO_MORE_ENTRIES },
        { "NT_STATUS_RPC_PROTSEQ_NOT_SUPPORTED", NT_STATUS_RPC_PROTSEQ_NOT_SUPPORTED },
        { "NT_STATUS_RPC_UNSUPPORTED_NAME_SYNTAX", NT_STATUS_RPC_UNSUPPORTED_NAME_SYNTAX },
+       { "NT_STATUS_CURRENT_DOMAIN_NOT_ALLOWED", NT_STATUS_CURRENT_DOMAIN_NOT_ALLOWED },
        { "NT_STATUS_OBJECTID_NOT_FOUND", NT_STATUS_OBJECTID_NOT_FOUND },
+       { "NT_STATUS_DOWNGRADE_DETECTED", NT_STATUS_DOWNGRADE_DETECTED },
+       { "NT_STATUS_DS_BUSY", NT_STATUS_DS_BUSY },
        { "STATUS_MORE_ENTRIES", STATUS_MORE_ENTRIES },
        { "STATUS_SOME_UNMAPPED", STATUS_SOME_UNMAPPED },
        { "STATUS_NOTIFY_CLEANUP", STATUS_NOTIFY_CLEANUP },
@@ -863,7 +865,7 @@ const char *get_friendly_nt_error_msg(NTSTATUS nt_code)
  *****************************************************************************/
 const char *get_nt_error_c_code(NTSTATUS nt_code)
 {
-        static pstring out;
+        static char out[40];
         int idx = 0;
 
        while (nt_errs[idx].nt_errstr != NULL) {