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",
&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;
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,
&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;
}
&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;
}
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;
goto done;
}
- if (W_ERROR_EQUAL(result, WERR_BADFILE)) {
+ if (W_ERROR_EQUAL(result, WERR_FILE_NOT_FOUND)) {
result = WERR_INVALID_FORM_NAME;
}
&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;
}
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. */
/* 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);
}
if ( !create_policy_hnd( p, hnd, key ) ) {
- return WERR_BADFILE;
+ return WERR_FILE_NOT_FOUND;
}
return WERR_OK;
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;
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;
*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;
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;
*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) {