summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2015-12-03 15:24:11 +0100
committerJeremy Allison <jra@samba.org>2016-09-28 00:04:17 +0200
commit3af16e4abdb6787dcda9306e5e43bee51f963f78 (patch)
treed0e39942ae538fae9dda595f0a5e5d6adaf4578e /source3
parent22a514f9929e830f0484182cc5f29b19bd6421f2 (diff)
downloadsamba-3af16e4abdb6787dcda9306e5e43bee51f963f78.tar.gz
werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in source3/rpc_client/
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_client/cli_winreg_spoolss.c16
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c4
-rw-r--r--source3/rpc_server/srvsvc/srv_srvsvc_nt.c6
-rw-r--r--source3/rpc_server/winreg/srv_winreg_nt.c12
4 files changed, 19 insertions, 19 deletions
diff --git a/source3/rpc_client/cli_winreg_spoolss.c b/source3/rpc_client/cli_winreg_spoolss.c
index 90accd41854..393fa2c65ed 100644
--- a/source3/rpc_client/cli_winreg_spoolss.c
+++ b/source3/rpc_client/cli_winreg_spoolss.c
@@ -608,7 +608,7 @@ WERROR winreg_create_printer(TALLOC_CTX *mem_ctx,
if (W_ERROR_IS_OK(result)) {
DEBUG(2, ("winreg_create_printer: Skipping, %s already exists\n", path));
goto done;
- } else if (W_ERROR_EQUAL(result, WERR_BADFILE)) {
+ } else if (W_ERROR_EQUAL(result, WERR_FILE_NOT_FOUND)) {
DEBUG(2, ("winreg_create_printer: Creating default values in %s\n", path));
} else if (!W_ERROR_IS_OK(result)) {
DEBUG(0, ("winreg_create_printer: Could not open key %s: %s\n",
@@ -1619,7 +1619,7 @@ static WERROR winreg_get_secdesc(TALLOC_CTX *mem_ctx,
&hive_hnd,
&key_hnd);
if (!W_ERROR_IS_OK(result)) {
- if (W_ERROR_EQUAL(result, WERR_BADFILE)) {
+ if (W_ERROR_EQUAL(result, WERR_FILE_NOT_FOUND)) {
goto create_default;
}
goto done;
@@ -1635,7 +1635,7 @@ static WERROR winreg_get_secdesc(TALLOC_CTX *mem_ctx,
result = ntstatus_to_werror(status);
}
if (!W_ERROR_IS_OK(result)) {
- if (W_ERROR_EQUAL(result, WERR_BADFILE)) {
+ if (W_ERROR_EQUAL(result, WERR_FILE_NOT_FOUND)) {
if (is_valid_policy_hnd(&key_hnd)) {
dcerpc_winreg_CloseKey(winreg_handle,
@@ -2413,7 +2413,7 @@ WERROR winreg_delete_printer_key(TALLOC_CTX *mem_ctx,
&key_hnd);
if (!W_ERROR_IS_OK(result)) {
/* key doesn't exist */
- if (W_ERROR_EQUAL(result, WERR_BADFILE)) {
+ if (W_ERROR_EQUAL(result, WERR_FILE_NOT_FOUND)) {
result = WERR_OK;
goto done;
}
@@ -2750,7 +2750,7 @@ WERROR winreg_printer_enumforms1(TALLOC_CTX *mem_ctx,
&key_hnd);
if (!W_ERROR_IS_OK(result)) {
/* key doesn't exist */
- if (W_ERROR_EQUAL(result, WERR_BADFILE)) {
+ if (W_ERROR_EQUAL(result, WERR_FILE_NOT_FOUND)) {
result = WERR_OK;
goto done;
}
@@ -2898,7 +2898,7 @@ WERROR winreg_printer_deleteform1(TALLOC_CTX *mem_ctx,
if (!W_ERROR_IS_OK(result)) {
DEBUG(0, ("winreg_printer_deleteform1: Could not open key %s: %s\n",
TOP_LEVEL_CONTROL_FORMS_KEY, win_errstr(result)));
- if (W_ERROR_EQUAL(result, WERR_BADFILE)) {
+ if (W_ERROR_EQUAL(result, WERR_FILE_NOT_FOUND)) {
result = WERR_INVALID_FORM_NAME;
}
goto done;
@@ -2918,7 +2918,7 @@ WERROR winreg_printer_deleteform1(TALLOC_CTX *mem_ctx,
goto done;
}
- if (W_ERROR_EQUAL(result, WERR_BADFILE)) {
+ if (W_ERROR_EQUAL(result, WERR_FILE_NOT_FOUND)) {
result = WERR_INVALID_FORM_NAME;
}
@@ -3824,7 +3824,7 @@ WERROR winreg_del_driver(TALLOC_CTX *mem_ctx,
&key_hnd);
if (!W_ERROR_IS_OK(result)) {
/* key doesn't exist */
- if (W_ERROR_EQUAL(result, WERR_BADFILE)) {
+ if (W_ERROR_EQUAL(result, WERR_FILE_NOT_FOUND)) {
result = WERR_OK;
goto done;
}
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index caac06535c1..55deaa882e8 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -2405,7 +2405,7 @@ static WERROR getprinterdata_printer_server(TALLOC_CTX *mem_ctx,
const char *hostname = get_mydnsfullname();
if (!hostname) {
- return WERR_BADFILE;
+ return WERR_FILE_NOT_FOUND;
}
*type = REG_SZ;
@@ -10071,7 +10071,7 @@ WERROR _spoolss_EnumPrinterKey(struct pipes_struct *p,
uint32_t num_keys;
struct printer_handle *Printer = find_printer_index_by_hnd(p, r->in.handle);
int snum = 0;
- WERROR result = WERR_BADFILE;
+ WERROR result = WERR_FILE_NOT_FOUND;
const char **array = NULL;
DATA_BLOB blob;
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index d6e1dfa76c9..4985be760f9 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -2071,10 +2071,10 @@ WERROR _srvsvc_NetShareAdd(struct pipes_struct *p,
if (ret == -1 && (errno != EACCES)) {
/*
* If path has any other than permission
- * problem, return WERR_BADFILE (as Windows
+ * problem, return WERR_FILE_NOT_FOUND (as Windows
* does.
*/
- return WERR_BADFILE;
+ return WERR_FILE_NOT_FOUND;
}
/* Ensure share name, pathname and comment don't contain '"' characters. */
@@ -2764,7 +2764,7 @@ WERROR _srvsvc_NetFileClose(struct pipes_struct *p,
/* enum_file_close_fn sends the close message to
* the relevant smbd process. */
- r->out.result = WERR_BADFILE;
+ r->out.result = WERR_FILE_NOT_FOUND;
state.r = r;
state.msg_ctx = p->msg_ctx;
share_entry_forall(enum_file_close_fn, &state);
diff --git a/source3/rpc_server/winreg/srv_winreg_nt.c b/source3/rpc_server/winreg/srv_winreg_nt.c
index f45c3b9ff9d..b797133ab76 100644
--- a/source3/rpc_server/winreg/srv_winreg_nt.c
+++ b/source3/rpc_server/winreg/srv_winreg_nt.c
@@ -83,7 +83,7 @@ static WERROR open_registry_key(struct pipes_struct *p,
}
if ( !create_policy_hnd( p, hnd, key ) ) {
- return WERR_BADFILE;
+ return WERR_FILE_NOT_FOUND;
}
return WERR_OK;
@@ -239,7 +239,7 @@ WERROR _winreg_OpenKey(struct pipes_struct *p,
WERROR _winreg_QueryValue(struct pipes_struct *p,
struct winreg_QueryValue *r)
{
- WERROR status = WERR_BADFILE;
+ WERROR status = WERR_FILE_NOT_FOUND;
struct registry_key *regkey = find_regkey_by_hnd( p, r->in.handle );
prs_struct prs_hkpd;
@@ -300,7 +300,7 @@ WERROR _winreg_QueryValue(struct pipes_struct *p,
else {
DEBUG(3,("Unsupported key name [%s] for HKPD.\n",
r->in.value_name->name));
- return WERR_BADFILE;
+ return WERR_FILE_NOT_FOUND;
}
*r->out.type = REG_BINARY;
@@ -329,7 +329,7 @@ WERROR _winreg_QueryValue(struct pipes_struct *p,
*r->out.type = val->type;
}
- status = WERR_BADFILE;
+ status = WERR_FILE_NOT_FOUND;
if (*r->in.data_size < outbuf_size) {
*r->out.data_size = outbuf_size;
@@ -792,7 +792,7 @@ WERROR _winreg_CreateKey(struct pipes_struct *p,
if (!create_policy_hnd(p, r->out.new_handle, new_key)) {
TALLOC_FREE(new_key);
- return WERR_BADFILE;
+ return WERR_FILE_NOT_FOUND;
}
return WERR_OK;
@@ -1119,7 +1119,7 @@ WERROR _winreg_QueryMultipleValues2(struct pipes_struct *p,
*r->out.needed = result.length;
if (r->in.num_values != num_vals) {
- return WERR_BADFILE;
+ return WERR_FILE_NOT_FOUND;
}
if (*r->in.offered >= *r->out.needed) {