mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
werror: replace WERR_NOMEM with WERR_NOT_ENOUGH_MEMORY in source3/rpc_server/
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
f142b0aec5
commit
74d3bf1488
@ -61,7 +61,7 @@ WERROR _dfs_Add(struct pipes_struct *p, struct dfs_Add *r)
|
||||
|
||||
jn = talloc_zero(ctx, struct junction_map);
|
||||
if (!jn) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
DEBUG(5,("init_reply_dfs_add: Request to add %s -> %s\\%s.\n",
|
||||
@ -71,7 +71,7 @@ WERROR _dfs_Add(struct pipes_struct *p, struct dfs_Add *r)
|
||||
r->in.server,
|
||||
r->in.share);
|
||||
if (!altpath) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
/* The following call can change the cwd. */
|
||||
@ -86,7 +86,7 @@ WERROR _dfs_Add(struct pipes_struct *p, struct dfs_Add *r)
|
||||
old_referral_list = jn->referral_list;
|
||||
|
||||
if (jn->referral_count < 1) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
jn->referral_list = talloc_array(ctx, struct referral, jn->referral_count);
|
||||
@ -128,7 +128,7 @@ WERROR _dfs_Remove(struct pipes_struct *p, struct dfs_Remove *r)
|
||||
|
||||
jn = talloc_zero(ctx, struct junction_map);
|
||||
if (!jn) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
if (r->in.servername && r->in.sharename) {
|
||||
@ -136,7 +136,7 @@ WERROR _dfs_Remove(struct pipes_struct *p, struct dfs_Remove *r)
|
||||
r->in.servername,
|
||||
r->in.sharename);
|
||||
if (!altpath) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
if (!strlower_m(altpath)) {
|
||||
return WERR_INVALID_PARAM;
|
||||
@ -165,7 +165,7 @@ WERROR _dfs_Remove(struct pipes_struct *p, struct dfs_Remove *r)
|
||||
char *refpath = talloc_strdup(ctx,
|
||||
jn->referral_list[i].alternate_path);
|
||||
if (!refpath) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
trim_char(refpath, '\\', '\\');
|
||||
DEBUG(10,("_dfs_remove: refpath: .%s.\n", refpath));
|
||||
@ -301,7 +301,7 @@ WERROR _dfs_Enum(struct pipes_struct *p, struct dfs_Enum *r)
|
||||
case 1:
|
||||
if (num_jn) {
|
||||
if ((r->out.info->e.info1->s = talloc_array(ctx, struct dfs_Info1, num_jn)) == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
} else {
|
||||
r->out.info->e.info1->s = NULL;
|
||||
@ -311,7 +311,7 @@ WERROR _dfs_Enum(struct pipes_struct *p, struct dfs_Enum *r)
|
||||
case 2:
|
||||
if (num_jn) {
|
||||
if ((r->out.info->e.info2->s = talloc_array(ctx, struct dfs_Info2, num_jn)) == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
} else {
|
||||
r->out.info->e.info2->s = NULL;
|
||||
@ -321,7 +321,7 @@ WERROR _dfs_Enum(struct pipes_struct *p, struct dfs_Enum *r)
|
||||
case 3:
|
||||
if (num_jn) {
|
||||
if ((r->out.info->e.info3->s = talloc_array(ctx, struct dfs_Info3, num_jn)) == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
} else {
|
||||
r->out.info->e.info3->s = NULL;
|
||||
@ -362,7 +362,7 @@ WERROR _dfs_GetInfo(struct pipes_struct *p, struct dfs_GetInfo *r)
|
||||
|
||||
jn = talloc_zero(ctx, struct junction_map);
|
||||
if (!jn) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
ret = create_junction(ctx, r->in.dfs_entry_path,
|
||||
@ -385,28 +385,28 @@ WERROR _dfs_GetInfo(struct pipes_struct *p, struct dfs_GetInfo *r)
|
||||
case 1:
|
||||
r->out.info->info1 = talloc_zero(ctx,struct dfs_Info1);
|
||||
if (!r->out.info->info1) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
ret = init_reply_dfs_info_1(ctx, jn, r->out.info->info1);
|
||||
break;
|
||||
case 2:
|
||||
r->out.info->info2 = talloc_zero(ctx,struct dfs_Info2);
|
||||
if (!r->out.info->info2) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
ret = init_reply_dfs_info_2(ctx, jn, r->out.info->info2);
|
||||
break;
|
||||
case 3:
|
||||
r->out.info->info3 = talloc_zero(ctx,struct dfs_Info3);
|
||||
if (!r->out.info->info3) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
ret = init_reply_dfs_info_3(ctx, jn, r->out.info->info3);
|
||||
break;
|
||||
case 100:
|
||||
r->out.info->info100 = talloc_zero(ctx,struct dfs_Info100);
|
||||
if (!r->out.info->info100) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
ret = init_reply_dfs_info_100(ctx, jn, r->out.info->info100);
|
||||
break;
|
||||
|
@ -45,7 +45,7 @@ static WERROR fill_dsrole_dominfo_basic(TALLOC_CTX *ctx,
|
||||
basic = talloc_zero(ctx, struct dssetup_DsRolePrimaryDomInfoBasic);
|
||||
if (!basic) {
|
||||
DEBUG(0,("fill_dsrole_dominfo_basic: out of memory\n"));
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
switch (lp_server_role()) {
|
||||
@ -76,7 +76,7 @@ static WERROR fill_dsrole_dominfo_basic(TALLOC_CTX *ctx,
|
||||
if (lp_security() == SEC_ADS) {
|
||||
dnsdomain = talloc_strdup(ctx, lp_realm());
|
||||
if (!dnsdomain) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
if (!strlower_m(dnsdomain)) {
|
||||
return WERR_INVALID_PARAM;
|
||||
|
@ -126,7 +126,7 @@ bool eventlog_init_winreg(struct messaging_context *msg_ctx)
|
||||
|
||||
wkey.name = talloc_asprintf(tmp_ctx, "%s\\%s", key, *elogs);
|
||||
if (wkey.name == NULL) {
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@ bool eventlog_init_winreg(struct messaging_context *msg_ctx)
|
||||
"%s\\%s",
|
||||
wkey.name, *elogs);
|
||||
if (wkey.name == NULL) {
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -299,7 +299,7 @@ WERROR _netr_LogonControl2Ex(struct pipes_struct *p,
|
||||
|
||||
dc_name = talloc_asprintf(p->mem_ctx, "\\\\%s", dc_name2);
|
||||
if (!dc_name) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
tc_status = WERR_OK;
|
||||
@ -327,7 +327,7 @@ WERROR _netr_LogonControl2Ex(struct pipes_struct *p,
|
||||
|
||||
dc_name = talloc_asprintf(p->mem_ctx, "\\\\%s", dc_info->dc_unc);
|
||||
if (!dc_name) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
tc_status = WERR_OK;
|
||||
@ -1988,7 +1988,7 @@ static bool wb_getdcname(TALLOC_CTX *mem_ctx,
|
||||
*dcname = talloc_strdup(mem_ctx, dc_info->dc_name);
|
||||
wbcFreeMemory(dc_info);
|
||||
if (!*dcname) {
|
||||
*werr = WERR_NOMEM;
|
||||
*werr = WERR_NOT_ENOUGH_MEMORY;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2037,7 +2037,7 @@ WERROR _netr_GetDcName(struct pipes_struct *p,
|
||||
*r->out.dcname = talloc_strdup(p->mem_ctx, info->dc_unc);
|
||||
talloc_free(info);
|
||||
if (!*r->out.dcname) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
return WERR_OK;
|
||||
@ -2082,7 +2082,7 @@ WERROR _netr_GetAnyDCName(struct pipes_struct *p,
|
||||
*r->out.dcname = talloc_strdup(p->mem_ctx, info->dc_unc);
|
||||
talloc_free(info);
|
||||
if (!*r->out.dcname) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
return WERR_OK;
|
||||
@ -2446,19 +2446,19 @@ WERROR _netr_DsRGetForestTrustInformation(struct pipes_struct *p,
|
||||
info_ptr = talloc(p->mem_ctx, struct lsa_ForestTrustInformation *);
|
||||
if (info_ptr == NULL) {
|
||||
p->fault_state = DCERPC_FAULT_CANT_PERFORM;
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
info = talloc_zero(info_ptr, struct lsa_ForestTrustInformation);
|
||||
if (info == NULL) {
|
||||
p->fault_state = DCERPC_FAULT_CANT_PERFORM;
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
/* Fill forest trust information and expand UPN suffixes list */
|
||||
status = fill_forest_trust_array(p->mem_ctx, info);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
p->fault_state = DCERPC_FAULT_CANT_PERFORM;
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
*info_ptr = info;
|
||||
|
@ -61,7 +61,7 @@ WERROR _PNP_GetDeviceListSize(struct pipes_struct *p,
|
||||
}
|
||||
|
||||
if (!(devicepath = get_device_path(p->mem_ctx, r->in.devicename))) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
*r->out.size = strlen(devicepath) + 2;
|
||||
@ -89,7 +89,7 @@ WERROR _PNP_GetDeviceList(struct pipes_struct *p,
|
||||
}
|
||||
|
||||
if (!(devicepath = get_device_path(p->mem_ctx, r->in.filter))) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
size = strlen(devicepath) + 2;
|
||||
@ -100,13 +100,13 @@ WERROR _PNP_GetDeviceList(struct pipes_struct *p,
|
||||
|
||||
multi_sz = talloc_zero_array(p->mem_ctx, const char *, 2);
|
||||
if (!multi_sz) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
multi_sz[0] = devicepath;
|
||||
|
||||
if (!push_reg_multi_sz(multi_sz, &blob, multi_sz)) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
if (*r->in.length < blob.length/2) {
|
||||
@ -168,7 +168,7 @@ WERROR _PNP_GetDeviceRegProp(struct pipes_struct *p,
|
||||
r->out.buffer = (uint8_t *)talloc_memdup(p->mem_ctx, blob.data, blob.length);
|
||||
talloc_free(mem_ctx);
|
||||
if (!r->out.buffer) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
*r->out.reg_data_type = REG_SZ; /* always 1...tested using a remove device manager connection */
|
||||
|
@ -389,7 +389,7 @@ static WERROR delete_printer_hook(TALLOC_CTX *ctx, struct security_token *token,
|
||||
"%s \"%s\"",
|
||||
cmd, sharename);
|
||||
if (!command) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
if ( token )
|
||||
is_print_op = security_token_has_privilege(token, SEC_PRIV_PRINT_OPERATOR);
|
||||
@ -578,7 +578,7 @@ static WERROR set_printer_hnd_name(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
Printer->servername = talloc_asprintf(Printer, "\\\\%s", servername);
|
||||
if (Printer->servername == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
@ -624,7 +624,7 @@ static WERROR set_printer_hnd_name(TALLOC_CTX *mem_ctx,
|
||||
|
||||
cache_key = talloc_asprintf(talloc_tos(), "PRINTERNAME/%s", aprinter);
|
||||
if (cache_key == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -736,7 +736,7 @@ static WERROR open_printer_hnd(struct pipes_struct *p,
|
||||
|
||||
new_printer = talloc_zero(p->mem_ctx, struct printer_handle);
|
||||
if (new_printer == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
talloc_set_destructor(new_printer, printer_entry_destructor);
|
||||
|
||||
@ -1658,7 +1658,7 @@ static WERROR copy_devicemode(TALLOC_CTX *mem_ctx,
|
||||
|
||||
dm = talloc(mem_ctx, struct spoolss_DeviceMode);
|
||||
if (!dm) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
/* copy all values, then duplicate strings and structs */
|
||||
@ -1666,18 +1666,18 @@ static WERROR copy_devicemode(TALLOC_CTX *mem_ctx,
|
||||
|
||||
dm->devicename = talloc_strdup(dm, orig->devicename);
|
||||
if (!dm->devicename) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
dm->formname = talloc_strdup(dm, orig->formname);
|
||||
if (!dm->formname) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
if (orig->driverextra_data.data) {
|
||||
dm->driverextra_data.data =
|
||||
(uint8_t *) talloc_memdup(dm, orig->driverextra_data.data,
|
||||
orig->driverextra_data.length);
|
||||
if (!dm->driverextra_data.data) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1878,14 +1878,14 @@ WERROR _spoolss_OpenPrinterEx(struct pipes_struct *p,
|
||||
raddr = tsocket_address_inet_addr_string(p->remote_address,
|
||||
p->mem_ctx);
|
||||
if (raddr == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
rc = get_remote_hostname(p->remote_address,
|
||||
&rhost,
|
||||
p->mem_ctx);
|
||||
if (rc < 0) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
if (strequal(rhost, "UNKNOWN")) {
|
||||
rhost = raddr;
|
||||
@ -2085,7 +2085,7 @@ WERROR _spoolss_DeletePrinterDriver(struct pipes_struct *p,
|
||||
|
||||
tmp_ctx = talloc_new(p->mem_ctx);
|
||||
if (!tmp_ctx) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
status = winreg_printer_binding_handle(tmp_ctx,
|
||||
@ -2224,7 +2224,7 @@ WERROR _spoolss_DeletePrinterDriverEx(struct pipes_struct *p,
|
||||
|
||||
tmp_ctx = talloc_new(p->mem_ctx);
|
||||
if (!tmp_ctx) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
status = winreg_printer_binding_handle(tmp_ctx,
|
||||
@ -2712,7 +2712,7 @@ WERROR _spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct pipes_struct *p,
|
||||
(struct sockaddr *) &client_ss,
|
||||
sizeof(struct sockaddr_storage));
|
||||
if (client_len < 0) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
if(!srv_spoolss_replyopenprinter(snum, Printer->notify.localmachine,
|
||||
@ -3667,7 +3667,7 @@ static WERROR printer_notify_info(struct pipes_struct *p,
|
||||
*/
|
||||
pinfo2->servername = talloc_strdup(pinfo2, Printer->servername);
|
||||
if (pinfo2->servername == NULL) {
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto err_pdb_drop;
|
||||
}
|
||||
|
||||
@ -3750,7 +3750,7 @@ WERROR _spoolss_RouterRefreshPrinterChangeNotify(struct pipes_struct *p,
|
||||
/* we always have a spoolss_NotifyInfo struct */
|
||||
info = talloc_zero(p->mem_ctx, struct spoolss_NotifyInfo);
|
||||
if (!info) {
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -4088,7 +4088,7 @@ static WERROR construct_printer_info2(TALLOC_CTX *mem_ctx,
|
||||
|
||||
r->secdesc = security_descriptor_copy(mem_ctx, info2->secdesc);
|
||||
if (r->secdesc == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4114,7 +4114,7 @@ static WERROR construct_printer_info3(TALLOC_CTX *mem_ctx,
|
||||
|
||||
r->secdesc = security_descriptor_copy(mem_ctx, info2->secdesc);
|
||||
if (r->secdesc == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4218,7 +4218,7 @@ static WERROR construct_printer_info7(TALLOC_CTX *mem_ctx,
|
||||
WERROR werr;
|
||||
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
session_info = get_session_info_system();
|
||||
@ -4266,7 +4266,7 @@ static WERROR construct_printer_info7(TALLOC_CTX *mem_ctx,
|
||||
r->action = DSPRINT_UNPUBLISH;
|
||||
}
|
||||
if (r->guid == NULL) {
|
||||
werr = WERR_NOMEM;
|
||||
werr = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto out_tmp_free;
|
||||
}
|
||||
|
||||
@ -4342,7 +4342,7 @@ static WERROR enum_all_printers_info_level(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_new(mem_ctx);
|
||||
if (!tmp_ctx) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -4391,7 +4391,7 @@ static WERROR enum_all_printers_info_level(TALLOC_CTX *mem_ctx,
|
||||
union spoolss_PrinterInfo,
|
||||
count + 1);
|
||||
if (!info) {
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -4973,7 +4973,7 @@ static WERROR string_array_from_driver_info(TALLOC_CTX *mem_ctx,
|
||||
|
||||
if (!add_string_to_array(mem_ctx, str, &array, &num_strings)) {
|
||||
TALLOC_FREE(array);
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5629,7 +5629,7 @@ static WERROR construct_printer_driver_info_level(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_new(mem_ctx);
|
||||
if (!tmp_ctx) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx,
|
||||
@ -5897,13 +5897,13 @@ WERROR _spoolss_StartDocPrinter(struct pipes_struct *p,
|
||||
&rhost,
|
||||
p->mem_ctx);
|
||||
if (rc < 0) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
if (strequal(rhost,"UNKNOWN")) {
|
||||
rhost = tsocket_address_inet_addr_string(p->remote_address,
|
||||
p->mem_ctx);
|
||||
if (rhost == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
@ -6151,7 +6151,7 @@ static WERROR update_printer_sec(struct policy_handle *handle,
|
||||
|
||||
tmp_ctx = talloc_new(p->mem_ctx);
|
||||
if (!tmp_ctx) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx,
|
||||
@ -6211,7 +6211,7 @@ static WERROR update_printer_sec(struct policy_handle *handle,
|
||||
|
||||
new_secdesc = sec_desc_merge(tmp_ctx, secdesc_ctr->sd, old_secdesc);
|
||||
if (new_secdesc == NULL) {
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -6304,7 +6304,7 @@ static WERROR add_port_hook(TALLOC_CTX *ctx, struct security_token *token, const
|
||||
command = talloc_asprintf(ctx,
|
||||
"%s \"%s\" \"%s\"", cmd, portname, uri );
|
||||
if (!command) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
if ( token )
|
||||
@ -6448,7 +6448,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_new(mem_ctx);
|
||||
if (!tmp_ctx) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx,
|
||||
@ -6796,7 +6796,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
|
||||
longname = talloc_strdup(tmp_ctx, lp_netbios_name());
|
||||
}
|
||||
if (longname == NULL) {
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -6866,7 +6866,7 @@ static WERROR update_printer(struct pipes_struct *p,
|
||||
|
||||
tmp_ctx = talloc_new(p->mem_ctx);
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
if (!Printer) {
|
||||
@ -6925,7 +6925,7 @@ static WERROR update_printer(struct pipes_struct *p,
|
||||
raddr = tsocket_address_inet_addr_string(p->remote_address,
|
||||
p->mem_ctx);
|
||||
if (raddr == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
/* add_printer_hook() will call reload_services() */
|
||||
@ -7095,7 +7095,7 @@ WERROR _spoolss_SetPrinter(struct pipes_struct *p,
|
||||
|
||||
tmp_ctx = talloc_new(p->mem_ctx);
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
if (!get_printer_snum(p, r->in.handle, &snum, NULL)) {
|
||||
@ -7123,13 +7123,13 @@ WERROR _spoolss_SetPrinter(struct pipes_struct *p,
|
||||
old_printer->servername = talloc_strdup(tmp_ctx, r->in.info_ctr->info.info4->servername);
|
||||
if (old_printer->servername == NULL) {
|
||||
TALLOC_FREE(tmp_ctx);
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
old_printer->printername = talloc_strdup(tmp_ctx, r->in.info_ctr->info.info4->printername);
|
||||
if (old_printer->printername == NULL) {
|
||||
TALLOC_FREE(tmp_ctx);
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
old_printer->attributes = r->in.info_ctr->info.info4->attributes;
|
||||
@ -7137,7 +7137,7 @@ WERROR _spoolss_SetPrinter(struct pipes_struct *p,
|
||||
set_old_printer = talloc_zero(tmp_ctx, struct spoolss_SetPrinterInfo2);
|
||||
if (set_old_printer == NULL) {
|
||||
TALLOC_FREE(tmp_ctx);
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
spoolss_printerinfo2_to_setprinterinfo2(old_printer, set_old_printer);
|
||||
@ -7145,7 +7145,7 @@ WERROR _spoolss_SetPrinter(struct pipes_struct *p,
|
||||
info_ctr = talloc_zero(tmp_ctx, struct spoolss_SetPrinterInfoCtr);
|
||||
if (info_ctr == NULL) {
|
||||
TALLOC_FREE(tmp_ctx);
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
info_ctr->level = 2;
|
||||
@ -7355,7 +7355,7 @@ static WERROR enumjobs_level1(TALLOC_CTX *mem_ctx,
|
||||
|
||||
info = talloc_array(mem_ctx, union spoolss_JobInfo, num_queues);
|
||||
if (info == NULL) {
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
@ -7421,7 +7421,7 @@ static WERROR enumjobs_level2(TALLOC_CTX *mem_ctx,
|
||||
|
||||
info = talloc_array(mem_ctx, union spoolss_JobInfo, num_queues);
|
||||
if (info == NULL) {
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
@ -7496,7 +7496,7 @@ static WERROR enumjobs_level3(TALLOC_CTX *mem_ctx,
|
||||
|
||||
info = talloc_array(mem_ctx, union spoolss_JobInfo, num_queues);
|
||||
if (info == NULL) {
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
@ -7764,7 +7764,7 @@ static WERROR enumprinterdrivers_level_by_architecture(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_new(mem_ctx);
|
||||
if (!tmp_ctx) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx,
|
||||
@ -7793,7 +7793,7 @@ static WERROR enumprinterdrivers_level_by_architecture(TALLOC_CTX *mem_ctx,
|
||||
if (!info) {
|
||||
DEBUG(0,("enumprinterdrivers_level_by_architecture: "
|
||||
"failed to enlarge driver info buffer!\n"));
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
@ -8124,11 +8124,11 @@ static WERROR enumports_hook(TALLOC_CTX *ctx, int *count, char ***lines)
|
||||
|
||||
if ( !*cmd ) {
|
||||
if (!(qlines = talloc_array( NULL, char*, 2 ))) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
if (!(qlines[0] = talloc_strdup(qlines, SAMBA_PRINTER_PORT_NAME ))) {
|
||||
TALLOC_FREE(qlines);
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
qlines[1] = NULL;
|
||||
numlines = 1;
|
||||
@ -8138,7 +8138,7 @@ static WERROR enumports_hook(TALLOC_CTX *ctx, int *count, char ***lines)
|
||||
|
||||
command = talloc_asprintf(ctx, "%s \"%d\"", cmd, 1);
|
||||
if (!command) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
DEBUG(10,("Running [%s]\n", command));
|
||||
@ -8186,8 +8186,8 @@ static WERROR enumports_level_1(TALLOC_CTX *mem_ctx,
|
||||
if (numlines) {
|
||||
info = talloc_array(mem_ctx, union spoolss_PortInfo, numlines);
|
||||
if (!info) {
|
||||
DEBUG(10,("Returning WERR_NOMEM\n"));
|
||||
result = WERR_NOMEM;
|
||||
DEBUG(10,("Returning WERR_NOT_ENOUGH_MEMORY\n"));
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -8238,8 +8238,8 @@ static WERROR enumports_level_2(TALLOC_CTX *mem_ctx,
|
||||
if (numlines) {
|
||||
info = talloc_array(mem_ctx, union spoolss_PortInfo, numlines);
|
||||
if (!info) {
|
||||
DEBUG(10,("Returning WERR_NOMEM\n"));
|
||||
result = WERR_NOMEM;
|
||||
DEBUG(10,("Returning WERR_NOT_ENOUGH_MEMORY\n"));
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -8380,7 +8380,7 @@ static WERROR spoolss_addprinterex_level_2(struct pipes_struct *p,
|
||||
raddr = tsocket_address_inet_addr_string(p->remote_address,
|
||||
p->mem_ctx);
|
||||
if (raddr == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
if ( !add_printer_hook(p->mem_ctx, p->session_info->security_token,
|
||||
@ -8666,7 +8666,7 @@ static WERROR compose_spoolss_server_path(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
if (!*path) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
return WERR_OK;
|
||||
@ -8819,7 +8819,7 @@ WERROR _spoolss_EnumPrinterData(struct pipes_struct *p,
|
||||
*r->out.value_needed = 1;
|
||||
r->out.value_name = talloc_strdup(r, "");
|
||||
if (!r->out.value_name) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
} else {
|
||||
r->out.value_name = NULL;
|
||||
@ -8845,7 +8845,7 @@ WERROR _spoolss_EnumPrinterData(struct pipes_struct *p,
|
||||
if (r->in.value_offered) {
|
||||
r->out.value_name = talloc_strdup(r, val->value_name);
|
||||
if (!r->out.value_name) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
*r->out.value_needed = val->value_name_len;
|
||||
} else {
|
||||
@ -8997,7 +8997,7 @@ WERROR _spoolss_AddForm(struct pipes_struct *p,
|
||||
|
||||
tmp_ctx = talloc_new(p->mem_ctx);
|
||||
if (!tmp_ctx) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
status = winreg_printer_binding_handle(tmp_ctx,
|
||||
@ -9062,7 +9062,7 @@ WERROR _spoolss_DeleteForm(struct pipes_struct *p,
|
||||
|
||||
tmp_ctx = talloc_new(p->mem_ctx);
|
||||
if (!tmp_ctx) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
status = winreg_printer_binding_handle(tmp_ctx,
|
||||
@ -9141,7 +9141,7 @@ WERROR _spoolss_SetForm(struct pipes_struct *p,
|
||||
|
||||
tmp_ctx = talloc_new(p->mem_ctx);
|
||||
if (!tmp_ctx) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
status = winreg_printer_binding_handle(tmp_ctx,
|
||||
@ -9776,7 +9776,7 @@ WERROR _spoolss_GetPrinterDataEx(struct pipes_struct *p,
|
||||
|
||||
tmp_ctx = talloc_new(p->mem_ctx);
|
||||
if (!tmp_ctx) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
if (!Printer) {
|
||||
@ -9938,7 +9938,7 @@ WERROR _spoolss_SetPrinterDataEx(struct pipes_struct *p,
|
||||
|
||||
tmp_ctx = talloc_new(p->mem_ctx);
|
||||
if (!tmp_ctx) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx,
|
||||
@ -9980,7 +9980,7 @@ WERROR _spoolss_SetPrinterDataEx(struct pipes_struct *p,
|
||||
char *str = talloc_asprintf(tmp_ctx, "%s\\%s",
|
||||
r->in.key_name, SPOOL_OID_KEY);
|
||||
if (!str) {
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -10037,7 +10037,7 @@ WERROR _spoolss_DeletePrinterDataEx(struct pipes_struct *p,
|
||||
}
|
||||
|
||||
if (!r->in.value_name || !r->in.key_name) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
if (!get_printer_snum(p, r->in.handle, &snum, NULL)) {
|
||||
@ -10099,7 +10099,7 @@ WERROR _spoolss_EnumPrinterKey(struct pipes_struct *p,
|
||||
}
|
||||
|
||||
if (!push_reg_multi_sz(p->mem_ctx, &blob, array)) {
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -10164,7 +10164,7 @@ WERROR _spoolss_DeletePrinterKey(struct pipes_struct *p,
|
||||
|
||||
tmp_ctx = talloc_new(p->mem_ctx);
|
||||
if (!tmp_ctx) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
status = winreg_printer_binding_handle(tmp_ctx,
|
||||
@ -10331,7 +10331,7 @@ WERROR _spoolss_GetPrintProcessorDirectory(struct pipes_struct *p,
|
||||
|
||||
snum = find_service(talloc_tos(), "prnproc$", &prnproc_share);
|
||||
if (!prnproc_share) {
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto err_info_free;
|
||||
}
|
||||
if (snum != -1) {
|
||||
@ -10393,7 +10393,7 @@ static WERROR xcvtcp_monitorui(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
if (!push_monitorui_buf(mem_ctx, out, dllname)) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
return WERR_OK;
|
||||
@ -10463,7 +10463,7 @@ static WERROR xcvtcp_addport(TALLOC_CTX *mem_ctx,
|
||||
ZERO_STRUCT(port1);
|
||||
|
||||
if (!pull_port_data_1(mem_ctx, &port1, in)) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
portname = port1.portname;
|
||||
@ -10477,7 +10477,7 @@ static WERROR xcvtcp_addport(TALLOC_CTX *mem_ctx,
|
||||
ZERO_STRUCT(port2);
|
||||
|
||||
if (!pull_port_data_2(mem_ctx, &port2, in)) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
portname = port2.portname;
|
||||
@ -10512,7 +10512,7 @@ static WERROR xcvtcp_addport(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
if (!device_uri) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
return add_port_hook(mem_ctx, token, portname, device_uri);
|
||||
@ -10562,7 +10562,7 @@ static WERROR xcvlocal_monitorui(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
if (!push_monitorui_buf(mem_ctx, out, dllname)) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
return WERR_OK;
|
||||
@ -10638,7 +10638,7 @@ WERROR _spoolss_XcvData(struct pipes_struct *p,
|
||||
if (r->in.out_data_size) {
|
||||
out_data = data_blob_talloc_zero(p->mem_ctx, r->in.out_data_size);
|
||||
if (out_data.data == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ WERROR winreg_printer_binding_handle(TALLOC_CTX *mem_ctx,
|
||||
0,
|
||||
&local);
|
||||
if (rc < 0) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
status = rpcint_binding_handle(mem_ctx,
|
||||
@ -73,7 +73,7 @@ WERROR winreg_delete_printer_key_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -102,7 +102,7 @@ WERROR winreg_printer_update_changeid_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -131,7 +131,7 @@ WERROR winreg_printer_get_changeid_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -161,7 +161,7 @@ WERROR winreg_get_printer_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -190,7 +190,7 @@ WERROR winreg_create_printer_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -222,7 +222,7 @@ WERROR winreg_update_printer_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -259,7 +259,7 @@ WERROR winreg_set_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -295,7 +295,7 @@ WERROR winreg_enum_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -331,7 +331,7 @@ WERROR winreg_get_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -366,7 +366,7 @@ WERROR winreg_delete_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -399,7 +399,7 @@ WERROR winreg_get_driver_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -433,7 +433,7 @@ WERROR winreg_get_driver_list_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -465,7 +465,7 @@ WERROR winreg_del_driver_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -496,7 +496,7 @@ WERROR winreg_add_driver_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -527,7 +527,7 @@ WERROR winreg_get_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -557,7 +557,7 @@ WERROR winreg_set_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -587,7 +587,7 @@ WERROR winreg_printer_enumforms1_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -617,7 +617,7 @@ WERROR winreg_printer_getform1_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -646,7 +646,7 @@ WERROR winreg_printer_addform1_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -675,7 +675,7 @@ WERROR winreg_printer_setform1_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -704,7 +704,7 @@ WERROR winreg_printer_deleteform1_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
@ -735,7 +735,7 @@ WERROR winreg_enum_printer_key_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
tmp_ctx = talloc_stackframe();
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b);
|
||||
|
@ -1094,7 +1094,7 @@ static WERROR init_srv_conn_info_0(struct srvsvc_NetConnCtr0 *ctr0,
|
||||
struct srvsvc_NetConnInfo0,
|
||||
num_entries+1);
|
||||
if (!ctr0->array) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
ctr0->array[num_entries].conn_id = *total_entries;
|
||||
@ -1152,7 +1152,7 @@ static WERROR init_srv_conn_info_1(const char *name,
|
||||
snum = find_service(talloc_tos(), name, &share_name);
|
||||
|
||||
if (!share_name) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
if (snum < 0) {
|
||||
@ -1328,7 +1328,7 @@ WERROR _srvsvc_NetSrvGetInfo(struct pipes_struct *p,
|
||||
|
||||
info102 = talloc(p->mem_ctx, struct srvsvc_NetSrvInfo102);
|
||||
if (!info102) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
info102->platform_id = PLATFORM_ID_NT;
|
||||
@ -1354,7 +1354,7 @@ WERROR _srvsvc_NetSrvGetInfo(struct pipes_struct *p,
|
||||
|
||||
info101 = talloc(p->mem_ctx, struct srvsvc_NetSrvInfo101);
|
||||
if (!info101) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
info101->platform_id = PLATFORM_ID_NT;
|
||||
@ -1373,7 +1373,7 @@ WERROR _srvsvc_NetSrvGetInfo(struct pipes_struct *p,
|
||||
|
||||
info100 = talloc(p->mem_ctx, struct srvsvc_NetSrvInfo100);
|
||||
if (!info100) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
info100->platform_id = PLATFORM_ID_NT;
|
||||
@ -1631,7 +1631,7 @@ WERROR _srvsvc_NetShareGetInfo(struct pipes_struct *p,
|
||||
|
||||
snum = find_service(talloc_tos(), r->in.share_name, &share_name);
|
||||
if (!share_name) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
if (snum < 0) {
|
||||
return WERR_INVALID_NAME;
|
||||
@ -1748,7 +1748,7 @@ WERROR _srvsvc_NetShareSetInfo(struct pipes_struct *p,
|
||||
|
||||
snum = find_service(talloc_tos(), r->in.share_name, &share_name);
|
||||
if (!share_name) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
/* Does this share exist ? */
|
||||
@ -1855,7 +1855,7 @@ WERROR _srvsvc_NetShareSetInfo(struct pipes_struct *p,
|
||||
}
|
||||
|
||||
if (comment == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
/* Check if the pathname is valid. */
|
||||
@ -1894,7 +1894,7 @@ WERROR _srvsvc_NetShareSetInfo(struct pipes_struct *p,
|
||||
max_connections,
|
||||
csc_policy);
|
||||
if (!command) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
DEBUG(10,("_srvsvc_NetShareSetInfo: Running [%s]\n", command ));
|
||||
@ -2049,7 +2049,7 @@ WERROR _srvsvc_NetShareAdd(struct pipes_struct *p,
|
||||
|
||||
snum = find_service(ctx, share_name_in, &share_name);
|
||||
if (!share_name) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
/* Share already exists. */
|
||||
@ -2094,7 +2094,7 @@ WERROR _srvsvc_NetShareAdd(struct pipes_struct *p,
|
||||
comment ? comment : "",
|
||||
max_connections);
|
||||
if (!command) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
DEBUG(10,("_srvsvc_NetShareAdd: Running [%s]\n", command ));
|
||||
@ -2176,7 +2176,7 @@ WERROR _srvsvc_NetShareDel(struct pipes_struct *p,
|
||||
|
||||
snum = find_service(talloc_tos(), r->in.share_name, &share_name);
|
||||
if (!share_name) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
if (snum < 0) {
|
||||
@ -2203,7 +2203,7 @@ WERROR _srvsvc_NetShareDel(struct pipes_struct *p,
|
||||
get_dyn_CONFIGFILE(),
|
||||
share_name);
|
||||
if (!command) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
DEBUG(10,("_srvsvc_NetShareDel: Running [%s]\n", command ));
|
||||
@ -2274,7 +2274,7 @@ WERROR _srvsvc_NetRemoteTOD(struct pipes_struct *p,
|
||||
DEBUG(5,("_srvsvc_NetRemoteTOD: %d\n", __LINE__));
|
||||
|
||||
if ( !(tod = talloc_zero(p->mem_ctx, struct srvsvc_NetRemoteTODInfo)) )
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
|
||||
*r->out.info = tod;
|
||||
|
||||
@ -2330,7 +2330,7 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p,
|
||||
}
|
||||
snum = find_service(talloc_tos(), r->in.share, &servicename);
|
||||
if (!servicename) {
|
||||
werr = WERR_NOMEM;
|
||||
werr = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto error_exit;
|
||||
}
|
||||
if (snum == -1) {
|
||||
@ -2393,7 +2393,7 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p,
|
||||
|
||||
sd_buf = talloc_zero(p->mem_ctx, struct sec_desc_buf);
|
||||
if (!sd_buf) {
|
||||
werr = WERR_NOMEM;
|
||||
werr = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
@ -2479,7 +2479,7 @@ WERROR _srvsvc_NetSetFileSecurity(struct pipes_struct *p,
|
||||
|
||||
snum = find_service(talloc_tos(), r->in.share, &servicename);
|
||||
if (!servicename) {
|
||||
werr = WERR_NOMEM;
|
||||
werr = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ static WERROR create_open_service_handle(struct pipes_struct *p,
|
||||
struct service_control_op *s_op;
|
||||
|
||||
if ( !(info = talloc_zero( NULL, SERVICE_INFO )) )
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
|
||||
/* the Service Manager has a NULL name */
|
||||
|
||||
@ -239,7 +239,7 @@ static WERROR create_open_service_handle(struct pipes_struct *p,
|
||||
info->ops = s_op->ops;
|
||||
|
||||
if ( !(info->name = talloc_strdup( info, s_op->name )) ) {
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
break;
|
||||
@ -279,7 +279,7 @@ WERROR _svcctl_OpenSCManagerW(struct pipes_struct *p,
|
||||
/* perform access checks */
|
||||
|
||||
if ( !(sec_desc = construct_scm_sd( p->mem_ctx )) )
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
|
||||
se_map_generic( &r->in.access_mask, &scm_generic_map );
|
||||
status = svcctl_access_check( sec_desc, p->session_info->security_token,
|
||||
@ -304,7 +304,7 @@ WERROR _svcctl_OpenServiceW(struct pipes_struct *p,
|
||||
|
||||
service = r->in.ServiceName;
|
||||
if (!service) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
DEBUG(5, ("_svcctl_OpenServiceW: Attempting to open Service [%s], \n", service));
|
||||
|
||||
@ -324,7 +324,7 @@ WERROR _svcctl_OpenServiceW(struct pipes_struct *p,
|
||||
if (sec_desc == NULL) {
|
||||
DEBUG(0, ("_svcctl_OpenServiceW: Failed to get a valid security "
|
||||
"descriptor"));
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
se_map_generic( &r->in.access_mask, &svc_generic_map );
|
||||
@ -473,7 +473,7 @@ WERROR _svcctl_EnumServicesStatusW(struct pipes_struct *p,
|
||||
p->session_info,
|
||||
&services);
|
||||
if (num_services == -1 ) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
for ( i=0; i<num_services; i++ ) {
|
||||
@ -922,7 +922,7 @@ WERROR _svcctl_QueryServiceObjectSecurity(struct pipes_struct *p,
|
||||
get_session_info_system(),
|
||||
info->name);
|
||||
if (sec_desc == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
*r->out.needed = ndr_size_security_descriptor(sec_desc, 0);
|
||||
|
@ -487,7 +487,7 @@ static bool svcctl_add_service(TALLOC_CTX *mem_ctx,
|
||||
ZERO_STRUCT(wkey);
|
||||
wkey.name = talloc_asprintf(mem_ctx, "%s\\%s\\Security", key, name);
|
||||
if (wkey.name == NULL) {
|
||||
result = WERR_NOMEM;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ WERROR _winreg_QueryValue(struct pipes_struct *p,
|
||||
{
|
||||
if (strequal(r->in.value_name->name, "Global")) {
|
||||
if (!prs_init(&prs_hkpd, *r->in.data_size, p->mem_ctx, MARSHALL))
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
status = reg_perfcount_get_hkpd(
|
||||
&prs_hkpd, *r->in.data_size, &outbuf_size, NULL);
|
||||
outbuf = (uint8_t *)prs_hkpd.data_p;
|
||||
@ -290,7 +290,7 @@ WERROR _winreg_QueryValue(struct pipes_struct *p,
|
||||
/* we probably have a request for a specific object
|
||||
* here */
|
||||
if (!prs_init(&prs_hkpd, *r->in.data_size, p->mem_ctx, MARSHALL))
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
status = reg_perfcount_get_hkpd(
|
||||
&prs_hkpd, *r->in.data_size, &outbuf_size,
|
||||
r->in.value_name->name);
|
||||
@ -532,7 +532,7 @@ WERROR _winreg_InitiateSystemShutdownEx(struct pipes_struct *p,
|
||||
|
||||
shutdown_script = lp_shutdown_script(p->mem_ctx);
|
||||
if (!shutdown_script) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
if (!*shutdown_script) {
|
||||
return WERR_ACCESS_DENIED;
|
||||
@ -542,11 +542,11 @@ WERROR _winreg_InitiateSystemShutdownEx(struct pipes_struct *p,
|
||||
|
||||
if ( r->in.message && r->in.message->string ) {
|
||||
if ( (msg = talloc_strdup(p->mem_ctx, r->in.message->string )) == NULL ) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
chkmsg = talloc_array(p->mem_ctx, char, strlen(msg)+1);
|
||||
if (!chkmsg) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
alpha_strcpy(chkmsg, msg, NULL, strlen(msg)+1);
|
||||
}
|
||||
@ -559,27 +559,27 @@ WERROR _winreg_InitiateSystemShutdownEx(struct pipes_struct *p,
|
||||
shutdown_script = talloc_all_string_sub(p->mem_ctx,
|
||||
shutdown_script, "%z", chkmsg ? chkmsg : "");
|
||||
if (!shutdown_script) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
shutdown_script = talloc_all_string_sub(p->mem_ctx,
|
||||
shutdown_script, "%t", str_timeout);
|
||||
if (!shutdown_script) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
shutdown_script = talloc_all_string_sub(p->mem_ctx,
|
||||
shutdown_script, "%r", do_reboot);
|
||||
if (!shutdown_script) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
shutdown_script = talloc_all_string_sub(p->mem_ctx,
|
||||
shutdown_script, "%f", f);
|
||||
if (!shutdown_script) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
shutdown_script = talloc_all_string_sub(p->mem_ctx,
|
||||
shutdown_script, "%x", str_reason);
|
||||
if (!shutdown_script) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
can_shutdown = security_token_has_privilege(p->session_info->security_token, SEC_PRIV_REMOTE_SHUTDOWN);
|
||||
@ -698,7 +698,7 @@ WERROR _winreg_RestoreKey(struct pipes_struct *p,
|
||||
|
||||
fname = talloc_strdup(p->mem_ctx, r->in.filename->name);
|
||||
if (!fname) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
DEBUG(8,("_winreg_RestoreKey: verifying restore of key [%s] from "
|
||||
@ -738,7 +738,7 @@ WERROR _winreg_SaveKey(struct pipes_struct *p,
|
||||
|
||||
fname = talloc_strdup(p->mem_ctx, r->in.filename->name);
|
||||
if (!fname) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
DEBUG(8,("_winreg_SaveKey: verifying backup of key [%s] to \"%s\"\n",
|
||||
@ -816,7 +816,7 @@ WERROR _winreg_SetValue(struct pipes_struct *p,
|
||||
|
||||
val = talloc_zero(p->mem_ctx, struct registry_value);
|
||||
if (val == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
val->type = r->in.type;
|
||||
@ -1027,12 +1027,12 @@ static WERROR construct_multiple_entry(TALLOC_CTX *mem_ctx,
|
||||
{
|
||||
r->ve_valuename = talloc_zero(mem_ctx, struct winreg_ValNameBuf);
|
||||
if (r->ve_valuename == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
r->ve_valuename->name = talloc_strdup(r->ve_valuename, valuename ? valuename : "");
|
||||
if (r->ve_valuename->name == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
r->ve_valuename->size = strlen_m_term(r->ve_valuename->name)*2;
|
||||
@ -1064,7 +1064,7 @@ WERROR _winreg_QueryMultipleValues2(struct pipes_struct *p,
|
||||
|
||||
names = talloc_zero_array(p->mem_ctx, const char *, r->in.num_values);
|
||||
if (names == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
for (i=0; i < r->in.num_values; i++) {
|
||||
@ -1073,7 +1073,7 @@ WERROR _winreg_QueryMultipleValues2(struct pipes_struct *p,
|
||||
names[i] = talloc_strdup(names,
|
||||
r->in.values_in[i].ve_valuename->name);
|
||||
if (names[i] == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1094,7 +1094,7 @@ WERROR _winreg_QueryMultipleValues2(struct pipes_struct *p,
|
||||
if (!data_blob_append(p->mem_ctx, &result,
|
||||
vals[i].data.data,
|
||||
vals[i].data.length)) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -351,7 +351,7 @@ WERROR _wkssvc_NetWkstaGetInfo(struct pipes_struct *p,
|
||||
* so no access checks are needed for this case */
|
||||
r->out.info->info100 = create_wks_info_100(p->mem_ctx);
|
||||
if (r->out.info->info100 == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
break;
|
||||
case 101:
|
||||
@ -370,7 +370,7 @@ WERROR _wkssvc_NetWkstaGetInfo(struct pipes_struct *p,
|
||||
}
|
||||
r->out.info->info101 = create_wks_info_101(p->mem_ctx);
|
||||
if (r->out.info->info101 == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
break;
|
||||
case 102:
|
||||
@ -388,7 +388,7 @@ WERROR _wkssvc_NetWkstaGetInfo(struct pipes_struct *p,
|
||||
}
|
||||
r->out.info->info102 = create_wks_info_102(p->mem_ctx);
|
||||
if (r->out.info->info102 == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -575,7 +575,7 @@ WERROR _wkssvc_NetWkstaEnumUsers(struct pipes_struct *p,
|
||||
case 0:
|
||||
r->out.info->ctr.user0 = create_enum_users0(p->mem_ctx);
|
||||
if (r->out.info->ctr.user0 == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
r->out.info->level = r->in.info->level;
|
||||
*r->out.entries_read = r->out.info->ctr.user0->entries_read;
|
||||
@ -586,7 +586,7 @@ WERROR _wkssvc_NetWkstaEnumUsers(struct pipes_struct *p,
|
||||
case 1:
|
||||
r->out.info->ctr.user1 = create_enum_users1(p->mem_ctx);
|
||||
if (r->out.info->ctr.user1 == NULL) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
r->out.info->level = r->in.info->level;
|
||||
*r->out.entries_read = r->out.info->ctr.user1->entries_read;
|
||||
@ -869,7 +869,7 @@ WERROR _wkssvc_NetrJoinDomain2(struct pipes_struct *p,
|
||||
&admin_domain,
|
||||
&admin_account);
|
||||
if (!ok) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
werr = libnet_init_JoinCtx(p->mem_ctx, &j);
|
||||
@ -952,7 +952,7 @@ WERROR _wkssvc_NetrUnjoinDomain2(struct pipes_struct *p,
|
||||
&admin_domain,
|
||||
&admin_account);
|
||||
if (!ok) {
|
||||
return WERR_NOMEM;
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
werr = libnet_init_UnjoinCtx(p->mem_ctx, &u);
|
||||
|
Loading…
Reference in New Issue
Block a user