auth_info = user_auth_info_init(ctx);
if (!auth_info) {
- return WERR_NOMEM;
+ return WERR_NOT_ENOUGH_MEMORY;
}
auth_info->signing_state = SMB_SIGNING_IPC_DEFAULT;
set_cmdline_auth_info_use_kerberos(auth_info, ctx->use_kerberos);
p = talloc_zero(ctx, struct client_ipc_connection);
if (p == NULL) {
- return WERR_NOMEM;
+ return WERR_NOT_ENOUGH_MEMORY;
}
p->cli = cli_ipc;
}
if (NetApiBufferAllocate(strlen_m_term(dcname), &buffer)) {
- werr = WERR_NOMEM;
+ werr = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
memcpy(buffer, dcname, strlen_m_term(dcname));
}
if (NetApiBufferAllocate(strlen_m_term(dcname), &buffer)) {
- werr = WERR_NOMEM;
+ werr = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
memcpy(buffer, dcname, strlen_m_term(dcname));
break;
case 3:
if (!sid_compose(&sid, domain_sid, rid)) {
- return WERR_NOMEM;
+ return WERR_NOT_ENOUGH_MEMORY;
}
info3.grpi3_name = info->name.string;
struct dom_sid sid;
if (!sid_compose(&sid, domain_sid, groups->entries[i].rid)) {
- return WERR_NOMEM;
+ return WERR_NOT_ENOUGH_MEMORY;
}
g3[i].grpi3_name = talloc_strdup(mem_ctx,
lsa_names = talloc_array(ctx, struct lsa_String, r->in.num_entries);
if (!lsa_names) {
- werr = WERR_NOMEM;
+ werr = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
*r->out.name_buffer = talloc_strdup(ctx, lp_workgroup());
}
if (!*r->out.name_buffer) {
- return WERR_NOMEM;
+ return WERR_NOT_ENOUGH_MEMORY;
}
switch (lp_server_role()) {
priv = talloc_zero(ctx, struct libnetapi_private_ctx);
if (!priv) {
- return W_ERROR_V(WERR_NOMEM);
+ return W_ERROR_V(WERR_NOT_ENOUGH_MEMORY);
}
ctx->private_data = priv;
ctx = talloc_zero(frame, struct libnetapi_ctx);
if (!ctx) {
TALLOC_FREE(frame);
- return W_ERROR_V(WERR_NOMEM);
+ return W_ERROR_V(WERR_NOT_ENOUGH_MEMORY);
}
BlockSignals(True, SIGPIPE);
if (!ctx->username) {
TALLOC_FREE(frame);
fprintf(stderr, "libnetapi_init: out of memory\n");
- return W_ERROR_V(WERR_NOMEM);
+ return W_ERROR_V(WERR_NOT_ENOUGH_MEMORY);
}
status = libnetapi_init_private_context(ctx);
ctx->username = talloc_strdup(ctx, username ? username : "");
if (!ctx->username) {
- return W_ERROR_V(WERR_NOMEM);
+ return W_ERROR_V(WERR_NOT_ENOUGH_MEMORY);
}
return NET_API_STATUS_SUCCESS;
}
TALLOC_FREE(ctx->password);
ctx->password = talloc_strdup(ctx, password);
if (!ctx->password) {
- return W_ERROR_V(WERR_NOMEM);
+ return W_ERROR_V(WERR_NOT_ENOUGH_MEMORY);
}
return NET_API_STATUS_SUCCESS;
}
TALLOC_FREE(ctx->workgroup);
ctx->workgroup = talloc_strdup(ctx, workgroup);
if (!ctx->workgroup) {
- return W_ERROR_V(WERR_NOMEM);
+ return W_ERROR_V(WERR_NOT_ENOUGH_MEMORY);
}
return NET_API_STATUS_SUCCESS;
}
va_end(args);
if (!ctx->error_string) {
- return W_ERROR_V(WERR_NOMEM);
+ return W_ERROR_V(WERR_NOT_ENOUGH_MEMORY);
}
return NET_API_STATUS_SUCCESS;
}
buf = talloc_size(NULL, byte_count);
if (!buf) {
- return W_ERROR_V(WERR_NOMEM);
+ return W_ERROR_V(WERR_NOT_ENOUGH_MEMORY);
}
done:
*buffer = (uint8_t *)talloc_memdup(ctx, &i, sizeof(i));
if (!*buffer) {
- return WERR_NOMEM;
+ return WERR_NOT_ENOUGH_MEMORY;
}
return WERR_OK;
info1005.sv1005_comment = lp_server_string(ctx);
*buffer = (uint8_t *)talloc_memdup(ctx, &info1005, sizeof(info1005));
if (!*buffer) {
- return WERR_NOMEM;
+ return WERR_NOT_ENOUGH_MEMORY;
}
return WERR_OK;
info->entries[i].idx;
if (!user[i].usri1_name) {
- return WERR_NOMEM;
+ return WERR_NOT_ENOUGH_MEMORY;
}
}
info->entries[i].idx;
if (!machine[i].usri2_name) {
- return WERR_NOMEM;
+ return WERR_NOT_ENOUGH_MEMORY;
}
}
info->entries[i].idx;
if (!group[i].grpi3_name) {
- return WERR_NOMEM;
+ return WERR_NOT_ENOUGH_MEMORY;
}
}
rids = talloc_array(ctx, uint32_t, rid_array->count);
if (!rids) {
- werr = WERR_NOMEM;
+ werr = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
lsa_names = talloc_array(ctx, struct lsa_String, r->in.num_entries);
if (!lsa_names) {
- werr = WERR_NOMEM;
+ werr = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
}
if (!sid_compose(&user_sid, domain_sid, user_rids.ids[0])) {
- werr = WERR_NOMEM;
+ werr = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
sid_array.num_sids = rid_array->count + 1;
sid_array.sids = talloc_array(ctx, struct lsa_SidPtr, sid_array.num_sids);
if (!sid_array.sids) {
- werr = WERR_NOMEM;
+ werr = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
sid_array.sids[0].sid = dom_sid_dup(ctx, &user_sid);
if (!sid_array.sids[0].sid) {
- werr = WERR_NOMEM;
+ werr = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
struct dom_sid sid;
if (!sid_compose(&sid, domain_sid, rid_array->rids[i].rid)) {
- werr = WERR_NOMEM;
+ werr = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
sid_array.sids[i+1].sid = dom_sid_dup(ctx, &sid);
if (!sid_array.sids[i+1].sid) {
- werr = WERR_NOMEM;
+ werr = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
}
for (i=0; i < domain_rids.count; i++) {
if (!add_rid_to_array_unique(ctx, domain_rids.ids[i],
&rids, &num_rids)) {
- werr = WERR_NOMEM;
+ werr = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
}
for (i=0; i < builtin_rids.count; i++) {
if (!add_rid_to_array_unique(ctx, builtin_rids.ids[i],
&rids, &num_rids)) {
- werr = WERR_NOMEM;
+ werr = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
}