diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-04-02 11:18:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:59:43 -0500 |
commit | 64587cbf9eec5b44bd4b78c5e87d84d2ce7c344a (patch) | |
tree | ebfbd3cbc00aa8330c8ea01f639a5d319aa6ed6f /source4 | |
parent | f53e12b41b8d669c175536449fc676389cc3dd57 (diff) | |
download | samba-64587cbf9eec5b44bd4b78c5e87d84d2ce7c344a.tar.gz samba-64587cbf9eec5b44bd4b78c5e87d84d2ce7c344a.tar.xz samba-64587cbf9eec5b44bd4b78c5e87d84d2ce7c344a.zip |
r14858: fix bugs noticed by the ibm code checker
metze
(This used to be commit 152e7e3d024cbc1ae60f8595507d39b647551a71)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/utils/getntacl.c | 6 | ||||
-rw-r--r-- | source4/utils/ntlm_auth.c | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/source4/utils/getntacl.c b/source4/utils/getntacl.c index 942183de3ef..98aec2804e4 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 79267882fa5..5841adbf402 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; |