mirror of
https://github.com/samba-team/samba.git
synced 2025-02-23 09:57:40 +03:00
Use WERR_FILE_EXISTS which is the equivalent of WERR_ALREADY_EXISTS
previously present in Samba 3.
This commit is contained in:
parent
44b728958a
commit
f9fb9436ae
@ -172,7 +172,7 @@ WERROR smbconf_create_share(struct smbconf_ctx *ctx,
|
||||
const char *servicename)
|
||||
{
|
||||
if ((servicename != NULL) && smbconf_share_exists(ctx, servicename)) {
|
||||
return WERR_ALREADY_EXISTS;
|
||||
return WERR_FILE_EXISTS;
|
||||
}
|
||||
|
||||
return ctx->ops->create_share(ctx, servicename);
|
||||
|
@ -208,7 +208,7 @@ static WERROR smbconf_reg_create_service_key(TALLOC_CTX *mem_ctx,
|
||||
REG_KEY_WRITE, newkey, &action);
|
||||
if (W_ERROR_IS_OK(werr) && (action != REG_CREATED_NEW_KEY)) {
|
||||
DEBUG(10, ("Key '%s' already exists.\n", subkeyname));
|
||||
werr = WERR_ALREADY_EXISTS;
|
||||
werr = WERR_FILE_EXISTS;
|
||||
}
|
||||
if (!W_ERROR_IS_OK(werr)) {
|
||||
DEBUG(5, ("Error creating key %s: %s\n",
|
||||
|
@ -42,7 +42,7 @@ werror_code_struct dos_errs[] =
|
||||
{ "WERR_INSUFFICIENT_BUFFER", WERR_INSUFFICIENT_BUFFER },
|
||||
{ "WERR_SEM_TIMEOUT", WERR_SEM_TIMEOUT },
|
||||
{ "WERR_NO_SUCH_SHARE", WERR_NO_SUCH_SHARE },
|
||||
{ "WERR_ALREADY_EXISTS", WERR_ALREADY_EXISTS },
|
||||
{ "WERR_FILE_EXISTS", WERR_FILE_EXISTS },
|
||||
{ "WERR_INVALID_PARAM", WERR_INVALID_PARAM },
|
||||
{ "WERR_NOT_SUPPORTED", WERR_NOT_SUPPORTED },
|
||||
{ "WERR_BAD_PASSWORD", WERR_BAD_PASSWORD },
|
||||
|
@ -8490,7 +8490,7 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM
|
||||
/* can't add if builtin */
|
||||
|
||||
if (get_a_builtin_ntform(&form->name,&tmpForm)) {
|
||||
status = WERR_ALREADY_EXISTS;
|
||||
status = WERR_FILE_EXISTS;
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -1781,7 +1781,7 @@ WERROR _srvsvc_NetShareAdd(pipes_struct *p,
|
||||
|
||||
/* Share already exists. */
|
||||
if (snum >= 0) {
|
||||
return WERR_ALREADY_EXISTS;
|
||||
return WERR_FILE_EXISTS;
|
||||
}
|
||||
|
||||
/* We can only add disk shares. */
|
||||
|
@ -3126,7 +3126,7 @@ static NTSTATUS rpc_share_migrate_shares_internals(struct net_context *c,
|
||||
&parm_error,
|
||||
&result);
|
||||
|
||||
if (W_ERROR_V(result) == W_ERROR_V(WERR_ALREADY_EXISTS)) {
|
||||
if (W_ERROR_V(result) == W_ERROR_V(WERR_FILE_EXISTS)) {
|
||||
printf(" [%s] does already exist\n",
|
||||
info502.name);
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user