The branch, v3-6-test has been updated
       via  f68121d Fix bug #8882 - Broken processing of %U with vfs_full_audit 
when force user is set.
      from  04a9988 s3-utils: Use ads_do_search_retry in net ads search

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit f68121db6f78680a328acec11f475ccca3184412
Author: Jeremy Allison <[email protected]>
Date:   Mon Apr 23 17:49:49 2012 -0700

    Fix bug #8882 - Broken processing of %U with vfs_full_audit when force user 
is set.
    
    When doing a "force user" we need to remember what the "sanitized_username"
    was from the original connect.

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/service.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index f57e57f..6c8c8d3 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -696,6 +696,14 @@ NTSTATUS set_conn_force_user_group(connection_struct 
*conn, int snum)
                        return status;
                }
 
+               /* We don't want to replace the original sanitized_username
+                  as it is the original user given in the connect attempt.
+                  This is used in '%U' substitutions. */
+               TALLOC_FREE(forced_serverinfo->sanitized_username);
+               forced_serverinfo->sanitized_username =
+                       talloc_move(forced_serverinfo,
+                               &conn->session_info->sanitized_username);
+
                TALLOC_FREE(conn->session_info);
                conn->session_info = forced_serverinfo;
 


-- 
Samba Shared Repository

Reply via email to