mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
Rename dos_errstr() to win_errstr() for consistency with Samba 4.
This commit is contained in:
parent
edb7ac69cf
commit
ddcab787c4
@ -112,7 +112,7 @@ static WERROR smbconf_reg_open_path(TALLOC_CTX *mem_ctx,
|
|||||||
|
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(5, ("Error opening registry path '%s': %s\n",
|
DEBUG(5, ("Error opening registry path '%s': %s\n",
|
||||||
path, dos_errstr(werr)));
|
path, win_errstr(werr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
@ -212,7 +212,7 @@ static WERROR smbconf_reg_create_service_key(TALLOC_CTX *mem_ctx,
|
|||||||
}
|
}
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(5, ("Error creating key %s: %s\n",
|
DEBUG(5, ("Error creating key %s: %s\n",
|
||||||
subkeyname, dos_errstr(werr)));
|
subkeyname, win_errstr(werr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
@ -283,7 +283,7 @@ static WERROR smbconf_reg_set_value(struct registry_key *key,
|
|||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(5, ("Error adding value '%s' to "
|
DEBUG(5, ("Error adding value '%s' to "
|
||||||
"key '%s': %s\n",
|
"key '%s': %s\n",
|
||||||
canon_valname, key->key->name, dos_errstr(werr)));
|
canon_valname, key->key->name, win_errstr(werr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
@ -327,7 +327,7 @@ static WERROR smbconf_reg_set_multi_sz_value(struct registry_key *key,
|
|||||||
werr = reg_setvalue(key, valname, value);
|
werr = reg_setvalue(key, valname, value);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(5, ("Error adding value '%s' to key '%s': %s\n",
|
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:
|
done:
|
||||||
@ -585,7 +585,7 @@ static WERROR smbconf_reg_delete_values(struct registry_key *key)
|
|||||||
DEBUG(1, ("smbconf_reg_delete_values: "
|
DEBUG(1, ("smbconf_reg_delete_values: "
|
||||||
"Error enumerating values of %s: %s\n",
|
"Error enumerating values of %s: %s\n",
|
||||||
key->key->name,
|
key->key->name,
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ static bool test_get_includes(struct smbconf_ctx *ctx)
|
|||||||
werr = smbconf_get_global_includes(ctx, mem_ctx,
|
werr = smbconf_get_global_includes(ctx, mem_ctx,
|
||||||
&num_includes, &includes);
|
&num_includes, &includes);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
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);
|
werr = smbconf_set_global_includes(ctx, set_num_includes, set_includes);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
printf("failure: get_set_includes (setting includes) - %s\n",
|
printf("failure: get_set_includes (setting includes) - %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ static bool test_set_get_includes(struct smbconf_ctx *ctx)
|
|||||||
&get_includes);
|
&get_includes);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
printf("failure: get_set_includes (getting includes) - %s\n",
|
printf("failure: get_set_includes (getting includes) - %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
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);
|
werr = smbconf_set_global_includes(ctx, set_num_includes, set_includes);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
printf("failure: delete_includes (setting includes) - %s\n",
|
printf("failure: delete_includes (setting includes) - %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
werr = smbconf_delete_global_includes(ctx);
|
werr = smbconf_delete_global_includes(ctx);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
printf("failure: delete_includes (deleting includes) - %s\n",
|
printf("failure: delete_includes (deleting includes) - %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ static bool test_delete_includes(struct smbconf_ctx *ctx)
|
|||||||
&get_includes);
|
&get_includes);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
printf("failure: delete_includes (getting includes) - %s\n",
|
printf("failure: delete_includes (getting includes) - %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ static bool test_delete_includes(struct smbconf_ctx *ctx)
|
|||||||
werr = smbconf_delete_global_includes(ctx);
|
werr = smbconf_delete_global_includes(ctx);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
printf("failuer: delete_includes (delete empty includes) - "
|
printf("failuer: delete_includes (delete empty includes) - "
|
||||||
"%s\n", dos_errstr(werr));
|
"%s\n", win_errstr(werr));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ static bool torture_smbconf_txt(void)
|
|||||||
printf("test: init\n");
|
printf("test: init\n");
|
||||||
werr = smbconf_init_txt(mem_ctx, &conf_ctx, filename);
|
werr = smbconf_init_txt(mem_ctx, &conf_ctx, filename);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
ret = false;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@ -251,7 +251,7 @@ static bool torture_smbconf_reg(void)
|
|||||||
printf("test: init\n");
|
printf("test: init\n");
|
||||||
werr = smbconf_init_reg(mem_ctx, &conf_ctx, NULL);
|
werr = smbconf_init_reg(mem_ctx, &conf_ctx, NULL);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
ret = false;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -309,7 +309,7 @@ WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli,
|
|||||||
&pol);
|
&pol);
|
||||||
if (!W_ERROR_IS_OK(result)) {
|
if (!W_ERROR_IS_OK(result)) {
|
||||||
DEBUG(3, ("Unable to open printer %s, error is %s.\n",
|
DEBUG(3, ("Unable to open printer %s, error is %s.\n",
|
||||||
printername, dos_errstr(result)));
|
printername, win_errstr(result)));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,7 +320,7 @@ WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli,
|
|||||||
|
|
||||||
if (!W_ERROR_IS_OK(result)) {
|
if (!W_ERROR_IS_OK(result)) {
|
||||||
DEBUG(3, ("Unable to do enumdataex on %s, error is %s.\n",
|
DEBUG(3, ("Unable to do enumdataex on %s, error is %s.\n",
|
||||||
printername, dos_errstr(result)));
|
printername, win_errstr(result)));
|
||||||
} else {
|
} else {
|
||||||
uint32 num_values = regval_ctr_numvals( dsdriver_ctr );
|
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)) {
|
if (!W_ERROR_IS_OK(result)) {
|
||||||
DEBUG(3, ("Unable to do enumdataex on %s, error is %s.\n",
|
DEBUG(3, ("Unable to do enumdataex on %s, error is %s.\n",
|
||||||
printername, dos_errstr(result)));
|
printername, win_errstr(result)));
|
||||||
} else {
|
} else {
|
||||||
uint32 num_values = regval_ctr_numvals( dsspooler_ctr );
|
uint32 num_values = regval_ctr_numvals( dsspooler_ctr );
|
||||||
|
|
||||||
|
@ -603,7 +603,7 @@ NTSTATUS init_gp_extensions(TALLOC_CTX *mem_ctx)
|
|||||||
werr = gp_extension_store_reg(mem_ctx, reg_ctx, info);
|
werr = gp_extension_store_reg(mem_ctx, reg_ctx, info);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(1,("gp_extension_store_reg failed: %s\n",
|
DEBUG(1,("gp_extension_store_reg failed: %s\n",
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
TALLOC_FREE(info);
|
TALLOC_FREE(info);
|
||||||
gpext->methods->shutdown();
|
gpext->methods->shutdown();
|
||||||
status = werror_to_ntstatus(werr);
|
status = werror_to_ntstatus(werr);
|
||||||
|
@ -502,7 +502,7 @@ static WERROR reg_apply_registry(TALLOC_CTX *mem_ctx,
|
|||||||
token, flags);
|
token, flags);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(0,("failed to apply registry: %s\n",
|
DEBUG(0,("failed to apply registry: %s\n",
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -554,7 +554,7 @@ static NTSTATUS registry_process_group_policy(ADS_STRUCT *ads,
|
|||||||
entries, num_entries);
|
entries, num_entries);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(0,("failed to apply registry: %s\n",
|
DEBUG(0,("failed to apply registry: %s\n",
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
return werror_to_ntstatus(werr);
|
return werror_to_ntstatus(werr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ static WERROR scripts_apply(TALLOC_CTX *mem_ctx,
|
|||||||
token, flags);
|
token, flags);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(0,("failed to apply registry: %s\n",
|
DEBUG(0,("failed to apply registry: %s\n",
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -466,13 +466,13 @@ WERROR gp_reg_state_store(TALLOC_CTX *mem_ctx,
|
|||||||
werr = gp_secure_key(mem_ctx, flags, reg_ctx->curr_key,
|
werr = gp_secure_key(mem_ctx, flags, reg_ctx->curr_key,
|
||||||
&token->user_sids[0]);
|
&token->user_sids[0]);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
werr = gp_reg_store_groupmembership(mem_ctx, reg_ctx, token, flags);
|
werr = gp_reg_store_groupmembership(mem_ctx, reg_ctx, token, flags);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
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);
|
werr = gp_del_reg_state(mem_ctx, reg_ctx->curr_key, subkeyname);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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; */
|
/* goto done; */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -534,7 +534,7 @@ WERROR gp_reg_state_store(TALLOC_CTX *mem_ctx,
|
|||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(0,("gp_reg_state_store: "
|
DEBUG(0,("gp_reg_state_store: "
|
||||||
"gpo_store_reg_gpovals failed for %s: %s\n",
|
"gpo_store_reg_gpovals failed for %s: %s\n",
|
||||||
gpo->display_name, dos_errstr(werr)));
|
gpo->display_name, win_errstr(werr)));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -663,7 +663,7 @@ WERROR gp_reg_state_read(TALLOC_CTX *mem_ctx,
|
|||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(0,("gp_reg_state_read: "
|
DEBUG(0,("gp_reg_state_read: "
|
||||||
"gp_read_reg_subkey gave: %s\n",
|
"gp_read_reg_subkey gave: %s\n",
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -941,7 +941,7 @@ WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx,
|
|||||||
root_key, &key);
|
root_key, &key);
|
||||||
/* reg_ctx->curr_key, &key); */
|
/* reg_ctx->curr_key, &key); */
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
return werr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -957,7 +957,7 @@ WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx,
|
|||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(0,("reg_apply_registry_entry: "
|
DEBUG(0,("reg_apply_registry_entry: "
|
||||||
"gp_secure_key failed: %s\n",
|
"gp_secure_key failed: %s\n",
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
return werr;
|
return werr;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -966,7 +966,7 @@ WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx,
|
|||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(0,("reg_apply_registry_entry: "
|
DEBUG(0,("reg_apply_registry_entry: "
|
||||||
"reg_setvalue failed: %s\n",
|
"reg_setvalue failed: %s\n",
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
dump_reg_entry(flags, "STORE", entry);
|
dump_reg_entry(flags, "STORE", entry);
|
||||||
return werr;
|
return werr;
|
||||||
}
|
}
|
||||||
@ -976,7 +976,7 @@ WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx,
|
|||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(0,("reg_apply_registry_entry: "
|
DEBUG(0,("reg_apply_registry_entry: "
|
||||||
"reg_deletevalue failed: %s\n",
|
"reg_deletevalue failed: %s\n",
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
dump_reg_entry(flags, "STORE", entry);
|
dump_reg_entry(flags, "STORE", entry);
|
||||||
return werr;
|
return werr;
|
||||||
}
|
}
|
||||||
@ -986,7 +986,7 @@ WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx,
|
|||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(0,("reg_apply_registry_entry: "
|
DEBUG(0,("reg_apply_registry_entry: "
|
||||||
"reg_deleteallvalues failed: %s\n",
|
"reg_deleteallvalues failed: %s\n",
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
dump_reg_entry(flags, "STORE", entry);
|
dump_reg_entry(flags, "STORE", entry);
|
||||||
return werr;
|
return werr;
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* Unix SMB/CIFS implementation.
|
* Unix SMB/CIFS implementation.
|
||||||
* DOS error routines
|
* DOS error routines
|
||||||
* Copyright (C) Tim Potter 2002.
|
* Copyright (C) Tim Potter 2002.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
@ -21,17 +21,17 @@
|
|||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
|
|
||||||
typedef const struct {
|
struct werror_code_struct {
|
||||||
const char *dos_errstr;
|
const char *dos_errstr;
|
||||||
WERROR werror;
|
WERROR werror;
|
||||||
} werror_code_struct;
|
};
|
||||||
|
|
||||||
typedef const struct {
|
struct werror_str_struct {
|
||||||
WERROR werror;
|
WERROR werror;
|
||||||
const char *friendly_errstr;
|
const char *friendly_errstr;
|
||||||
} werror_str_struct;
|
};
|
||||||
|
|
||||||
werror_code_struct dos_errs[] =
|
const struct werror_code_struct dos_errs[] =
|
||||||
{
|
{
|
||||||
{ "WERR_OK", WERR_OK },
|
{ "WERR_OK", WERR_OK },
|
||||||
{ "WERR_GENERAL_FAILURE", WERR_GENERAL_FAILURE },
|
{ "WERR_GENERAL_FAILURE", WERR_GENERAL_FAILURE },
|
||||||
@ -126,7 +126,7 @@ werror_code_struct dos_errs[] =
|
|||||||
{ NULL, W_ERROR(0) }
|
{ NULL, W_ERROR(0) }
|
||||||
};
|
};
|
||||||
|
|
||||||
werror_str_struct dos_err_strs[] = {
|
const struct werror_str_struct dos_err_strs[] = {
|
||||||
{ WERR_OK, "Success" },
|
{ WERR_OK, "Success" },
|
||||||
{ WERR_ACCESS_DENIED, "Access is denied" },
|
{ WERR_ACCESS_DENIED, "Access is denied" },
|
||||||
{ WERR_INVALID_PARAM, "Invalid parameter" },
|
{ 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.
|
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;
|
char *result;
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
@ -192,11 +192,5 @@ const char *get_friendly_werror_msg(WERROR werror)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return dos_errstr(werror);
|
return win_errstr(werror);
|
||||||
}
|
|
||||||
|
|
||||||
/* compat function for samba4 */
|
|
||||||
const char *win_errstr(WERROR werror)
|
|
||||||
{
|
|
||||||
return dos_errstr(werror);
|
|
||||||
}
|
}
|
||||||
|
@ -6569,7 +6569,7 @@ static struct smbconf_ctx *lp_smbconf_ctx(void)
|
|||||||
werr = smbconf_init(NULL, &conf_ctx, "registry:");
|
werr = smbconf_init(NULL, &conf_ctx, "registry:");
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(1, ("error initializing registry configuration: "
|
DEBUG(1, ("error initializing registry configuration: "
|
||||||
"%s\n", dos_errstr(werr)));
|
"%s\n", win_errstr(werr)));
|
||||||
conf_ctx = NULL;
|
conf_ctx = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -659,7 +659,7 @@ bool nt_printing_init(struct messaging_context *msg_ctx)
|
|||||||
if ( lp_security() == SEC_ADS ) {
|
if ( lp_security() == SEC_ADS ) {
|
||||||
win_rc = check_published_printers();
|
win_rc = check_published_printers();
|
||||||
if (!W_ERROR_IS_OK(win_rc))
|
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;
|
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) ) {
|
if ( !W_ERROR_IS_OK(result) ) {
|
||||||
TALLOC_FREE( *pp_printer );
|
TALLOC_FREE( *pp_printer );
|
||||||
DEBUG(10,("get_a_printer: [%s] level %u returning %s\n",
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1117,7 +1117,7 @@ static WERROR reg_deletekey_recursive_internal(TALLOC_CTX *ctx,
|
|||||||
if (!W_ERROR_EQUAL(WERR_NO_MORE_ITEMS, werr)) {
|
if (!W_ERROR_EQUAL(WERR_NO_MORE_ITEMS, werr)) {
|
||||||
DEBUG(1, ("reg_deletekey_recursive_internal: "
|
DEBUG(1, ("reg_deletekey_recursive_internal: "
|
||||||
"Error enumerating subkeys: %s\n",
|
"Error enumerating subkeys: %s\n",
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -963,7 +963,7 @@ int regdb_fetch_keys(const char *key, REGSUBKEY_CTR *ctr)
|
|||||||
werr = regsubkey_ctr_addkey(ctr, subkeyname);
|
werr = regsubkey_ctr_addkey(ctr, subkeyname);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(5, ("regdb_fetch_keys: regsubkey_ctr_addkey "
|
DEBUG(5, ("regdb_fetch_keys: regsubkey_ctr_addkey "
|
||||||
"failed: %s\n", dos_errstr(werr)));
|
"failed: %s\n", win_errstr(werr)));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,14 +29,14 @@ WERROR registry_init_common(void)
|
|||||||
werr = regdb_init();
|
werr = regdb_init();
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(0, ("Failed to initialize the registry: %s\n",
|
DEBUG(0, ("Failed to initialize the registry: %s\n",
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
werr = reghook_cache_init();
|
werr = reghook_cache_init();
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(0, ("Failed to initialize the reghook cache: %s\n",
|
DEBUG(0, ("Failed to initialize the reghook cache: %s\n",
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
@ -87,14 +87,14 @@ WERROR registry_init_smbconf(const char *keyname)
|
|||||||
werr = init_registry_key(keyname);
|
werr = init_registry_key(keyname);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(1, ("Failed to initialize registry key '%s': %s\n",
|
DEBUG(1, ("Failed to initialize registry key '%s': %s\n",
|
||||||
keyname, dos_errstr(werr)));
|
keyname, win_errstr(werr)));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
werr = reghook_cache_add(keyname, &smbconf_reg_ops);
|
werr = reghook_cache_add(keyname, &smbconf_reg_ops);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(1, ("Failed to add smbconf reghooks to reghook cache: "
|
DEBUG(1, ("Failed to add smbconf reghooks to reghook cache: "
|
||||||
"%s\n", dos_errstr(werr)));
|
"%s\n", win_errstr(werr)));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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,
|
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);
|
ps->data_offset += sizeof(uint32);
|
||||||
|
|
||||||
|
@ -456,14 +456,14 @@ static bool sync_eventlog_params( EVENTLOG_INFO *info )
|
|||||||
if ( !W_ERROR_IS_OK( wresult ) ) {
|
if ( !W_ERROR_IS_OK( wresult ) ) {
|
||||||
DEBUG( 4,
|
DEBUG( 4,
|
||||||
( "sync_eventlog_params: Failed to open key [%s] (%s)\n",
|
( "sync_eventlog_params: Failed to open key [%s] (%s)\n",
|
||||||
path, dos_errstr( wresult ) ) );
|
path, win_errstr( wresult ) ) );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wresult = reg_queryvalue(key, key, "Retention", &value);
|
wresult = reg_queryvalue(key, key, "Retention", &value);
|
||||||
if (!W_ERROR_IS_OK(wresult)) {
|
if (!W_ERROR_IS_OK(wresult)) {
|
||||||
DEBUG(4, ("Failed to query value \"Retention\": %s\n",
|
DEBUG(4, ("Failed to query value \"Retention\": %s\n",
|
||||||
dos_errstr(wresult)));
|
win_errstr(wresult)));
|
||||||
ret = false;
|
ret = false;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@ -472,7 +472,7 @@ static bool sync_eventlog_params( EVENTLOG_INFO *info )
|
|||||||
wresult = reg_queryvalue(key, key, "MaxSize", &value);
|
wresult = reg_queryvalue(key, key, "MaxSize", &value);
|
||||||
if (!W_ERROR_IS_OK(wresult)) {
|
if (!W_ERROR_IS_OK(wresult)) {
|
||||||
DEBUG(4, ("Failed to query value \"MaxSize\": %s\n",
|
DEBUG(4, ("Failed to query value \"MaxSize\": %s\n",
|
||||||
dos_errstr(wresult)));
|
win_errstr(wresult)));
|
||||||
ret = false;
|
ret = false;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ static void srv_spoolss_replycloseprinter(int snum, POLICY_HND *handle)
|
|||||||
|
|
||||||
if (!W_ERROR_IS_OK(result))
|
if (!W_ERROR_IS_OK(result))
|
||||||
DEBUG(0,("srv_spoolss_replycloseprinter: reply_close_printer failed [%s].\n",
|
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 it's the last connection, deconnect the IPC$ share */
|
||||||
if (smb_connections==1) {
|
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 );
|
result = get_a_printer_search( NULL, &printer, 2, sname );
|
||||||
if ( !W_ERROR_IS_OK(result) ) {
|
if ( !W_ERROR_IS_OK(result) ) {
|
||||||
DEBUG(0,("set_printer_hnd_name: failed to lookup printer [%s] -- result [%s]\n",
|
DEBUG(0,("set_printer_hnd_name: failed to lookup printer [%s] -- result [%s]\n",
|
||||||
sname, dos_errstr(result)));
|
sname, win_errstr(result)));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1284,7 +1284,7 @@ void do_drv_upgrade_printer(struct messaging_context *msg,
|
|||||||
result = mod_a_printer(printer, 2);
|
result = mod_a_printer(printer, 2);
|
||||||
if (!W_ERROR_IS_OK(result)) {
|
if (!W_ERROR_IS_OK(result)) {
|
||||||
DEBUG(3,("do_drv_upgrade_printer: mod_a_printer() failed with status [%s]\n",
|
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))
|
if (!W_ERROR_IS_OK(result))
|
||||||
DEBUG(5,("srv_spoolss_reply_open_printer: Client RPC returned [%s]\n",
|
DEBUG(5,("srv_spoolss_reply_open_printer: Client RPC returned [%s]\n",
|
||||||
dos_errstr(result)));
|
win_errstr(result)));
|
||||||
|
|
||||||
return (W_ERROR_IS_OK(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);
|
ZERO_STRUCT(driver);
|
||||||
|
|
||||||
status=get_a_printer(NULL, &printer, 2, lp_const_servicename(snum) );
|
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))
|
if (!W_ERROR_IS_OK(status))
|
||||||
return WERR_INVALID_PRINTER_NAME;
|
return WERR_INVALID_PRINTER_NAME;
|
||||||
|
|
||||||
status=get_a_printer_driver(&driver, 3, printer->info_2->drivername, architecture, version);
|
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 */
|
#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. */
|
/* Yes - try again with a WinNT driver. */
|
||||||
version = 2;
|
version = 2;
|
||||||
status=get_a_printer_driver(&driver, 3, printer->info_2->drivername, architecture, version);
|
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
|
#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) );
|
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))
|
if (!W_ERROR_IS_OK(status))
|
||||||
return WERR_INVALID_PRINTER_NAME;
|
return WERR_INVALID_PRINTER_NAME;
|
||||||
|
|
||||||
status = get_a_printer_driver(&driver, 3, printer->info_2->drivername, architecture, version);
|
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))
|
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. */
|
/* Yes - try again with a WinNT driver. */
|
||||||
version = 2;
|
version = 2;
|
||||||
status=get_a_printer_driver(&driver, 3, printer->info_2->drivername, architecture, version);
|
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)) {
|
if (!W_ERROR_IS_OK(status)) {
|
||||||
free_a_printer(&printer,2);
|
free_a_printer(&printer,2);
|
||||||
return WERR_UNKNOWN_PRINTER_DRIVER;
|
return WERR_UNKNOWN_PRINTER_DRIVER;
|
||||||
@ -7544,7 +7544,7 @@ static WERROR enumports_level_1(RPC_BUFFER *buffer, uint32 offered, uint32 *need
|
|||||||
if(numlines) {
|
if(numlines) {
|
||||||
if((ports=SMB_MALLOC_ARRAY( PORT_INFO_1, numlines )) == NULL) {
|
if((ports=SMB_MALLOC_ARRAY( PORT_INFO_1, numlines )) == NULL) {
|
||||||
DEBUG(10,("Returning WERR_NOMEM [%s]\n",
|
DEBUG(10,("Returning WERR_NOMEM [%s]\n",
|
||||||
dos_errstr(WERR_NOMEM)));
|
win_errstr(WERR_NOMEM)));
|
||||||
TALLOC_FREE(qlines);
|
TALLOC_FREE(qlines);
|
||||||
return WERR_NOMEM;
|
return WERR_NOMEM;
|
||||||
}
|
}
|
||||||
|
@ -349,7 +349,7 @@ WERROR _wkssvc_NetrJoinDomain2(pipes_struct *p,
|
|||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(5,("_wkssvc_NetrJoinDomain2: libnet_Join failed with: %s\n",
|
DEBUG(5,("_wkssvc_NetrJoinDomain2: libnet_Join failed with: %s\n",
|
||||||
j->out.error_string ? j->out.error_string :
|
j->out.error_string ? j->out.error_string :
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
TALLOC_FREE(j);
|
TALLOC_FREE(j);
|
||||||
@ -415,7 +415,7 @@ WERROR _wkssvc_NetrUnjoinDomain2(pipes_struct *p,
|
|||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(5,("_wkssvc_NetrUnjoinDomain2: libnet_Unjoin failed with: %s\n",
|
DEBUG(5,("_wkssvc_NetrUnjoinDomain2: libnet_Unjoin failed with: %s\n",
|
||||||
u->out.error_string ? u->out.error_string :
|
u->out.error_string ? u->out.error_string :
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
TALLOC_FREE(u);
|
TALLOC_FREE(u);
|
||||||
|
@ -221,7 +221,7 @@ static WERROR cmd_netlogon_dsr_getdcname(struct rpc_pipe_client *cli,
|
|||||||
}
|
}
|
||||||
|
|
||||||
printf("rpccli_netlogon_dsr_getdcname returned %s\n",
|
printf("rpccli_netlogon_dsr_getdcname returned %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
|
|
||||||
return werr;
|
return werr;
|
||||||
}
|
}
|
||||||
|
@ -1539,7 +1539,7 @@ static WERROR cmd_spoolss_deletedriverex(struct rpc_pipe_client *cli,
|
|||||||
{
|
{
|
||||||
if ( !W_ERROR_EQUAL(result, WERR_UNKNOWN_PRINTER_DRIVER) ) {
|
if ( !W_ERROR_EQUAL(result, WERR_UNKNOWN_PRINTER_DRIVER) ) {
|
||||||
printf ("Failed to remove driver %s for arch [%s] (version: %d): %s\n",
|
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
|
else
|
||||||
@ -2555,7 +2555,7 @@ static bool compare_printer( struct rpc_pipe_client *cli1, POLICY_HND *hnd1,
|
|||||||
printf("Retrieving printer propertiesfor %s...", cli1->desthost);
|
printf("Retrieving printer propertiesfor %s...", cli1->desthost);
|
||||||
werror = rpccli_spoolss_getprinter( cli1, mem_ctx, hnd1, 2, &ctr1);
|
werror = rpccli_spoolss_getprinter( cli1, mem_ctx, hnd1, 2, &ctr1);
|
||||||
if ( !W_ERROR_IS_OK(werror) ) {
|
if ( !W_ERROR_IS_OK(werror) ) {
|
||||||
printf("failed (%s)\n", dos_errstr(werror));
|
printf("failed (%s)\n", win_errstr(werror));
|
||||||
talloc_destroy(mem_ctx);
|
talloc_destroy(mem_ctx);
|
||||||
return False;
|
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);
|
printf("Retrieving printer properties for %s...", cli2->desthost);
|
||||||
werror = rpccli_spoolss_getprinter( cli2, mem_ctx, hnd2, 2, &ctr2);
|
werror = rpccli_spoolss_getprinter( cli2, mem_ctx, hnd2, 2, &ctr2);
|
||||||
if ( !W_ERROR_IS_OK(werror) ) {
|
if ( !W_ERROR_IS_OK(werror) ) {
|
||||||
printf("failed (%s)\n", dos_errstr(werror));
|
printf("failed (%s)\n", win_errstr(werror));
|
||||||
talloc_destroy(mem_ctx);
|
talloc_destroy(mem_ctx);
|
||||||
return False;
|
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);
|
printf("Retrieving printer security for %s...", cli1->desthost);
|
||||||
werror = rpccli_spoolss_getprinter( cli1, mem_ctx, hnd1, 3, &ctr1);
|
werror = rpccli_spoolss_getprinter( cli1, mem_ctx, hnd1, 3, &ctr1);
|
||||||
if ( !W_ERROR_IS_OK(werror) ) {
|
if ( !W_ERROR_IS_OK(werror) ) {
|
||||||
printf("failed (%s)\n", dos_errstr(werror));
|
printf("failed (%s)\n", win_errstr(werror));
|
||||||
result = False;
|
result = False;
|
||||||
goto done;
|
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);
|
printf("Retrieving printer security for %s...", cli2->desthost);
|
||||||
werror = rpccli_spoolss_getprinter( cli2, mem_ctx, hnd2, 3, &ctr2);
|
werror = rpccli_spoolss_getprinter( cli2, mem_ctx, hnd2, 3, &ctr2);
|
||||||
if ( !W_ERROR_IS_OK(werror) ) {
|
if ( !W_ERROR_IS_OK(werror) ) {
|
||||||
printf("failed (%s)\n", dos_errstr(werror));
|
printf("failed (%s)\n", win_errstr(werror));
|
||||||
result = False;
|
result = False;
|
||||||
goto done;
|
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,
|
werror = rpccli_spoolss_open_printer_ex( cli, mem_ctx, printername_path,
|
||||||
"", PRINTER_ALL_ACCESS, servername1, cli_server1->user_name, &hPrinter1);
|
"", PRINTER_ALL_ACCESS, servername1, cli_server1->user_name, &hPrinter1);
|
||||||
if ( !W_ERROR_IS_OK(werror) ) {
|
if ( !W_ERROR_IS_OK(werror) ) {
|
||||||
printf("failed (%s)\n", dos_errstr(werror));
|
printf("failed (%s)\n", win_errstr(werror));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
printf("ok\n");
|
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,
|
werror = rpccli_spoolss_open_printer_ex( cli2, mem_ctx, printername_path,
|
||||||
"", PRINTER_ALL_ACCESS, servername2, cli_server2->user_name, &hPrinter2 );
|
"", PRINTER_ALL_ACCESS, servername2, cli_server2->user_name, &hPrinter2 );
|
||||||
if ( !W_ERROR_IS_OK(werror) ) {
|
if ( !W_ERROR_IS_OK(werror) ) {
|
||||||
printf("failed (%s)\n", dos_errstr(werror));
|
printf("failed (%s)\n", win_errstr(werror));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
printf("ok\n");
|
printf("ok\n");
|
||||||
|
@ -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);
|
wresult = cmd_entry->wfn(cmd_entry->rpc_pipe, mem_ctx, argc, (const char **) argv);
|
||||||
/* print out the DOS error */
|
/* print out the DOS error */
|
||||||
if (!W_ERROR_IS_OK(wresult)) {
|
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;
|
ntresult = W_ERROR_IS_OK(wresult)?NT_STATUS_OK:NT_STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
@ -358,7 +358,7 @@ static void add_new_svc_name( REGISTRY_KEY *key_parent, REGSUBKEY_CTR *subkeys,
|
|||||||
get_root_nt_token(), REG_KEY_ALL );
|
get_root_nt_token(), REG_KEY_ALL );
|
||||||
if ( !W_ERROR_IS_OK(wresult) ) {
|
if ( !W_ERROR_IS_OK(wresult) ) {
|
||||||
DEBUG(0,("add_new_svc_name: key lookup failed! [%s] (%s)\n",
|
DEBUG(0,("add_new_svc_name: key lookup failed! [%s] (%s)\n",
|
||||||
path, dos_errstr(wresult)));
|
path, win_errstr(wresult)));
|
||||||
SAFE_FREE(path);
|
SAFE_FREE(path);
|
||||||
return;
|
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 );
|
get_root_nt_token(), REG_KEY_ALL );
|
||||||
if ( !W_ERROR_IS_OK(wresult) ) {
|
if ( !W_ERROR_IS_OK(wresult) ) {
|
||||||
DEBUG(0,("add_new_svc_name: key lookup failed! [%s] (%s)\n",
|
DEBUG(0,("add_new_svc_name: key lookup failed! [%s] (%s)\n",
|
||||||
path, dos_errstr(wresult)));
|
path, win_errstr(wresult)));
|
||||||
TALLOC_FREE( key_secdesc );
|
TALLOC_FREE( key_secdesc );
|
||||||
SAFE_FREE(path);
|
SAFE_FREE(path);
|
||||||
return;
|
return;
|
||||||
@ -455,7 +455,7 @@ void svcctl_init_keys( void )
|
|||||||
|
|
||||||
if ( !W_ERROR_IS_OK(wresult) ) {
|
if ( !W_ERROR_IS_OK(wresult) ) {
|
||||||
DEBUG(0,("svcctl_init_keys: key lookup failed! (%s)\n",
|
DEBUG(0,("svcctl_init_keys: key lookup failed! (%s)\n",
|
||||||
dos_errstr(wresult)));
|
win_errstr(wresult)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -519,7 +519,7 @@ SEC_DESC *svcctl_get_secdesc( TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *
|
|||||||
REG_KEY_ALL );
|
REG_KEY_ALL );
|
||||||
if ( !W_ERROR_IS_OK(wresult) ) {
|
if ( !W_ERROR_IS_OK(wresult) ) {
|
||||||
DEBUG(0,("svcctl_get_secdesc: key lookup failed! [%s] (%s)\n",
|
DEBUG(0,("svcctl_get_secdesc: key lookup failed! [%s] (%s)\n",
|
||||||
path, dos_errstr(wresult)));
|
path, win_errstr(wresult)));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -579,7 +579,7 @@ bool svcctl_set_secdesc( TALLOC_CTX *ctx, const char *name, SEC_DESC *sec_desc,
|
|||||||
REG_KEY_ALL );
|
REG_KEY_ALL );
|
||||||
if ( !W_ERROR_IS_OK(wresult) ) {
|
if ( !W_ERROR_IS_OK(wresult) ) {
|
||||||
DEBUG(0,("svcctl_get_secdesc: key lookup failed! [%s] (%s)\n",
|
DEBUG(0,("svcctl_get_secdesc: key lookup failed! [%s] (%s)\n",
|
||||||
path, dos_errstr(wresult)));
|
path, win_errstr(wresult)));
|
||||||
SAFE_FREE(path);
|
SAFE_FREE(path);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -634,7 +634,7 @@ const char *svcctl_lookup_dispname(TALLOC_CTX *ctx, const char *name, NT_USER_TO
|
|||||||
REG_KEY_READ );
|
REG_KEY_READ );
|
||||||
if ( !W_ERROR_IS_OK(wresult) ) {
|
if ( !W_ERROR_IS_OK(wresult) ) {
|
||||||
DEBUG(0,("svcctl_lookup_dispname: key lookup failed! [%s] (%s)\n",
|
DEBUG(0,("svcctl_lookup_dispname: key lookup failed! [%s] (%s)\n",
|
||||||
path, dos_errstr(wresult)));
|
path, win_errstr(wresult)));
|
||||||
SAFE_FREE(path);
|
SAFE_FREE(path);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
@ -684,7 +684,7 @@ const char *svcctl_lookup_description(TALLOC_CTX *ctx, const char *name, NT_USER
|
|||||||
REG_KEY_READ );
|
REG_KEY_READ );
|
||||||
if ( !W_ERROR_IS_OK(wresult) ) {
|
if ( !W_ERROR_IS_OK(wresult) ) {
|
||||||
DEBUG(0,("svcctl_lookup_description: key lookup failed! [%s] (%s)\n",
|
DEBUG(0,("svcctl_lookup_description: key lookup failed! [%s] (%s)\n",
|
||||||
path, dos_errstr(wresult)));
|
path, win_errstr(wresult)));
|
||||||
SAFE_FREE(path);
|
SAFE_FREE(path);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -728,7 +728,7 @@ REGVAL_CTR *svcctl_fetch_regvalues( const char *name, NT_USER_TOKEN *token )
|
|||||||
REG_KEY_READ );
|
REG_KEY_READ );
|
||||||
if ( !W_ERROR_IS_OK(wresult) ) {
|
if ( !W_ERROR_IS_OK(wresult) ) {
|
||||||
DEBUG(0,("svcctl_fetch_regvalues: key lookup failed! [%s] (%s)\n",
|
DEBUG(0,("svcctl_fetch_regvalues: key lookup failed! [%s] (%s)\n",
|
||||||
path, dos_errstr(wresult)));
|
path, win_errstr(wresult)));
|
||||||
SAFE_FREE(path);
|
SAFE_FREE(path);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -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,
|
WERROR werr = gp_reg_state_store(mem_ctx, flags, dn,
|
||||||
token, gpo_list);
|
token, gpo_list);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_printf("failed: %s\n", dos_errstr(werr));
|
d_printf("failed: %s\n", win_errstr(werr));
|
||||||
goto out;
|
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],
|
&token->user_sids[0],
|
||||||
&read_list);
|
&read_list);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_printf("failed: %s\n", dos_errstr(werr));
|
d_printf("failed: %s\n", win_errstr(werr));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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);
|
werr = smbconf_get_config(conf_ctx, mem_ctx, &num_shares, &shares);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "Error getting config: %s\n",
|
d_fprintf(stderr, "Error getting config: %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
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);
|
werr = smbconf_init(mem_ctx, &txt_ctx, conf_source);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_printf("error loading file '%s': %s\n", filename,
|
d_printf("error loading file '%s': %s\n", filename,
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
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);
|
werr = smbconf_drop(conf_ctx);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "Error deleting configuration: %s\n",
|
d_fprintf(stderr, "Error deleting configuration: %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
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);
|
werr = smbconf_get_share(conf_ctx, mem_ctx, sharename, &service);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_printf("error getting share parameters: %s\n",
|
d_printf("error getting share parameters: %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -626,7 +626,7 @@ static int net_conf_addshare(struct net_context *c,
|
|||||||
werr = smbconf_create_share(conf_ctx, sharename);
|
werr = smbconf_create_share(conf_ctx, sharename);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "Error creating share %s: %s\n",
|
d_fprintf(stderr, "Error creating share %s: %s\n",
|
||||||
sharename, dos_errstr(werr));
|
sharename, win_errstr(werr));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -637,7 +637,7 @@ static int net_conf_addshare(struct net_context *c,
|
|||||||
werr = smbconf_set_parameter(conf_ctx, sharename, "path", path);
|
werr = smbconf_set_parameter(conf_ctx, sharename, "path", path);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "Error setting parameter %s: %s\n",
|
d_fprintf(stderr, "Error setting parameter %s: %s\n",
|
||||||
"path", dos_errstr(werr));
|
"path", win_errstr(werr));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -646,7 +646,7 @@ static int net_conf_addshare(struct net_context *c,
|
|||||||
comment);
|
comment);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "Error setting parameter %s: %s\n",
|
d_fprintf(stderr, "Error setting parameter %s: %s\n",
|
||||||
"comment", dos_errstr(werr));
|
"comment", win_errstr(werr));
|
||||||
goto done;
|
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);
|
werr = smbconf_set_parameter(conf_ctx, sharename, "guest ok", guest_ok);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "Error setting parameter %s: %s\n",
|
d_fprintf(stderr, "Error setting parameter %s: %s\n",
|
||||||
"'guest ok'", dos_errstr(werr));
|
"'guest ok'", win_errstr(werr));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -662,7 +662,7 @@ static int net_conf_addshare(struct net_context *c,
|
|||||||
writeable);
|
writeable);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "Error setting parameter %s: %s\n",
|
d_fprintf(stderr, "Error setting parameter %s: %s\n",
|
||||||
"writeable", dos_errstr(werr));
|
"writeable", win_errstr(werr));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -695,7 +695,7 @@ static int net_conf_delshare(struct net_context *c,
|
|||||||
werr = smbconf_delete_share(conf_ctx, sharename);
|
werr = smbconf_delete_share(conf_ctx, sharename);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "Error deleting share %s: %s\n",
|
d_fprintf(stderr, "Error deleting share %s: %s\n",
|
||||||
sharename, dos_errstr(werr));
|
sharename, win_errstr(werr));
|
||||||
goto done;
|
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);
|
werr = smbconf_create_share(conf_ctx, service);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "Error creating share '%s': %s\n",
|
d_fprintf(stderr, "Error creating share '%s': %s\n",
|
||||||
service, dos_errstr(werr));
|
service, win_errstr(werr));
|
||||||
goto done;
|
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)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "Error setting value '%s': %s\n",
|
d_fprintf(stderr, "Error setting value '%s': %s\n",
|
||||||
param, dos_errstr(werr));
|
param, win_errstr(werr));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -796,7 +796,7 @@ static int net_conf_getparm(struct net_context *c, struct smbconf_ctx *conf_ctx,
|
|||||||
goto done;
|
goto done;
|
||||||
} else if (!W_ERROR_IS_OK(werr)) {
|
} else if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "Error getting value '%s': %s.\n",
|
d_fprintf(stderr, "Error getting value '%s': %s.\n",
|
||||||
param, dos_errstr(werr));
|
param, win_errstr(werr));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -846,7 +846,7 @@ static int net_conf_delparm(struct net_context *c, struct smbconf_ctx *conf_ctx,
|
|||||||
goto done;
|
goto done;
|
||||||
} else if (!W_ERROR_IS_OK(werr)) {
|
} else if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "Error deleting value '%s': %s.\n",
|
d_fprintf(stderr, "Error deleting value '%s': %s.\n",
|
||||||
param, dos_errstr(werr));
|
param, win_errstr(werr));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -883,7 +883,7 @@ static int net_conf_getincludes(struct net_context *c,
|
|||||||
werr = smbconf_get_includes(conf_ctx, mem_ctx, service,
|
werr = smbconf_get_includes(conf_ctx, mem_ctx, service,
|
||||||
&num_includes, &includes);
|
&num_includes, &includes);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
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);
|
werr = smbconf_set_includes(conf_ctx, service, num_includes, includes);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -962,7 +962,7 @@ static int net_conf_delincludes(struct net_context *c,
|
|||||||
|
|
||||||
werr = smbconf_delete_includes(conf_ctx, service);
|
werr = smbconf_delete_includes(conf_ctx, service);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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);
|
werr = open_hive(tmp_ctx, path, desired_access, &hive, &subkey_name);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
werr = reg_openkey(ctx, hive, subkey_name, desired_access, key);
|
werr = reg_openkey(ctx, hive, subkey_name, desired_access, key);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "reg_openkey failed: %s\n",
|
d_fprintf(stderr, "reg_openkey failed: %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
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);
|
werr = open_key(ctx, argv[0], REG_KEY_READ, &key);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
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);
|
werr = open_hive(ctx, argv[0], REG_KEY_WRITE, &hivekey, &subkeyname);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,7 +201,7 @@ static int net_registry_createkey(struct net_context *c, int argc,
|
|||||||
&subkey, &action);
|
&subkey, &action);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "reg_createkey failed: %s\n",
|
d_fprintf(stderr, "reg_createkey failed: %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
switch (action) {
|
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);
|
werr = open_hive(ctx, argv[0], REG_KEY_WRITE, &hivekey, &subkeyname);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
werr = reg_deletekey(hivekey, subkeyname);
|
werr = reg_deletekey(hivekey, subkeyname);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "reg_deletekey failed: %s\n",
|
d_fprintf(stderr, "reg_deletekey failed: %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
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);
|
werr = open_key(ctx, argv[0], REG_KEY_READ, &key);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
werr = reg_queryvalue(ctx, key, argv[1], &value);
|
werr = reg_queryvalue(ctx, key, argv[1], &value);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "reg_queryvalue failed: %s\n",
|
d_fprintf(stderr, "reg_queryvalue failed: %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
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);
|
werr = open_key(ctx, argv[0], REG_KEY_WRITE, &key);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
werr = reg_setvalue(key, argv[1], &value);
|
werr = reg_setvalue(key, argv[1], &value);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "reg_setvalue failed: %s\n",
|
d_fprintf(stderr, "reg_setvalue failed: %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
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);
|
werr = open_key(ctx, argv[0], REG_KEY_WRITE, &key);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
werr = reg_deletevalue(key, argv[1]);
|
werr = reg_deletevalue(key, argv[1]);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "reg_deletekey failed: %s\n",
|
d_fprintf(stderr, "reg_deletekey failed: %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
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);
|
werr = open_key(ctx, argv[0], access_mask, &key);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
werr = reg_getkeysecurity(ctx, key, &secdesc);
|
werr = reg_getkeysecurity(ctx, key, &secdesc);
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
d_fprintf(stderr, "reg_getkeysecurity failed: %s\n",
|
d_fprintf(stderr, "reg_getkeysecurity failed: %s\n",
|
||||||
dos_errstr(werr));
|
win_errstr(werr));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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)) {
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3580,7 +3580,7 @@ static NTSTATUS rpc_share_migrate_security_internals(struct net_context *c,
|
|||||||
&parm_error,
|
&parm_error,
|
||||||
&result);
|
&result);
|
||||||
if (!NT_STATUS_IS_OK(nt_status) || !W_ERROR_IS_OK(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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5075,7 +5075,7 @@ NTSTATUS rpc_reg_shutdown_internals(struct net_context *c,
|
|||||||
if ( W_ERROR_EQUAL(werr, WERR_MACHINE_LOCKED) )
|
if ( W_ERROR_EQUAL(werr, WERR_MACHINE_LOCKED) )
|
||||||
d_fprintf(stderr, "\nMachine locked, use -f switch to force\n");
|
d_fprintf(stderr, "\nMachine locked, use -f switch to force\n");
|
||||||
else
|
else
|
||||||
d_fprintf(stderr, "\nresult was: %s\n", dos_errstr(werr));
|
d_fprintf(stderr, "\nresult was: %s\n", win_errstr(werr));
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -711,7 +711,7 @@ static bool net_spoolss_enum_printers(struct rpc_pipe_client *pipe_hnd,
|
|||||||
level, num_printers, ctr);
|
level, num_printers, ctr);
|
||||||
|
|
||||||
if (!W_ERROR_IS_OK(result)) {
|
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;
|
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)) {
|
if (!W_ERROR_IS_OK(result)) {
|
||||||
d_fprintf(stderr, "cannot open printer %s on server %s: %s\n",
|
d_fprintf(stderr, "cannot open printer %s on server %s: %s\n",
|
||||||
printername2, servername, dos_errstr(result));
|
printername2, servername, win_errstr(result));
|
||||||
return false;
|
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);
|
result = rpccli_spoolss_getprinter(pipe_hnd, mem_ctx, hnd, level, ctr);
|
||||||
|
|
||||||
if (!W_ERROR_IS_OK(result)) {
|
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;
|
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);
|
result = rpccli_spoolss_setprinter(pipe_hnd, mem_ctx, hnd, level, ctr, 0);
|
||||||
|
|
||||||
if (!W_ERROR_IS_OK(result)) {
|
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;
|
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);
|
result = rpccli_spoolss_setprinterdata(pipe_hnd, mem_ctx, hnd, value);
|
||||||
|
|
||||||
if (!W_ERROR_IS_OK(result)) {
|
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;
|
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);
|
result = rpccli_spoolss_enumprinterkey(pipe_hnd, mem_ctx, hnd, keyname, keylist, NULL);
|
||||||
|
|
||||||
if (!W_ERROR_IS_OK(result)) {
|
if (!W_ERROR_IS_OK(result)) {
|
||||||
printf("enumprinterkey failed: %s\n", dos_errstr(result));
|
printf("enumprinterkey failed: %s\n", win_errstr(result));
|
||||||
return false;
|
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);
|
result = rpccli_spoolss_enumprinterdataex(pipe_hnd, mem_ctx, hnd, keyname, ctr);
|
||||||
|
|
||||||
if (!W_ERROR_IS_OK(result)) {
|
if (!W_ERROR_IS_OK(result)) {
|
||||||
printf("enumprinterdataex failed: %s\n", dos_errstr(result));
|
printf("enumprinterdataex failed: %s\n", win_errstr(result));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -873,7 +873,7 @@ static bool net_spoolss_setprinterdataex(struct rpc_pipe_client *pipe_hnd,
|
|||||||
keyname, value);
|
keyname, value);
|
||||||
|
|
||||||
if (!W_ERROR_IS_OK(result)) {
|
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;
|
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);
|
result = rpccli_spoolss_enumforms(pipe_hnd, mem_ctx, hnd, level, num_forms, forms);
|
||||||
|
|
||||||
if (!W_ERROR_IS_OK(result)) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -914,7 +914,7 @@ static bool net_spoolss_enumprinterdrivers (struct rpc_pipe_client *pipe_hnd,
|
|||||||
env, num_drivers, ctr);
|
env, num_drivers, ctr);
|
||||||
|
|
||||||
if (!W_ERROR_IS_OK(result)) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -936,10 +936,10 @@ static bool net_spoolss_getprinterdriver(struct rpc_pipe_client *pipe_hnd,
|
|||||||
|
|
||||||
if (!W_ERROR_IS_OK(result)) {
|
if (!W_ERROR_IS_OK(result)) {
|
||||||
DEBUG(1,("cannot get driver (for architecture: %s): %s\n",
|
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) &&
|
if (W_ERROR_V(result) != W_ERROR_V(WERR_UNKNOWN_PRINTER_DRIVER) &&
|
||||||
W_ERROR_V(result) != W_ERROR_V(WERR_INVALID_ENVIRONMENT)) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
@ -963,7 +963,7 @@ static bool net_spoolss_addprinterdriver(struct rpc_pipe_client *pipe_hnd,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!W_ERROR_IS_OK(result)) {
|
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;
|
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);
|
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))) {
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ static WERROR query_service_state(struct rpc_pipe_client *pipe_hnd,
|
|||||||
&hService,
|
&hService,
|
||||||
&result);
|
&result);
|
||||||
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ static WERROR control_service(struct rpc_pipe_client *pipe_hnd,
|
|||||||
&result);
|
&result);
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ static WERROR control_service(struct rpc_pipe_client *pipe_hnd,
|
|||||||
&result);
|
&result);
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ static NTSTATUS rpc_service_list_internal(struct net_context *c,
|
|||||||
&hSCM,
|
&hSCM,
|
||||||
&result);
|
&result);
|
||||||
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(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);
|
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 );
|
SVCCTL_STATE_ALL, &num_services, &services );
|
||||||
|
|
||||||
if ( !W_ERROR_IS_OK(result) ) {
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -281,7 +281,7 @@ static NTSTATUS rpc_service_status_internal(struct net_context *c,
|
|||||||
&hSCM,
|
&hSCM,
|
||||||
&result);
|
&result);
|
||||||
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(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);
|
return werror_to_ntstatus(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,7 +295,7 @@ static NTSTATUS rpc_service_status_internal(struct net_context *c,
|
|||||||
&result);
|
&result);
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,7 +307,7 @@ static NTSTATUS rpc_service_status_internal(struct net_context *c,
|
|||||||
&result);
|
&result);
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(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;
|
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) ) {
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -404,7 +404,7 @@ static NTSTATUS rpc_service_stop_internal(struct net_context *c,
|
|||||||
&hSCM,
|
&hSCM,
|
||||||
&result);
|
&result);
|
||||||
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(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);
|
return werror_to_ntstatus(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -448,7 +448,7 @@ static NTSTATUS rpc_service_pause_internal(struct net_context *c,
|
|||||||
&hSCM,
|
&hSCM,
|
||||||
&result);
|
&result);
|
||||||
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(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);
|
return werror_to_ntstatus(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -492,7 +492,7 @@ static NTSTATUS rpc_service_resume_internal(struct net_context *c,
|
|||||||
&hSCM,
|
&hSCM,
|
||||||
&result);
|
&result);
|
||||||
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(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);
|
return werror_to_ntstatus(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -534,7 +534,7 @@ static NTSTATUS rpc_service_start_internal(struct net_context *c,
|
|||||||
&hSCM,
|
&hSCM,
|
||||||
&result);
|
&result);
|
||||||
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(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);
|
return werror_to_ntstatus(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -548,7 +548,7 @@ static NTSTATUS rpc_service_start_internal(struct net_context *c,
|
|||||||
&result);
|
&result);
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -561,7 +561,7 @@ static NTSTATUS rpc_service_start_internal(struct net_context *c,
|
|||||||
&result);
|
&result);
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(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;
|
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) )
|
if ( W_ERROR_IS_OK(result) && (state == SVCCTL_RUNNING) )
|
||||||
d_printf("Successfully started service: %s\n", argv[0] );
|
d_printf("Successfully started service: %s\n", argv[0] );
|
||||||
else
|
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:
|
done:
|
||||||
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hService, NULL);
|
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hService, NULL);
|
||||||
|
@ -672,7 +672,7 @@ static bool get_dc_name_via_netlogon(struct winbindd_domain *domain,
|
|||||||
|
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(10,("rpccli_netr_GetAnyDCName failed: %s\n",
|
DEBUG(10,("rpccli_netr_GetAnyDCName failed: %s\n",
|
||||||
dos_errstr(werr)));
|
win_errstr(werr)));
|
||||||
talloc_destroy(mem_ctx);
|
talloc_destroy(mem_ctx);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -492,7 +492,7 @@ enum winbindd_result winbindd_dual_getdcname(struct winbindd_domain *domain,
|
|||||||
|
|
||||||
if (!W_ERROR_IS_OK(werr)) {
|
if (!W_ERROR_IS_OK(werr)) {
|
||||||
DEBUG(5, ("Error requesting DCname for domain %s: %s\n",
|
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;
|
return WINBINDD_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user