[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-2523-g20aa144
Volker Lendecke
vlendec at samba.org
Sat Jun 7 07:06:50 GMT 2008
The branch, v3-2-test has been updated
via 20aa14480e9ae6cea663c67fe9e2d1d3b6fafa7d (commit)
via fb708dafb052dae7733657487ac73a533750f6f9 (commit)
via 682ec284b189e12de4fff9f000b12960a69d90cb (commit)
via 56447baf3bca6cc7110420d84188291f6c785daf (commit)
from be1d0c90440ad9bbe865fbda80a5e9f112c9e0c0 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 20aa14480e9ae6cea663c67fe9e2d1d3b6fafa7d
Author: Volker Lendecke <vl at samba.org>
Date: Sat Jun 7 09:04:03 2008 +0200
Add STREAMINFO op to vfs_full_audit
Fix Coverity ID 552 and 553
(cherry picked from commit c46e10d2605b22d31675976e62e5ae61d73c8a0a)
commit fb708dafb052dae7733657487ac73a533750f6f9
Author: Volker Lendecke <vl at samba.org>
Date: Sat Jun 7 08:51:35 2008 +0200
Fix a memleak in secrets_fetch_afs_key
Coverity ID 570
(cherry picked from commit 0f52dc3f7eae7e87b8a71bd099b99b0b3e76a387)
commit 682ec284b189e12de4fff9f000b12960a69d90cb
Author: Volker Lendecke <vl at samba.org>
Date: Sat Jun 7 08:50:02 2008 +0200
Fix a memleak in secrets_fetch_trust_account_password_legacy
Coverity ID 571
(cherry picked from commit a551773e34af1c118f77784a285e1b885da8655d)
commit 56447baf3bca6cc7110420d84188291f6c785daf
Author: Volker Lendecke <vl at samba.org>
Date: Sat Jun 7 08:48:13 2008 +0200
Fix a memleak in fetch_ldap_pw
Fix Coverity ID 572, also fix the error check for secrets_fetch failing
(cherry picked from commit 2663c81a782fd4394a9feaaaa987c7f6d38ca5da)
-----------------------------------------------------------------------
Summary of changes:
source/include/vfs_macros.h | 2 +-
source/modules/vfs_full_audit.c | 27 +++++++++++++++++++++++++++
source/passdb/secrets.c | 6 +++++-
3 files changed, 33 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/include/vfs_macros.h b/source/include/vfs_macros.h
index f0a9809..da7f596 100644
--- a/source/include/vfs_macros.h
+++ b/source/include/vfs_macros.h
@@ -336,7 +336,7 @@
#define SMB_VFS_NEXT_NOTIFY_WATCH(conn, ctx, e, callback, private_data, handle_p) ((conn)->vfs_next.ops.notify_watch((conn)->vfs_next.handles.notify_watch, (ctx), (e), (callback), (private_data), (handle_p)))
#define SMB_VFS_NEXT_CHFLAGS(handle, path, flags) ((handle)->vfs_next.ops.chflags((handle)->vfs_next.handles.chflags, (path), (flags)))
#define SMB_VFS_NEXT_FILE_ID_CREATE(handle, dev, inode) ((handle)->vfs_next.ops.file_id_create((handle)->vfs_next.handles.file_id_create, (dev), (inode)))
-#define SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx, num_streams, streams) ((handle)->vfs.ops.streaminfo((handle)->vfs.handles.streaminfo, (fsp), (fname), (mem_ctx), (num_streams), (streams)))
+#define SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx, num_streams, streams) ((handle)->vfs_next.ops.streaminfo((handle)->vfs_next.handles.streaminfo, (fsp), (fname), (mem_ctx), (num_streams), (streams)))
/* NT ACL operations. */
#define SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, ppdesc) ((handle)->vfs_next.ops.fget_nt_acl((handle)->vfs_next.handles.fget_nt_acl, (fsp), (security_info), (ppdesc)))
diff --git a/source/modules/vfs_full_audit.c b/source/modules/vfs_full_audit.c
index 2f8098d..db933f7 100644
--- a/source/modules/vfs_full_audit.c
+++ b/source/modules/vfs_full_audit.c
@@ -190,6 +190,12 @@ static int smb_full_audit_chflags(vfs_handle_struct *handle,
const char *path, unsigned int flags);
static struct file_id smb_full_audit_file_id_create(struct vfs_handle_struct *handle,
SMB_DEV_T dev, SMB_INO_T inode);
+static NTSTATUS smb_full_audit_streaminfo(vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ const char *fname,
+ TALLOC_CTX *mem_ctx,
+ unsigned int *pnum_streams,
+ struct stream_struct **pstreams);
static NTSTATUS smb_full_audit_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
uint32 security_info,
SEC_DESC **ppdesc);
@@ -422,6 +428,8 @@ static vfs_op_tuple audit_op_tuples[] = {
SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_file_id_create), SMB_VFS_OP_FILE_ID_CREATE,
SMB_VFS_LAYER_LOGGER},
+ {SMB_VFS_OP(smb_full_audit_streaminfo), SMB_VFS_OP_STREAMINFO,
+ SMB_VFS_LAYER_LOGGER},
/* NT ACL operations. */
@@ -590,6 +598,7 @@ static struct {
{ SMB_VFS_OP_NOTIFY_WATCH, "notify_watch" },
{ SMB_VFS_OP_CHFLAGS, "chflags" },
{ SMB_VFS_OP_FILE_ID_CREATE, "file_id_create" },
+ { SMB_VFS_OP_STREAMINFO, "streaminfo" },
{ SMB_VFS_OP_FGET_NT_ACL, "fget_nt_acl" },
{ SMB_VFS_OP_GET_NT_ACL, "get_nt_acl" },
{ SMB_VFS_OP_FSET_NT_ACL, "fset_nt_acl" },
@@ -1529,6 +1538,24 @@ static struct file_id smb_full_audit_file_id_create(struct vfs_handle_struct *ha
return result;
}
+static NTSTATUS smb_full_audit_streaminfo(vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ const char *fname,
+ TALLOC_CTX *mem_ctx,
+ unsigned int *pnum_streams,
+ struct stream_struct **pstreams)
+{
+ NTSTATUS result;
+
+ result = SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx,
+ pnum_streams, pstreams);
+
+ do_log(SMB_VFS_OP_STREAMINFO, NT_STATUS_IS_OK(result), handle,
+ "%s", fname);
+
+ return result;
+}
+
static NTSTATUS smb_full_audit_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
uint32 security_info,
SEC_DESC **ppdesc)
diff --git a/source/passdb/secrets.c b/source/passdb/secrets.c
index 34a87bd..6efa82f 100644
--- a/source/passdb/secrets.c
+++ b/source/passdb/secrets.c
@@ -399,6 +399,7 @@ bool secrets_fetch_trust_account_password_legacy(const char *domain,
if (size != sizeof(*pass)) {
DEBUG(0, ("secrets were of incorrect size!\n"));
+ SAFE_FREE(pass);
return False;
}
@@ -883,10 +884,11 @@ bool fetch_ldap_pw(char **dn, char** pw)
if (*p == ',') *p = '/';
data=(char *)secrets_fetch(old_style_key, &size);
- if (!size && size < sizeof(old_style_pw)) {
+ if ((data == NULL) || (size < sizeof(old_style_pw))) {
DEBUG(0,("fetch_ldap_pw: neither ldap secret retrieved!\n"));
SAFE_FREE(old_style_key);
SAFE_FREE(*dn);
+ SAFE_FREE(data);
return False;
}
@@ -1060,6 +1062,8 @@ bool secrets_fetch_afs_key(const char *cell, struct afs_key *result)
result->kvno = ntohl(result->kvno);
+ SAFE_FREE(keyfile);
+
return True;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list