diff options
Diffstat (limited to 'source3')
30 files changed, 155 insertions, 161 deletions
diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c index c5092895bb..cae16ad2e5 100644 --- a/source3/lib/smbconf/smbconf_reg.c +++ b/source3/lib/smbconf/smbconf_reg.c @@ -112,7 +112,7 @@ static WERROR smbconf_reg_open_path(TALLOC_CTX *mem_ctx, if (!W_ERROR_IS_OK(werr)) { DEBUG(5, ("Error opening registry path '%s': %s\n", - path, dos_errstr(werr))); + path, win_errstr(werr))); } done: @@ -212,7 +212,7 @@ static WERROR smbconf_reg_create_service_key(TALLOC_CTX *mem_ctx, } if (!W_ERROR_IS_OK(werr)) { DEBUG(5, ("Error creating key %s: %s\n", - subkeyname, dos_errstr(werr))); + subkeyname, win_errstr(werr))); } done: @@ -283,7 +283,7 @@ static WERROR smbconf_reg_set_value(struct registry_key *key, if (!W_ERROR_IS_OK(werr)) { DEBUG(5, ("Error adding value '%s' to " "key '%s': %s\n", - canon_valname, key->key->name, dos_errstr(werr))); + canon_valname, key->key->name, win_errstr(werr))); } done: @@ -327,7 +327,7 @@ static WERROR smbconf_reg_set_multi_sz_value(struct registry_key *key, werr = reg_setvalue(key, valname, value); if (!W_ERROR_IS_OK(werr)) { DEBUG(5, ("Error adding value '%s' to key '%s': %s\n", - valname, key->key->name, dos_errstr(werr))); + valname, key->key->name, win_errstr(werr))); } done: @@ -585,7 +585,7 @@ static WERROR smbconf_reg_delete_values(struct registry_key *key) DEBUG(1, ("smbconf_reg_delete_values: " "Error enumerating values of %s: %s\n", key->key->name, - dos_errstr(werr))); + win_errstr(werr))); goto done; } diff --git a/source3/lib/smbconf/testsuite.c b/source3/lib/smbconf/testsuite.c index 100fbe8440..edc9a7ffac 100644 --- a/source3/lib/smbconf/testsuite.c +++ b/source3/lib/smbconf/testsuite.c @@ -45,7 +45,7 @@ static bool test_get_includes(struct smbconf_ctx *ctx) werr = smbconf_get_global_includes(ctx, mem_ctx, &num_includes, &includes); if (!W_ERROR_IS_OK(werr)) { - printf("failure: get_includes - %s\n", dos_errstr(werr)); + printf("failure: get_includes - %s\n", win_errstr(werr)); goto done; } @@ -80,7 +80,7 @@ static bool test_set_get_includes(struct smbconf_ctx *ctx) werr = smbconf_set_global_includes(ctx, set_num_includes, set_includes); if (!W_ERROR_IS_OK(werr)) { printf("failure: get_set_includes (setting includes) - %s\n", - dos_errstr(werr)); + win_errstr(werr)); goto done; } @@ -88,7 +88,7 @@ static bool test_set_get_includes(struct smbconf_ctx *ctx) &get_includes); if (!W_ERROR_IS_OK(werr)) { printf("failure: get_set_includes (getting includes) - %s\n", - dos_errstr(werr)); + win_errstr(werr)); goto done; } @@ -135,14 +135,14 @@ static bool test_delete_includes(struct smbconf_ctx *ctx) werr = smbconf_set_global_includes(ctx, set_num_includes, set_includes); if (!W_ERROR_IS_OK(werr)) { printf("failure: delete_includes (setting includes) - %s\n", - dos_errstr(werr)); + win_errstr(werr)); goto done; } werr = smbconf_delete_global_includes(ctx); if (!W_ERROR_IS_OK(werr)) { printf("failure: delete_includes (deleting includes) - %s\n", - dos_errstr(werr)); + win_errstr(werr)); goto done; } @@ -150,7 +150,7 @@ static bool test_delete_includes(struct smbconf_ctx *ctx) &get_includes); if (!W_ERROR_IS_OK(werr)) { printf("failure: delete_includes (getting includes) - %s\n", - dos_errstr(werr)); + win_errstr(werr)); goto done; } @@ -162,7 +162,7 @@ static bool test_delete_includes(struct smbconf_ctx *ctx) werr = smbconf_delete_global_includes(ctx); if (!W_ERROR_IS_OK(werr)) { printf("failuer: delete_includes (delete empty includes) - " - "%s\n", dos_errstr(werr)); + "%s\n", win_errstr(werr)); goto done; } @@ -214,7 +214,7 @@ static bool torture_smbconf_txt(void) printf("test: init\n"); werr = smbconf_init_txt(mem_ctx, &conf_ctx, filename); if (!W_ERROR_IS_OK(werr)) { - printf("failure: init failed: %s\n", dos_errstr(werr)); + printf("failure: init failed: %s\n", win_errstr(werr)); ret = false; goto done; } @@ -251,7 +251,7 @@ static bool torture_smbconf_reg(void) printf("test: init\n"); werr = smbconf_init_reg(mem_ctx, &conf_ctx, NULL); if (!W_ERROR_IS_OK(werr)) { - printf("failure: init failed: %s\n", dos_errstr(werr)); + printf("failure: init failed: %s\n", win_errstr(werr)); ret = false; goto done; } diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c index 9935e2311a..0a42f00b39 100644 --- a/source3/libads/ldap_printer.c +++ b/source3/libads/ldap_printer.c @@ -309,7 +309,7 @@ WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli, &pol); if (!W_ERROR_IS_OK(result)) { DEBUG(3, ("Unable to open printer %s, error is %s.\n", - printername, dos_errstr(result))); + printername, win_errstr(result))); return result; } @@ -320,7 +320,7 @@ WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli, if (!W_ERROR_IS_OK(result)) { DEBUG(3, ("Unable to do enumdataex on %s, error is %s.\n", - printername, dos_errstr(result))); + printername, win_errstr(result))); } else { uint32 num_values = regval_ctr_numvals( dsdriver_ctr ); @@ -337,7 +337,7 @@ WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli, if (!W_ERROR_IS_OK(result)) { DEBUG(3, ("Unable to do enumdataex on %s, error is %s.\n", - printername, dos_errstr(result))); + printername, win_errstr(result))); } else { uint32 num_values = regval_ctr_numvals( dsspooler_ctr ); diff --git a/source3/libgpo/gpext/gpext.c b/source3/libgpo/gpext/gpext.c index 2ae9e2cebf..ee4ce87c4e 100644 --- a/source3/libgpo/gpext/gpext.c +++ b/source3/libgpo/gpext/gpext.c @@ -603,7 +603,7 @@ NTSTATUS init_gp_extensions(TALLOC_CTX *mem_ctx) werr = gp_extension_store_reg(mem_ctx, reg_ctx, info); if (!W_ERROR_IS_OK(werr)) { DEBUG(1,("gp_extension_store_reg failed: %s\n", - dos_errstr(werr))); + win_errstr(werr))); TALLOC_FREE(info); gpext->methods->shutdown(); status = werror_to_ntstatus(werr); diff --git a/source3/libgpo/gpext/registry.c b/source3/libgpo/gpext/registry.c index f501498407..0a0dd9bc0e 100644 --- a/source3/libgpo/gpext/registry.c +++ b/source3/libgpo/gpext/registry.c @@ -502,7 +502,7 @@ static WERROR reg_apply_registry(TALLOC_CTX *mem_ctx, token, flags); if (!W_ERROR_IS_OK(werr)) { DEBUG(0,("failed to apply registry: %s\n", - dos_errstr(werr))); + win_errstr(werr))); goto done; } } @@ -554,7 +554,7 @@ static NTSTATUS registry_process_group_policy(ADS_STRUCT *ads, entries, num_entries); if (!W_ERROR_IS_OK(werr)) { DEBUG(0,("failed to apply registry: %s\n", - dos_errstr(werr))); + win_errstr(werr))); return werror_to_ntstatus(werr); } diff --git a/source3/libgpo/gpext/scripts.c b/source3/libgpo/gpext/scripts.c index 02c3abaa1e..ddea35c644 100644 --- a/source3/libgpo/gpext/scripts.c +++ b/source3/libgpo/gpext/scripts.c @@ -311,7 +311,7 @@ static WERROR scripts_apply(TALLOC_CTX *mem_ctx, token, flags); if (!W_ERROR_IS_OK(werr)) { DEBUG(0,("failed to apply registry: %s\n", - dos_errstr(werr))); + win_errstr(werr))); goto done; } } diff --git a/source3/libgpo/gpo_reg.c b/source3/libgpo/gpo_reg.c index d49315021e..3d385dec14 100644 --- a/source3/libgpo/gpo_reg.c +++ b/source3/libgpo/gpo_reg.c @@ -466,13 +466,13 @@ WERROR gp_reg_state_store(TALLOC_CTX *mem_ctx, werr = gp_secure_key(mem_ctx, flags, reg_ctx->curr_key, &token->user_sids[0]); if (!W_ERROR_IS_OK(werr)) { - DEBUG(0,("failed to secure key: %s\n", dos_errstr(werr))); + DEBUG(0,("failed to secure key: %s\n", win_errstr(werr))); goto done; } werr = gp_reg_store_groupmembership(mem_ctx, reg_ctx, token, flags); if (!W_ERROR_IS_OK(werr)) { - DEBUG(0,("failed to store group membership: %s\n", dos_errstr(werr))); + DEBUG(0,("failed to store group membership: %s\n", win_errstr(werr))); goto done; } @@ -484,7 +484,7 @@ WERROR gp_reg_state_store(TALLOC_CTX *mem_ctx, werr = gp_del_reg_state(mem_ctx, reg_ctx->curr_key, subkeyname); if (!W_ERROR_IS_OK(werr)) { - DEBUG(0,("failed to delete old state: %s\n", dos_errstr(werr))); + DEBUG(0,("failed to delete old state: %s\n", win_errstr(werr))); /* goto done; */ } @@ -534,7 +534,7 @@ WERROR gp_reg_state_store(TALLOC_CTX *mem_ctx, if (!W_ERROR_IS_OK(werr)) { DEBUG(0,("gp_reg_state_store: " "gpo_store_reg_gpovals failed for %s: %s\n", - gpo->display_name, dos_errstr(werr))); + gpo->display_name, win_errstr(werr))); goto done; } } @@ -663,7 +663,7 @@ WERROR gp_reg_state_read(TALLOC_CTX *mem_ctx, if (!W_ERROR_IS_OK(werr)) { DEBUG(0,("gp_reg_state_read: " "gp_read_reg_subkey gave: %s\n", - dos_errstr(werr))); + win_errstr(werr))); goto done; } @@ -941,7 +941,7 @@ WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx, root_key, &key); /* reg_ctx->curr_key, &key); */ if (!W_ERROR_IS_OK(werr)) { - DEBUG(0,("gp_store_reg_subkey failed: %s\n", dos_errstr(werr))); + DEBUG(0,("gp_store_reg_subkey failed: %s\n", win_errstr(werr))); return werr; } @@ -957,7 +957,7 @@ WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx, if (!W_ERROR_IS_OK(werr)) { DEBUG(0,("reg_apply_registry_entry: " "gp_secure_key failed: %s\n", - dos_errstr(werr))); + win_errstr(werr))); return werr; } break; @@ -966,7 +966,7 @@ WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx, if (!W_ERROR_IS_OK(werr)) { DEBUG(0,("reg_apply_registry_entry: " "reg_setvalue failed: %s\n", - dos_errstr(werr))); + win_errstr(werr))); dump_reg_entry(flags, "STORE", entry); return werr; } @@ -976,7 +976,7 @@ WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx, if (!W_ERROR_IS_OK(werr)) { DEBUG(0,("reg_apply_registry_entry: " "reg_deletevalue failed: %s\n", - dos_errstr(werr))); + win_errstr(werr))); dump_reg_entry(flags, "STORE", entry); return werr; } @@ -986,7 +986,7 @@ WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx, if (!W_ERROR_IS_OK(werr)) { DEBUG(0,("reg_apply_registry_entry: " "reg_deleteallvalues failed: %s\n", - dos_errstr(werr))); + win_errstr(werr))); dump_reg_entry(flags, "STORE", entry); return werr; } diff --git a/source3/libsmb/doserr.c b/source3/libsmb/doserr.c index 0cccae1e6a..f2f87dc212 100644 --- a/source3/libsmb/doserr.c +++ b/source3/libsmb/doserr.c @@ -1,18 +1,18 @@ -/* +/* * Unix SMB/CIFS implementation. * DOS error routines * Copyright (C) Tim Potter 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/>. */ @@ -21,17 +21,17 @@ #include "includes.h" -typedef const struct { +struct werror_code_struct { const char *dos_errstr; WERROR werror; -} werror_code_struct; +}; -typedef const struct { +struct werror_str_struct { WERROR werror; const char *friendly_errstr; -} werror_str_struct; +}; -werror_code_struct dos_errs[] = +const struct werror_code_struct dos_errs[] = { { "WERR_OK", WERR_OK }, { "WERR_GENERAL_FAILURE", WERR_GENERAL_FAILURE }, @@ -126,7 +126,7 @@ werror_code_struct dos_errs[] = { NULL, W_ERROR(0) } }; -werror_str_struct dos_err_strs[] = { +const struct werror_str_struct dos_err_strs[] = { { WERR_OK, "Success" }, { WERR_ACCESS_DENIED, "Access is denied" }, { WERR_INVALID_PARAM, "Invalid parameter" }, @@ -159,7 +159,7 @@ werror_str_struct dos_err_strs[] = { Returns a DOS error message. not amazingly helpful, but better than a number. *****************************************************************************/ -const char *dos_errstr(WERROR werror) +const char *win_errstr(WERROR werror) { char *result; int idx = 0; @@ -192,11 +192,5 @@ const char *get_friendly_werror_msg(WERROR werror) } } - return dos_errstr(werror); -} - -/* compat function for samba4 */ -const char *win_errstr(WERROR werror) -{ - return dos_errstr(werror); + return win_errstr(werror); } diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 800a47c343..84f6fb907a 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -6569,7 +6569,7 @@ static struct smbconf_ctx *lp_smbconf_ctx(void) werr = smbconf_init(NULL, &conf_ctx, "registry:"); if (!W_ERROR_IS_OK(werr)) { DEBUG(1, ("error initializing registry configuration: " - "%s\n", dos_errstr(werr))); + "%s\n", win_errstr(werr))); conf_ctx = NULL; } } diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 9c1323eaa2..1a2e324201 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -659,7 +659,7 @@ bool nt_printing_init(struct messaging_context *msg_ctx) if ( lp_security() == SEC_ADS ) { win_rc = check_published_printers(); if (!W_ERROR_IS_OK(win_rc)) - DEBUG(0, ("nt_printing_init: error checking published printers: %s\n", dos_errstr(win_rc))); + DEBUG(0, ("nt_printing_init: error checking published printers: %s\n", win_errstr(win_rc))); } return True; @@ -4749,7 +4749,7 @@ static WERROR get_a_printer_internal( Printer_entry *print_hnd, NT_PRINTER_INFO_ if ( !W_ERROR_IS_OK(result) ) { TALLOC_FREE( *pp_printer ); DEBUG(10,("get_a_printer: [%s] level %u returning %s\n", - sharename, (unsigned int)level, dos_errstr(result))); + sharename, (unsigned int)level, win_errstr(result))); return result; } diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c index e9a7145255..30ad3d9751 100644 --- a/source3/registry/reg_api.c +++ b/source3/registry/reg_api.c @@ -1117,7 +1117,7 @@ static WERROR reg_deletekey_recursive_internal(TALLOC_CTX *ctx, if (!W_ERROR_EQUAL(WERR_NO_MORE_ITEMS, werr)) { DEBUG(1, ("reg_deletekey_recursive_internal: " "Error enumerating subkeys: %s\n", - dos_errstr(werr))); + win_errstr(werr))); goto done; } diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 6f4c614b9a..a9bb7b1730 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -963,7 +963,7 @@ int regdb_fetch_keys(const char *key, REGSUBKEY_CTR *ctr) werr = regsubkey_ctr_addkey(ctr, subkeyname); if (!W_ERROR_IS_OK(werr)) { DEBUG(5, ("regdb_fetch_keys: regsubkey_ctr_addkey " - "failed: %s\n", dos_errstr(werr))); + "failed: %s\n", win_errstr(werr))); goto done; } } diff --git a/source3/registry/reg_init_basic.c b/source3/registry/reg_init_basic.c index c5e2c346b0..60dcabdcf2 100644 --- a/source3/registry/reg_init_basic.c +++ b/source3/registry/reg_init_basic.c @@ -29,14 +29,14 @@ WERROR registry_init_common(void) werr = regdb_init(); if (!W_ERROR_IS_OK(werr)) { DEBUG(0, ("Failed to initialize the registry: %s\n", - dos_errstr(werr))); + win_errstr(werr))); goto done; } werr = reghook_cache_init(); if (!W_ERROR_IS_OK(werr)) { DEBUG(0, ("Failed to initialize the reghook cache: %s\n", - dos_errstr(werr))); + win_errstr(werr))); } done: diff --git a/source3/registry/reg_init_smbconf.c b/source3/registry/reg_init_smbconf.c index 43a5be025d..7ba53cd367 100644 --- a/source3/registry/reg_init_smbconf.c +++ b/source3/registry/reg_init_smbconf.c @@ -87,14 +87,14 @@ WERROR registry_init_smbconf(const char *keyname) werr = init_registry_key(keyname); if (!W_ERROR_IS_OK(werr)) { DEBUG(1, ("Failed to initialize registry key '%s': %s\n", - keyname, dos_errstr(werr))); + keyname, win_errstr(werr))); goto done; } werr = reghook_cache_add(keyname, &smbconf_reg_ops); if (!W_ERROR_IS_OK(werr)) { DEBUG(1, ("Failed to add smbconf reghooks to reghook cache: " - "%s\n", dos_errstr(werr))); + "%s\n", win_errstr(werr))); goto done; } diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c index 504cebbb9d..a0d3ed7397 100644 --- a/source3/rpc_parse/parse_prs.c +++ b/source3/rpc_parse/parse_prs.c @@ -843,7 +843,7 @@ bool prs_werror(const char *name, prs_struct *ps, int depth, WERROR *status) } DEBUG(5,("%s%04x %s: %s\n", tab_depth(5,depth), ps->data_offset, name, - dos_errstr(*status))); + win_errstr(*status))); ps->data_offset += sizeof(uint32); diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c index e56a2e9095..3c7469f3ef 100644 --- a/source3/rpc_server/srv_eventlog_nt.c +++ b/source3/rpc_server/srv_eventlog_nt.c @@ -456,14 +456,14 @@ static bool sync_eventlog_params( EVENTLOG_INFO *info ) if ( !W_ERROR_IS_OK( wresult ) ) { DEBUG( 4, ( "sync_eventlog_params: Failed to open key [%s] (%s)\n", - path, dos_errstr( wresult ) ) ); + path, win_errstr( wresult ) ) ); return false; } wresult = reg_queryvalue(key, key, "Retention", &value); if (!W_ERROR_IS_OK(wresult)) { DEBUG(4, ("Failed to query value \"Retention\": %s\n", - dos_errstr(wresult))); + win_errstr(wresult))); ret = false; goto done; } @@ -472,7 +472,7 @@ static bool sync_eventlog_params( EVENTLOG_INFO *info ) wresult = reg_queryvalue(key, key, "MaxSize", &value); if (!W_ERROR_IS_OK(wresult)) { DEBUG(4, ("Failed to query value \"MaxSize\": %s\n", - dos_errstr(wresult))); + win_errstr(wresult))); ret = false; goto done; } diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index cafe9fc9af..577f7f1ded 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -171,7 +171,7 @@ static void srv_spoolss_replycloseprinter(int snum, POLICY_HND *handle) if (!W_ERROR_IS_OK(result)) DEBUG(0,("srv_spoolss_replycloseprinter: reply_close_printer failed [%s].\n", - dos_errstr(result))); + win_errstr(result))); /* if it's the last connection, deconnect the IPC$ share */ if (smb_connections==1) { @@ -541,7 +541,7 @@ static bool set_printer_hnd_name(Printer_entry *Printer, char *handlename) result = get_a_printer_search( NULL, &printer, 2, sname ); if ( !W_ERROR_IS_OK(result) ) { DEBUG(0,("set_printer_hnd_name: failed to lookup printer [%s] -- result [%s]\n", - sname, dos_errstr(result))); + sname, win_errstr(result))); continue; } @@ -1284,7 +1284,7 @@ void do_drv_upgrade_printer(struct messaging_context *msg, result = mod_a_printer(printer, 2); if (!W_ERROR_IS_OK(result)) { DEBUG(3,("do_drv_upgrade_printer: mod_a_printer() failed with status [%s]\n", - dos_errstr(result))); + win_errstr(result))); } } @@ -2677,7 +2677,7 @@ static bool srv_spoolss_replyopenprinter(int snum, const char *printer, if (!W_ERROR_IS_OK(result)) DEBUG(5,("srv_spoolss_reply_open_printer: Client RPC returned [%s]\n", - dos_errstr(result))); + win_errstr(result))); return (W_ERROR_IS_OK(result)); } @@ -5376,12 +5376,12 @@ static WERROR construct_printer_driver_info_3(DRIVER_INFO_3 *info, int snum, con ZERO_STRUCT(driver); status=get_a_printer(NULL, &printer, 2, lp_const_servicename(snum) ); - DEBUG(8,("construct_printer_driver_info_3: status: %s\n", dos_errstr(status))); + DEBUG(8,("construct_printer_driver_info_3: status: %s\n", win_errstr(status))); if (!W_ERROR_IS_OK(status)) return WERR_INVALID_PRINTER_NAME; status=get_a_printer_driver(&driver, 3, printer->info_2->drivername, architecture, version); - DEBUG(8,("construct_printer_driver_info_3: status: %s\n", dos_errstr(status))); + DEBUG(8,("construct_printer_driver_info_3: status: %s\n", win_errstr(status))); #if 0 /* JERRY */ @@ -5401,7 +5401,7 @@ static WERROR construct_printer_driver_info_3(DRIVER_INFO_3 *info, int snum, con /* Yes - try again with a WinNT driver. */ version = 2; status=get_a_printer_driver(&driver, 3, printer->info_2->drivername, architecture, version); - DEBUG(8,("construct_printer_driver_info_3: status: %s\n", dos_errstr(status))); + DEBUG(8,("construct_printer_driver_info_3: status: %s\n", win_errstr(status))); } #endif @@ -5519,14 +5519,14 @@ static WERROR construct_printer_driver_info_6(DRIVER_INFO_6 *info, int snum, status=get_a_printer(NULL, &printer, 2, lp_const_servicename(snum) ); - DEBUG(8,("construct_printer_driver_info_6: status: %s\n", dos_errstr(status))); + DEBUG(8,("construct_printer_driver_info_6: status: %s\n", win_errstr(status))); if (!W_ERROR_IS_OK(status)) return WERR_INVALID_PRINTER_NAME; status = get_a_printer_driver(&driver, 3, printer->info_2->drivername, architecture, version); - DEBUG(8,("construct_printer_driver_info_6: status: %s\n", dos_errstr(status))); + DEBUG(8,("construct_printer_driver_info_6: status: %s\n", win_errstr(status))); if (!W_ERROR_IS_OK(status)) { @@ -5542,7 +5542,7 @@ static WERROR construct_printer_driver_info_6(DRIVER_INFO_6 *info, int snum, /* Yes - try again with a WinNT driver. */ version = 2; status=get_a_printer_driver(&driver, 3, printer->info_2->drivername, architecture, version); - DEBUG(8,("construct_printer_driver_info_6: status: %s\n", dos_errstr(status))); + DEBUG(8,("construct_printer_driver_info_6: status: %s\n", win_errstr(status))); if (!W_ERROR_IS_OK(status)) { free_a_printer(&printer,2); return WERR_UNKNOWN_PRINTER_DRIVER; @@ -7544,7 +7544,7 @@ static WERROR enumports_level_1(RPC_BUFFER *buffer, uint32 offered, uint32 *need if(numlines) { if((ports=SMB_MALLOC_ARRAY( PORT_INFO_1, numlines )) == NULL) { DEBUG(10,("Returning WERR_NOMEM [%s]\n", - dos_errstr(WERR_NOMEM))); + win_errstr(WERR_NOMEM))); TALLOC_FREE(qlines); return WERR_NOMEM; } diff --git a/source3/rpc_server/srv_wkssvc_nt.c b/source3/rpc_server/srv_wkssvc_nt.c index c96439cc1a..0a54b0dd3f 100644 --- a/source3/rpc_server/srv_wkssvc_nt.c +++ b/source3/rpc_server/srv_wkssvc_nt.c @@ -349,7 +349,7 @@ WERROR _wkssvc_NetrJoinDomain2(pipes_struct *p, if (!W_ERROR_IS_OK(werr)) { DEBUG(5,("_wkssvc_NetrJoinDomain2: libnet_Join failed with: %s\n", j->out.error_string ? j->out.error_string : - dos_errstr(werr))); + win_errstr(werr))); } TALLOC_FREE(j); @@ -415,7 +415,7 @@ WERROR _wkssvc_NetrUnjoinDomain2(pipes_struct *p, if (!W_ERROR_IS_OK(werr)) { DEBUG(5,("_wkssvc_NetrUnjoinDomain2: libnet_Unjoin failed with: %s\n", u->out.error_string ? u->out.error_string : - dos_errstr(werr))); + win_errstr(werr))); } TALLOC_FREE(u); diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c index 6efa316cf4..9e3f35545c 100644 --- a/source3/rpcclient/cmd_netlogon.c +++ b/source3/rpcclient/cmd_netlogon.c @@ -221,7 +221,7 @@ static WERROR cmd_netlogon_dsr_getdcname(struct rpc_pipe_client *cli, } printf("rpccli_netlogon_dsr_getdcname returned %s\n", - dos_errstr(werr)); + win_errstr(werr)); return werr; } diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 378ec891a7..26a73203b9 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -1539,7 +1539,7 @@ static WERROR cmd_spoolss_deletedriverex(struct rpc_pipe_client *cli, { if ( !W_ERROR_EQUAL(result, WERR_UNKNOWN_PRINTER_DRIVER) ) { printf ("Failed to remove driver %s for arch [%s] (version: %d): %s\n", - argv[1], archi_table[i].long_archi, archi_table[i].version, dos_errstr(result)); + argv[1], archi_table[i].long_archi, archi_table[i].version, win_errstr(result)); } } else @@ -2555,7 +2555,7 @@ static bool compare_printer( struct rpc_pipe_client *cli1, POLICY_HND *hnd1, printf("Retrieving printer propertiesfor %s...", cli1->desthost); werror = rpccli_spoolss_getprinter( cli1, mem_ctx, hnd1, 2, &ctr1); if ( !W_ERROR_IS_OK(werror) ) { - printf("failed (%s)\n", dos_errstr(werror)); + printf("failed (%s)\n", win_errstr(werror)); talloc_destroy(mem_ctx); return False; } @@ -2564,7 +2564,7 @@ static bool compare_printer( struct rpc_pipe_client *cli1, POLICY_HND *hnd1, printf("Retrieving printer properties for %s...", cli2->desthost); werror = rpccli_spoolss_getprinter( cli2, mem_ctx, hnd2, 2, &ctr2); if ( !W_ERROR_IS_OK(werror) ) { - printf("failed (%s)\n", dos_errstr(werror)); + printf("failed (%s)\n", win_errstr(werror)); talloc_destroy(mem_ctx); return False; } @@ -2591,7 +2591,7 @@ static bool compare_printer_secdesc( struct rpc_pipe_client *cli1, POLICY_HND *h printf("Retrieving printer security for %s...", cli1->desthost); werror = rpccli_spoolss_getprinter( cli1, mem_ctx, hnd1, 3, &ctr1); if ( !W_ERROR_IS_OK(werror) ) { - printf("failed (%s)\n", dos_errstr(werror)); + printf("failed (%s)\n", win_errstr(werror)); result = False; goto done; } @@ -2600,7 +2600,7 @@ static bool compare_printer_secdesc( struct rpc_pipe_client *cli1, POLICY_HND *h printf("Retrieving printer security for %s...", cli2->desthost); werror = rpccli_spoolss_getprinter( cli2, mem_ctx, hnd2, 3, &ctr2); if ( !W_ERROR_IS_OK(werror) ) { - printf("failed (%s)\n", dos_errstr(werror)); + printf("failed (%s)\n", win_errstr(werror)); result = False; goto done; } @@ -2701,7 +2701,7 @@ static WERROR cmd_spoolss_printercmp(struct rpc_pipe_client *cli, werror = rpccli_spoolss_open_printer_ex( cli, mem_ctx, printername_path, "", PRINTER_ALL_ACCESS, servername1, cli_server1->user_name, &hPrinter1); if ( !W_ERROR_IS_OK(werror) ) { - printf("failed (%s)\n", dos_errstr(werror)); + printf("failed (%s)\n", win_errstr(werror)); goto done; } printf("ok\n"); @@ -2717,7 +2717,7 @@ static WERROR cmd_spoolss_printercmp(struct rpc_pipe_client *cli, werror = rpccli_spoolss_open_printer_ex( cli2, mem_ctx, printername_path, "", PRINTER_ALL_ACCESS, servername2, cli_server2->user_name, &hPrinter2 ); if ( !W_ERROR_IS_OK(werror) ) { - printf("failed (%s)\n", dos_errstr(werror)); + printf("failed (%s)\n", win_errstr(werror)); goto done; } printf("ok\n"); diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index e4cdd9c3f3..61d8d7c485 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -669,7 +669,7 @@ static NTSTATUS do_cmd(struct cli_state *cli, wresult = cmd_entry->wfn(cmd_entry->rpc_pipe, mem_ctx, argc, (const char **) argv); /* print out the DOS error */ if (!W_ERROR_IS_OK(wresult)) { - printf( "result was %s\n", dos_errstr(wresult)); + printf( "result was %s\n", win_errstr(wresult)); } ntresult = W_ERROR_IS_OK(wresult)?NT_STATUS_OK:NT_STATUS_UNSUCCESSFUL; } diff --git a/source3/services/services_db.c b/source3/services/services_db.c index 0f5264bcd8..dbd2da1c65 100644 --- a/source3/services/services_db.c +++ b/source3/services/services_db.c @@ -358,7 +358,7 @@ static void add_new_svc_name( REGISTRY_KEY *key_parent, REGSUBKEY_CTR *subkeys, get_root_nt_token(), REG_KEY_ALL ); if ( !W_ERROR_IS_OK(wresult) ) { DEBUG(0,("add_new_svc_name: key lookup failed! [%s] (%s)\n", - path, dos_errstr(wresult))); + path, win_errstr(wresult))); SAFE_FREE(path); return; } @@ -400,7 +400,7 @@ static void add_new_svc_name( REGISTRY_KEY *key_parent, REGSUBKEY_CTR *subkeys, get_root_nt_token(), REG_KEY_ALL ); if ( !W_ERROR_IS_OK(wresult) ) { DEBUG(0,("add_new_svc_name: key lookup failed! [%s] (%s)\n", - path, dos_errstr(wresult))); + path, win_errstr(wresult))); TALLOC_FREE( key_secdesc ); SAFE_FREE(path); return; @@ -455,7 +455,7 @@ void svcctl_init_keys( void ) if ( !W_ERROR_IS_OK(wresult) ) { DEBUG(0,("svcctl_init_keys: key lookup failed! (%s)\n", - dos_errstr(wresult))); + win_errstr(wresult))); return; } @@ -519,7 +519,7 @@ SEC_DESC *svcctl_get_secdesc( TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN * REG_KEY_ALL ); if ( !W_ERROR_IS_OK(wresult) ) { DEBUG(0,("svcctl_get_secdesc: key lookup failed! [%s] (%s)\n", - path, dos_errstr(wresult))); + path, win_errstr(wresult))); goto done; } @@ -579,7 +579,7 @@ bool svcctl_set_secdesc( TALLOC_CTX *ctx, const char *name, SEC_DESC *sec_desc, REG_KEY_ALL ); if ( !W_ERROR_IS_OK(wresult) ) { DEBUG(0,("svcctl_get_secdesc: key lookup failed! [%s] (%s)\n", - path, dos_errstr(wresult))); + path, win_errstr(wresult))); SAFE_FREE(path); return False; } @@ -634,7 +634,7 @@ const char *svcctl_lookup_dispname(TALLOC_CTX *ctx, const char *name, NT_USER_TO REG_KEY_READ ); if ( !W_ERROR_IS_OK(wresult) ) { DEBUG(0,("svcctl_lookup_dispname: key lookup failed! [%s] (%s)\n", - path, dos_errstr(wresult))); + path, win_errstr(wresult))); SAFE_FREE(path); goto fail; } @@ -684,7 +684,7 @@ const char *svcctl_lookup_description(TALLOC_CTX *ctx, const char *name, NT_USER REG_KEY_READ ); if ( !W_ERROR_IS_OK(wresult) ) { DEBUG(0,("svcctl_lookup_description: key lookup failed! [%s] (%s)\n", - path, dos_errstr(wresult))); + path, win_errstr(wresult))); SAFE_FREE(path); return NULL; } @@ -728,7 +728,7 @@ REGVAL_CTR *svcctl_fetch_regvalues( const char *name, NT_USER_TOKEN *token ) REG_KEY_READ ); if ( !W_ERROR_IS_OK(wresult) ) { DEBUG(0,("svcctl_fetch_regvalues: key lookup failed! [%s] (%s)\n", - path, dos_errstr(wresult))); + path, win_errstr(wresult))); SAFE_FREE(path); return NULL; } diff --git a/source3/utils/net_ads_gpo.c b/source3/utils/net_ads_gpo.c index 3c66325abe..181cba221d 100644 --- a/source3/utils/net_ads_gpo.c +++ b/source3/utils/net_ads_gpo.c @@ -107,7 +107,7 @@ static int net_ads_gpo_refresh(struct net_context *c, int argc, const char **arg WERROR werr = gp_reg_state_store(mem_ctx, flags, dn, token, gpo_list); if (!W_ERROR_IS_OK(werr)) { - d_printf("failed: %s\n", dos_errstr(werr)); + d_printf("failed: %s\n", win_errstr(werr)); goto out; } } @@ -152,7 +152,7 @@ static int net_ads_gpo_refresh(struct net_context *c, int argc, const char **arg &token->user_sids[0], &read_list); if (!W_ERROR_IS_OK(werr)) { - d_printf("failed: %s\n", dos_errstr(werr)); + d_printf("failed: %s\n", win_errstr(werr)); goto out; } } diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c index ab1b0f3df7..31e87ca804 100644 --- a/source3/utils/net_conf.c +++ b/source3/utils/net_conf.c @@ -249,7 +249,7 @@ static int net_conf_list(struct net_context *c, struct smbconf_ctx *conf_ctx, werr = smbconf_get_config(conf_ctx, mem_ctx, &num_shares, &shares); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "Error getting config: %s\n", - dos_errstr(werr)); + win_errstr(werr)); goto done; } @@ -322,7 +322,7 @@ static int net_conf_import(struct net_context *c, struct smbconf_ctx *conf_ctx, werr = smbconf_init(mem_ctx, &txt_ctx, conf_source); if (!W_ERROR_IS_OK(werr)) { d_printf("error loading file '%s': %s\n", filename, - dos_errstr(werr)); + win_errstr(werr)); goto done; } @@ -425,7 +425,7 @@ static int net_conf_drop(struct net_context *c, struct smbconf_ctx *conf_ctx, werr = smbconf_drop(conf_ctx); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "Error deleting configuration: %s\n", - dos_errstr(werr)); + win_errstr(werr)); goto done; } @@ -462,7 +462,7 @@ static int net_conf_showshare(struct net_context *c, werr = smbconf_get_share(conf_ctx, mem_ctx, sharename, &service); if (!W_ERROR_IS_OK(werr)) { d_printf("error getting share parameters: %s\n", - dos_errstr(werr)); + win_errstr(werr)); goto done; } @@ -626,7 +626,7 @@ static int net_conf_addshare(struct net_context *c, werr = smbconf_create_share(conf_ctx, sharename); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "Error creating share %s: %s\n", - sharename, dos_errstr(werr)); + sharename, win_errstr(werr)); goto done; } @@ -637,7 +637,7 @@ static int net_conf_addshare(struct net_context *c, werr = smbconf_set_parameter(conf_ctx, sharename, "path", path); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "Error setting parameter %s: %s\n", - "path", dos_errstr(werr)); + "path", win_errstr(werr)); goto done; } @@ -646,7 +646,7 @@ static int net_conf_addshare(struct net_context *c, comment); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "Error setting parameter %s: %s\n", - "comment", dos_errstr(werr)); + "comment", win_errstr(werr)); goto done; } } @@ -654,7 +654,7 @@ static int net_conf_addshare(struct net_context *c, werr = smbconf_set_parameter(conf_ctx, sharename, "guest ok", guest_ok); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "Error setting parameter %s: %s\n", - "'guest ok'", dos_errstr(werr)); + "'guest ok'", win_errstr(werr)); goto done; } @@ -662,7 +662,7 @@ static int net_conf_addshare(struct net_context *c, writeable); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "Error setting parameter %s: %s\n", - "writeable", dos_errstr(werr)); + "writeable", win_errstr(werr)); goto done; } @@ -695,7 +695,7 @@ static int net_conf_delshare(struct net_context *c, werr = smbconf_delete_share(conf_ctx, sharename); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "Error deleting share %s: %s\n", - sharename, dos_errstr(werr)); + sharename, win_errstr(werr)); goto done; } @@ -735,7 +735,7 @@ static int net_conf_setparm(struct net_context *c, struct smbconf_ctx *conf_ctx, werr = smbconf_create_share(conf_ctx, service); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "Error creating share '%s': %s\n", - service, dos_errstr(werr)); + service, win_errstr(werr)); goto done; } } @@ -744,7 +744,7 @@ static int net_conf_setparm(struct net_context *c, struct smbconf_ctx *conf_ctx, if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "Error setting value '%s': %s\n", - param, dos_errstr(werr)); + param, win_errstr(werr)); goto done; } @@ -796,7 +796,7 @@ static int net_conf_getparm(struct net_context *c, struct smbconf_ctx *conf_ctx, goto done; } else if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "Error getting value '%s': %s.\n", - param, dos_errstr(werr)); + param, win_errstr(werr)); goto done; } @@ -846,7 +846,7 @@ static int net_conf_delparm(struct net_context *c, struct smbconf_ctx *conf_ctx, goto done; } else if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "Error deleting value '%s': %s.\n", - param, dos_errstr(werr)); + param, win_errstr(werr)); goto done; } @@ -883,7 +883,7 @@ static int net_conf_getincludes(struct net_context *c, werr = smbconf_get_includes(conf_ctx, mem_ctx, service, &num_includes, &includes); if (!W_ERROR_IS_OK(werr)) { - d_printf("error getting includes: %s\n", dos_errstr(werr)); + d_printf("error getting includes: %s\n", win_errstr(werr)); goto done; } @@ -929,7 +929,7 @@ static int net_conf_setincludes(struct net_context *c, werr = smbconf_set_includes(conf_ctx, service, num_includes, includes); if (!W_ERROR_IS_OK(werr)) { - d_printf("error setting includes: %s\n", dos_errstr(werr)); + d_printf("error setting includes: %s\n", win_errstr(werr)); goto done; } @@ -962,7 +962,7 @@ static int net_conf_delincludes(struct net_context *c, werr = smbconf_delete_includes(conf_ctx, service); if (!W_ERROR_IS_OK(werr)) { - d_printf("error deleting includes: %s\n", dos_errstr(werr)); + d_printf("error deleting includes: %s\n", win_errstr(werr)); goto done; } diff --git a/source3/utils/net_registry.c b/source3/utils/net_registry.c index 26710b3580..64a0d8ac40 100644 --- a/source3/utils/net_registry.c +++ b/source3/utils/net_registry.c @@ -91,14 +91,14 @@ static WERROR open_key(TALLOC_CTX *ctx, const char *path, werr = open_hive(tmp_ctx, path, desired_access, &hive, &subkey_name); if (!W_ERROR_IS_OK(werr)) { - d_fprintf(stderr, "open_hive failed: %s\n", dos_errstr(werr)); + d_fprintf(stderr, "open_hive failed: %s\n", win_errstr(werr)); goto done; } werr = reg_openkey(ctx, hive, subkey_name, desired_access, key); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "reg_openkey failed: %s\n", - dos_errstr(werr)); + win_errstr(werr)); goto done; } @@ -137,7 +137,7 @@ static int net_registry_enumerate(struct net_context *c, int argc, werr = open_key(ctx, argv[0], REG_KEY_READ, &key); if (!W_ERROR_IS_OK(werr)) { - d_fprintf(stderr, "open_key failed: %s\n", dos_errstr(werr)); + d_fprintf(stderr, "open_key failed: %s\n", win_errstr(werr)); goto done; } @@ -193,7 +193,7 @@ static int net_registry_createkey(struct net_context *c, int argc, werr = open_hive(ctx, argv[0], REG_KEY_WRITE, &hivekey, &subkeyname); if (!W_ERROR_IS_OK(werr)) { - d_fprintf(stderr, "open_hive failed: %s\n", dos_errstr(werr)); + d_fprintf(stderr, "open_hive failed: %s\n", win_errstr(werr)); goto done; } @@ -201,7 +201,7 @@ static int net_registry_createkey(struct net_context *c, int argc, &subkey, &action); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "reg_createkey failed: %s\n", - dos_errstr(werr)); + win_errstr(werr)); goto done; } switch (action) { @@ -245,14 +245,14 @@ static int net_registry_deletekey(struct net_context *c, int argc, werr = open_hive(ctx, argv[0], REG_KEY_WRITE, &hivekey, &subkeyname); if (!W_ERROR_IS_OK(werr)) { - d_fprintf(stderr, "open_hive failed: %s\n", dos_errstr(werr)); + d_fprintf(stderr, "open_hive failed: %s\n", win_errstr(werr)); goto done; } werr = reg_deletekey(hivekey, subkeyname); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "reg_deletekey failed: %s\n", - dos_errstr(werr)); + win_errstr(werr)); goto done; } @@ -280,14 +280,14 @@ static int net_registry_getvalue_internal(struct net_context *c, int argc, werr = open_key(ctx, argv[0], REG_KEY_READ, &key); if (!W_ERROR_IS_OK(werr)) { - d_fprintf(stderr, "open_key failed: %s\n", dos_errstr(werr)); + d_fprintf(stderr, "open_key failed: %s\n", win_errstr(werr)); goto done; } werr = reg_queryvalue(ctx, key, argv[1], &value); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "reg_queryvalue failed: %s\n", - dos_errstr(werr)); + win_errstr(werr)); goto done; } @@ -346,14 +346,14 @@ static int net_registry_setvalue(struct net_context *c, int argc, werr = open_key(ctx, argv[0], REG_KEY_WRITE, &key); if (!W_ERROR_IS_OK(werr)) { - d_fprintf(stderr, "open_key failed: %s\n", dos_errstr(werr)); + d_fprintf(stderr, "open_key failed: %s\n", win_errstr(werr)); goto done; } werr = reg_setvalue(key, argv[1], &value); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "reg_setvalue failed: %s\n", - dos_errstr(werr)); + win_errstr(werr)); goto done; } @@ -380,14 +380,14 @@ static int net_registry_deletevalue(struct net_context *c, int argc, werr = open_key(ctx, argv[0], REG_KEY_WRITE, &key); if (!W_ERROR_IS_OK(werr)) { - d_fprintf(stderr, "open_key failed: %s\n", dos_errstr(werr)); + d_fprintf(stderr, "open_key failed: %s\n", win_errstr(werr)); goto done; } werr = reg_deletevalue(key, argv[1]); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "reg_deletekey failed: %s\n", - dos_errstr(werr)); + win_errstr(werr)); goto done; } @@ -429,14 +429,14 @@ static int net_registry_getsd(struct net_context *c, int argc, werr = open_key(ctx, argv[0], access_mask, &key); if (!W_ERROR_IS_OK(werr)) { - d_fprintf(stderr, "open_key failed: %s\n", dos_errstr(werr)); + d_fprintf(stderr, "open_key failed: %s\n", win_errstr(werr)); goto done; } werr = reg_getkeysecurity(ctx, key, &secdesc); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "reg_getkeysecurity failed: %s\n", - dos_errstr(werr)); + win_errstr(werr)); goto done; } diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index d3b10019d4..10f2a324a3 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -3133,7 +3133,7 @@ static NTSTATUS rpc_share_migrate_shares_internals(struct net_context *c, } if (!NT_STATUS_IS_OK(nt_status) || !W_ERROR_IS_OK(result)) { - printf("cannot add share: %s\n", dos_errstr(result)); + printf("cannot add share: %s\n", win_errstr(result)); goto done; } @@ -3580,7 +3580,7 @@ static NTSTATUS rpc_share_migrate_security_internals(struct net_context *c, &parm_error, &result); if (!NT_STATUS_IS_OK(nt_status) || !W_ERROR_IS_OK(result)) { - printf("cannot set share-acl: %s\n", dos_errstr(result)); + printf("cannot set share-acl: %s\n", win_errstr(result)); goto done; } @@ -5075,7 +5075,7 @@ NTSTATUS rpc_reg_shutdown_internals(struct net_context *c, if ( W_ERROR_EQUAL(werr, WERR_MACHINE_LOCKED) ) d_fprintf(stderr, "\nMachine locked, use -f switch to force\n"); else - d_fprintf(stderr, "\nresult was: %s\n", dos_errstr(werr)); + d_fprintf(stderr, "\nresult was: %s\n", win_errstr(werr)); } return result; diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index ddd18a7b9f..c750e46b67 100644 --- a/source3/utils/net_rpc_printer.c +++ b/source3/utils/net_rpc_printer.c @@ -711,7 +711,7 @@ static bool net_spoolss_enum_printers(struct rpc_pipe_client *pipe_hnd, level, num_printers, ctr); if (!W_ERROR_IS_OK(result)) { - printf("cannot enum printers: %s\n", dos_errstr(result)); + printf("cannot enum printers: %s\n", win_errstr(result)); return false; } @@ -752,7 +752,7 @@ static bool net_spoolss_open_printer_ex(struct rpc_pipe_client *pipe_hnd, if (!W_ERROR_IS_OK(result)) { d_fprintf(stderr, "cannot open printer %s on server %s: %s\n", - printername2, servername, dos_errstr(result)); + printername2, servername, win_errstr(result)); return false; } @@ -774,7 +774,7 @@ static bool net_spoolss_getprinter(struct rpc_pipe_client *pipe_hnd, result = rpccli_spoolss_getprinter(pipe_hnd, mem_ctx, hnd, level, ctr); if (!W_ERROR_IS_OK(result)) { - printf("cannot get printer-info: %s\n", dos_errstr(result)); + printf("cannot get printer-info: %s\n", win_errstr(result)); return false; } @@ -793,7 +793,7 @@ static bool net_spoolss_setprinter(struct rpc_pipe_client *pipe_hnd, result = rpccli_spoolss_setprinter(pipe_hnd, mem_ctx, hnd, level, ctr, 0); if (!W_ERROR_IS_OK(result)) { - printf("cannot set printer-info: %s\n", dos_errstr(result)); + printf("cannot set printer-info: %s\n", win_errstr(result)); return false; } @@ -812,7 +812,7 @@ static bool net_spoolss_setprinterdata(struct rpc_pipe_client *pipe_hnd, result = rpccli_spoolss_setprinterdata(pipe_hnd, mem_ctx, hnd, value); if (!W_ERROR_IS_OK(result)) { - printf ("unable to set printerdata: %s\n", dos_errstr(result)); + printf ("unable to set printerdata: %s\n", win_errstr(result)); return false; } @@ -832,7 +832,7 @@ static bool net_spoolss_enumprinterkey(struct rpc_pipe_client *pipe_hnd, result = rpccli_spoolss_enumprinterkey(pipe_hnd, mem_ctx, hnd, keyname, keylist, NULL); if (!W_ERROR_IS_OK(result)) { - printf("enumprinterkey failed: %s\n", dos_errstr(result)); + printf("enumprinterkey failed: %s\n", win_errstr(result)); return false; } @@ -852,7 +852,7 @@ static bool net_spoolss_enumprinterdataex(struct rpc_pipe_client *pipe_hnd, result = rpccli_spoolss_enumprinterdataex(pipe_hnd, mem_ctx, hnd, keyname, ctr); if (!W_ERROR_IS_OK(result)) { - printf("enumprinterdataex failed: %s\n", dos_errstr(result)); + printf("enumprinterdataex failed: %s\n", win_errstr(result)); return false; } @@ -873,7 +873,7 @@ static bool net_spoolss_setprinterdataex(struct rpc_pipe_client *pipe_hnd, keyname, value); if (!W_ERROR_IS_OK(result)) { - printf("could not set printerdataex: %s\n", dos_errstr(result)); + printf("could not set printerdataex: %s\n", win_errstr(result)); return false; } @@ -893,7 +893,7 @@ static bool net_spoolss_enumforms(struct rpc_pipe_client *pipe_hnd, result = rpccli_spoolss_enumforms(pipe_hnd, mem_ctx, hnd, level, num_forms, forms); if (!W_ERROR_IS_OK(result)) { - printf("could not enum forms: %s\n", dos_errstr(result)); + printf("could not enum forms: %s\n", win_errstr(result)); return false; } @@ -914,7 +914,7 @@ static bool net_spoolss_enumprinterdrivers (struct rpc_pipe_client *pipe_hnd, env, num_drivers, ctr); if (!W_ERROR_IS_OK(result)) { - printf("cannot enum drivers: %s\n", dos_errstr(result)); + printf("cannot enum drivers: %s\n", win_errstr(result)); return false; } @@ -936,10 +936,10 @@ static bool net_spoolss_getprinterdriver(struct rpc_pipe_client *pipe_hnd, if (!W_ERROR_IS_OK(result)) { DEBUG(1,("cannot get driver (for architecture: %s): %s\n", - env, dos_errstr(result))); + env, win_errstr(result))); if (W_ERROR_V(result) != W_ERROR_V(WERR_UNKNOWN_PRINTER_DRIVER) && W_ERROR_V(result) != W_ERROR_V(WERR_INVALID_ENVIRONMENT)) { - printf("cannot get driver: %s\n", dos_errstr(result)); + printf("cannot get driver: %s\n", win_errstr(result)); } return false; } @@ -963,7 +963,7 @@ static bool net_spoolss_addprinterdriver(struct rpc_pipe_client *pipe_hnd, return false; } if (!W_ERROR_IS_OK(result)) { - printf("cannot add driver: %s\n", dos_errstr(result)); + printf("cannot add driver: %s\n", win_errstr(result)); return false; } @@ -1231,7 +1231,7 @@ static NTSTATUS rpc_printer_publish_internals_args(struct rpc_pipe_client *pipe_ result = rpccli_spoolss_setprinter(pipe_hnd, mem_ctx, &hnd, level, &ctr_pub, 0); if (!W_ERROR_IS_OK(result) && (W_ERROR_V(result) != W_ERROR_V(WERR_IO_PENDING))) { - printf("cannot set printer-info: %s\n", dos_errstr(result)); + printf("cannot set printer-info: %s\n", win_errstr(result)); goto done; } diff --git a/source3/utils/net_rpc_service.c b/source3/utils/net_rpc_service.c index 133173116c..7d1c4860aa 100644 --- a/source3/utils/net_rpc_service.c +++ b/source3/utils/net_rpc_service.c @@ -79,7 +79,7 @@ static WERROR query_service_state(struct rpc_pipe_client *pipe_hnd, &hService, &result); if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result) ) { - d_fprintf(stderr, "Failed to open service. [%s]\n", dos_errstr(result)); + d_fprintf(stderr, "Failed to open service. [%s]\n", win_errstr(result)); return result; } @@ -158,7 +158,7 @@ static WERROR control_service(struct rpc_pipe_client *pipe_hnd, &result); if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result) ) { - d_fprintf(stderr, "Failed to open service. [%s]\n", dos_errstr(result)); + d_fprintf(stderr, "Failed to open service. [%s]\n", win_errstr(result)); goto done; } @@ -171,7 +171,7 @@ static WERROR control_service(struct rpc_pipe_client *pipe_hnd, &result); if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result) ) { - d_fprintf(stderr, "Control service request failed. [%s]\n", dos_errstr(result)); + d_fprintf(stderr, "Control service request failed. [%s]\n", win_errstr(result)); goto done; } @@ -220,7 +220,7 @@ static NTSTATUS rpc_service_list_internal(struct net_context *c, &hSCM, &result); if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result)) { - d_fprintf(stderr, "Failed to open Service Control Manager. [%s]\n", dos_errstr(result)); + d_fprintf(stderr, "Failed to open Service Control Manager. [%s]\n", win_errstr(result)); return werror_to_ntstatus(result); } @@ -228,7 +228,7 @@ static NTSTATUS rpc_service_list_internal(struct net_context *c, SVCCTL_STATE_ALL, &num_services, &services ); if ( !W_ERROR_IS_OK(result) ) { - d_fprintf(stderr, "Failed to enumerate services. [%s]\n", dos_errstr(result)); + d_fprintf(stderr, "Failed to enumerate services. [%s]\n", win_errstr(result)); goto done; } @@ -281,7 +281,7 @@ static NTSTATUS rpc_service_status_internal(struct net_context *c, &hSCM, &result); if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result)) { - d_fprintf(stderr, "Failed to open Service Control Manager. [%s]\n", dos_errstr(result)); + d_fprintf(stderr, "Failed to open Service Control Manager. [%s]\n", win_errstr(result)); return werror_to_ntstatus(result); } @@ -295,7 +295,7 @@ static NTSTATUS rpc_service_status_internal(struct net_context *c, &result); if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result) ) { - d_fprintf(stderr, "Failed to open service. [%s]\n", dos_errstr(result)); + d_fprintf(stderr, "Failed to open service. [%s]\n", win_errstr(result)); goto done; } @@ -307,7 +307,7 @@ static NTSTATUS rpc_service_status_internal(struct net_context *c, &result); if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result) ) { - d_fprintf(stderr, "Query status request failed. [%s]\n", dos_errstr(result)); + d_fprintf(stderr, "Query status request failed. [%s]\n", win_errstr(result)); goto done; } @@ -332,7 +332,7 @@ static NTSTATUS rpc_service_status_internal(struct net_context *c, } if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result) ) { - d_fprintf(stderr, "Query config request failed. [%s]\n", dos_errstr(result)); + d_fprintf(stderr, "Query config request failed. [%s]\n", win_errstr(result)); goto done; } @@ -404,7 +404,7 @@ static NTSTATUS rpc_service_stop_internal(struct net_context *c, &hSCM, &result); if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result)) { - d_fprintf(stderr, "Failed to open Service Control Manager. [%s]\n", dos_errstr(result)); + d_fprintf(stderr, "Failed to open Service Control Manager. [%s]\n", win_errstr(result)); return werror_to_ntstatus(result); } @@ -448,7 +448,7 @@ static NTSTATUS rpc_service_pause_internal(struct net_context *c, &hSCM, &result); if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result)) { - d_fprintf(stderr, "Failed to open Service Control Manager. [%s]\n", dos_errstr(result)); + d_fprintf(stderr, "Failed to open Service Control Manager. [%s]\n", win_errstr(result)); return werror_to_ntstatus(result); } @@ -492,7 +492,7 @@ static NTSTATUS rpc_service_resume_internal(struct net_context *c, &hSCM, &result); if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result)) { - d_fprintf(stderr, "Failed to open Service Control Manager. [%s]\n", dos_errstr(result)); + d_fprintf(stderr, "Failed to open Service Control Manager. [%s]\n", win_errstr(result)); return werror_to_ntstatus(result); } @@ -534,7 +534,7 @@ static NTSTATUS rpc_service_start_internal(struct net_context *c, &hSCM, &result); if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result)) { - d_fprintf(stderr, "Failed to open Service Control Manager. [%s]\n", dos_errstr(result)); + d_fprintf(stderr, "Failed to open Service Control Manager. [%s]\n", win_errstr(result)); return werror_to_ntstatus(result); } @@ -548,7 +548,7 @@ static NTSTATUS rpc_service_start_internal(struct net_context *c, &result); if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result) ) { - d_fprintf(stderr, "Failed to open service. [%s]\n", dos_errstr(result)); + d_fprintf(stderr, "Failed to open service. [%s]\n", win_errstr(result)); goto done; } @@ -561,7 +561,7 @@ static NTSTATUS rpc_service_start_internal(struct net_context *c, &result); if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result) ) { - d_fprintf(stderr, "Query status request failed. [%s]\n", dos_errstr(result)); + d_fprintf(stderr, "Query status request failed. [%s]\n", win_errstr(result)); goto done; } @@ -570,7 +570,7 @@ static NTSTATUS rpc_service_start_internal(struct net_context *c, if ( W_ERROR_IS_OK(result) && (state == SVCCTL_RUNNING) ) d_printf("Successfully started service: %s\n", argv[0] ); else - d_fprintf(stderr, "Failed to start service: %s [%s]\n", argv[0], dos_errstr(result) ); + d_fprintf(stderr, "Failed to start service: %s [%s]\n", argv[0], win_errstr(result) ); done: rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hService, NULL); diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 9268542da6..b4490a0607 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -672,7 +672,7 @@ static bool get_dc_name_via_netlogon(struct winbindd_domain *domain, if (!W_ERROR_IS_OK(werr)) { DEBUG(10,("rpccli_netr_GetAnyDCName failed: %s\n", - dos_errstr(werr))); + win_errstr(werr))); talloc_destroy(mem_ctx); return false; } diff --git a/source3/winbindd/winbindd_misc.c b/source3/winbindd/winbindd_misc.c index 50936c01a3..0e34615c3a 100644 --- a/source3/winbindd/winbindd_misc.c +++ b/source3/winbindd/winbindd_misc.c @@ -492,7 +492,7 @@ enum winbindd_result winbindd_dual_getdcname(struct winbindd_domain *domain, if (!W_ERROR_IS_OK(werr)) { DEBUG(5, ("Error requesting DCname for domain %s: %s\n", - state->request.domain_name, dos_errstr(werr))); + state->request.domain_name, win_errstr(werr))); return WINBINDD_ERROR; } |