[SCM] Samba Shared Repository - branch v4-11-test updated
Karolin Seeger
kseeger at samba.org
Fri Feb 21 09:21:02 UTC 2020
The branch, v4-11-test has been updated
via 370278fca39 s3: VFS: full_audit. Use system session_info if called from a temporary share definition.
from 4ee5642bea3 auth: Fix CID 1458418 Null pointer dereferences (REVERSE_INULL)
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-11-test
- Log -----------------------------------------------------------------
commit 370278fca390c2cdbd4fe523a27208bfa094a81a
Author: Jeremy Allison <jra at samba.org>
Date: Wed Feb 19 13:20:14 2020 -0800
s3: VFS: full_audit. Use system session_info if called from a temporary share definition.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14283
Signed-off-by: Jeremy Allison <jra at samba.org>
Autobuild-User(v4-11-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-11-test): Fri Feb 21 09:20:14 UTC 2020 on sn-devel-184
-----------------------------------------------------------------------
Summary of changes:
source3/modules/vfs_full_audit.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index a442563115c..bdeff2aae46 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -478,6 +478,7 @@ static char *audit_prefix(TALLOC_CTX *ctx, connection_struct *conn)
{
char *prefix = NULL;
char *result;
+ const struct auth_session_info *session_info = conn->session_info;
prefix = talloc_strdup(ctx,
lp_parm_const_string(SNUM(conn), "full_audit",
@@ -485,13 +486,24 @@ static char *audit_prefix(TALLOC_CTX *ctx, connection_struct *conn)
if (!prefix) {
return NULL;
}
+
+ if (session_info == NULL) {
+ /*
+ * conn->session_info can be NULL if we're
+ * called from a temporary conn created in
+ * the MSDFS and other code. It's been created
+ * by root so just use the system session.
+ */
+ session_info = get_session_info_system();
+ }
+
result = talloc_sub_full(ctx,
lp_servicename(talloc_tos(), SNUM(conn)),
- conn->session_info->unix_info->unix_name,
+ session_info->unix_info->unix_name,
conn->connectpath,
- conn->session_info->unix_token->gid,
- conn->session_info->unix_info->sanitized_username,
- conn->session_info->info->domain_name,
+ session_info->unix_token->gid,
+ session_info->unix_info->sanitized_username,
+ session_info->info->domain_name,
prefix);
TALLOC_FREE(prefix);
return result;
--
Samba Shared Repository
More information about the samba-cvs
mailing list