summaryrefslogtreecommitdiff
path: root/source4/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source4/utils')
-rw-r--r--source4/utils/getntacl.c6
-rw-r--r--source4/utils/ntlm_auth.c5
2 files changed, 6 insertions, 5 deletions
diff --git a/source4/utils/getntacl.c b/source4/utils/getntacl.c
index 942183de3e..98aec2804e 100644
--- a/source4/utils/getntacl.c
+++ b/source4/utils/getntacl.c
@@ -65,12 +65,12 @@ static NTSTATUS get_ntacl(char *filename, struct xattr_NTACL **ntacl,
}
blob.data = talloc_size(*ntacl, size);
- blob.length = getxattr(filename, XATTR_NTACL_NAME, blob.data, size);
-
- if (blob.length < 0) {
+ size = getxattr(filename, XATTR_NTACL_NAME, blob.data, size);
+ if (size < 0) {
fprintf(stderr, "get_ntacl: %s\n", strerror(errno));
return NT_STATUS_INTERNAL_ERROR;
}
+ blob.length = size;
ndr = ndr_pull_init_blob(&blob, NULL);
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c
index 79267882fa..5841adbf40 100644
--- a/source4/utils/ntlm_auth.c
+++ b/source4/utils/ntlm_auth.c
@@ -455,7 +455,8 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode,
char *grouplist = NULL;
struct auth_session_info *session_info;
- if (!NT_STATUS_IS_OK(gensec_session_info(state->gensec_state, &session_info))) {
+ nt_status = gensec_session_info(state->gensec_state, &session_info);
+ if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(1, ("gensec_session_info failed: %s\n", nt_errstr(nt_status)));
mux_printf(mux_id, "BH %s\n", nt_errstr(nt_status));
data_blob_free(&in);
@@ -759,7 +760,7 @@ static void manage_squid_request(enum stdio_helper_mode helper_mode,
stdio_helper_function fn, void **private2)
{
char buf[SQUID_BUFFER_SIZE+1];
- unsigned int mux_id;
+ unsigned int mux_id = 0;
int length;
char *c;
static BOOL err;