diff options
Diffstat (limited to 'source/lib/substitute.c')
-rw-r--r-- | source/lib/substitute.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/source/lib/substitute.c b/source/lib/substitute.c index acfe55d761..6c74f54649 100644 --- a/source/lib/substitute.c +++ b/source/lib/substitute.c @@ -21,6 +21,8 @@ #include "includes.h" +extern struct current_user current_user; + userdom_struct current_user_info; fstring remote_proto="UNKNOWN"; @@ -211,18 +213,11 @@ static const char *get_smb_user_name(void) /******************************************************************* Setup the strings used by substitutions. Called per packet. Ensure %U name is set correctly also. - - smb_name must be sanitized by alpha_strcpy ********************************************************************/ -void set_current_user_info(const char *smb_name, const char *unix_name, - const char *full_name, const char *domain) +void set_current_user_info(const userdom_struct *pcui) { - fstrcpy(current_user_info.smb_name, smb_name); - fstrcpy(current_user_info.unix_name, unix_name); - fstrcpy(current_user_info.full_name, full_name); - fstrcpy(current_user_info.domain, domain); - + current_user_info = *pcui; /* The following is safe as current_user_info.smb_name * has already been sanitised in register_existing_vuid. */ @@ -906,9 +901,9 @@ char *standard_sub_conn(TALLOC_CTX *ctx, connection_struct *conn, const char *st { return talloc_sub_advanced(ctx, lp_servicename(SNUM(conn)), - conn->server_info->unix_name, + conn->user, conn->connectpath, - conn->server_info->utok.gid, + conn->gid, get_smb_user_name(), "", str); |