summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-08-29 13:07:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:03:10 -0500
commit0b91f3916430d0271eab867675d44c5439de40c2 (patch)
tree8740c4d73ec89cd60125117ed45e80b771e9e06b /source4/librpc/rpc
parentb867b3c1470ee260fe2fd14f628728f01f7917ac (diff)
downloadsamba-0b91f3916430d0271eab867675d44c5439de40c2.tar.gz
samba-0b91f3916430d0271eab867675d44c5439de40c2.tar.bz2
samba-0b91f3916430d0271eab867675d44c5439de40c2.zip
r24780: More work allowing libutil to be used by external users.
(This used to be commit 31993cf67b816a184a4a4e92ef8ca2532c797190)
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r--source4/librpc/rpc/dcerpc.c14
-rw-r--r--source4/librpc/rpc/dcerpc_smb2.c7
2 files changed, 9 insertions, 12 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index ed9eb7da78..984cc20fbc 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -429,10 +429,9 @@ static NTSTATUS ncacn_push_request_sign(struct dcerpc_connection *c,
return status;
}
blob->length -= c->security_state.auth_info->credentials.length;
- status = data_blob_append(mem_ctx, blob,
- creds2.data, creds2.length);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
+ if (!data_blob_append(mem_ctx, blob,
+ creds2.data, creds2.length)) {
+ return NT_STATUS_NO_MEMORY;
}
dcerpc_set_auth_length(blob, creds2.length);
if (c->security_state.auth_info->credentials.length == 0) {
@@ -457,10 +456,9 @@ static NTSTATUS ncacn_push_request_sign(struct dcerpc_connection *c,
return status;
}
blob->length -= c->security_state.auth_info->credentials.length;
- status = data_blob_append(mem_ctx, blob,
- creds2.data, creds2.length);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
+ if (!data_blob_append(mem_ctx, blob,
+ creds2.data, creds2.length)) {
+ return NT_STATUS_NO_MEMORY;
}
dcerpc_set_auth_length(blob, creds2.length);
if (c->security_state.auth_info->credentials.length == 0) {
diff --git a/source4/librpc/rpc/dcerpc_smb2.c b/source4/librpc/rpc/dcerpc_smb2.c
index 53f731f8b3..dcfee1f223 100644
--- a/source4/librpc/rpc/dcerpc_smb2.c
+++ b/source4/librpc/rpc/dcerpc_smb2.c
@@ -92,10 +92,9 @@ static void smb2_read_callback(struct smb2_request *req)
return;
}
- status = data_blob_append(state, &state->data,
- io.out.data.data, io.out.data.length);
- if (NT_STATUS_IS_ERR(status)) {
- pipe_dead(state->c, status);
+ if (!data_blob_append(state, &state->data,
+ io.out.data.data, io.out.data.length)) {
+ pipe_dead(state->c, NT_STATUS_NO_MEMORY);
talloc_free(state);
return;
}