svn commit: samba r14858 - in branches/SAMBA_4_0/source/utils: .
metze at samba.org
metze at samba.org
Sun Apr 2 11:18:34 GMT 2006
Author: metze
Date: 2006-04-02 11:18:34 +0000 (Sun, 02 Apr 2006)
New Revision: 14858
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14858
Log:
fix bugs noticed by the ibm code checker
metze
Modified:
branches/SAMBA_4_0/source/utils/getntacl.c
branches/SAMBA_4_0/source/utils/ntlm_auth.c
Changeset:
Modified: branches/SAMBA_4_0/source/utils/getntacl.c
===================================================================
--- branches/SAMBA_4_0/source/utils/getntacl.c 2006-04-02 11:17:07 UTC (rev 14857)
+++ branches/SAMBA_4_0/source/utils/getntacl.c 2006-04-02 11:18:34 UTC (rev 14858)
@@ -65,12 +65,12 @@
}
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);
Modified: branches/SAMBA_4_0/source/utils/ntlm_auth.c
===================================================================
--- branches/SAMBA_4_0/source/utils/ntlm_auth.c 2006-04-02 11:17:07 UTC (rev 14857)
+++ branches/SAMBA_4_0/source/utils/ntlm_auth.c 2006-04-02 11:18:34 UTC (rev 14858)
@@ -455,7 +455,8 @@
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 @@
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;
More information about the samba-cvs
mailing list