diff options
author | Gerald Carter <jerry@samba.org> | 2005-02-02 16:05:55 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:55:31 -0500 |
commit | 9dbb5769fe70d3c0e2a2c679a42104bc15d42bc7 (patch) | |
tree | 2eb2f466e42bd049d74656d2f763f5d0519dc771 /source3/lib/substitute.c | |
parent | eed0e6875b3a4708a9c7cfa8bbddf207b85ca396 (diff) | |
download | samba-9dbb5769fe70d3c0e2a2c679a42104bc15d42bc7.tar.gz samba-9dbb5769fe70d3c0e2a2c679a42104bc15d42bc7.tar.xz samba-9dbb5769fe70d3c0e2a2c679a42104bc15d42bc7.zip |
r5174: ensure that we consistently use the current_user_info.smb_name vs. smb_name when parsing smb.conf and reloading config files
(This used to be commit be537eaebe84b2ccae089e5982263df8a96e7a5b)
Diffstat (limited to 'source3/lib/substitute.c')
-rw-r--r-- | source3/lib/substitute.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c index 6ec3bb4a76e..615a8d73b0a 100644 --- a/source3/lib/substitute.c +++ b/source3/lib/substitute.c @@ -135,6 +135,18 @@ void set_current_user_info(const userdom_struct *pcui) } /******************************************************************* + return the current active user name +*******************************************************************/ + +const char* get_current_username( void ) +{ + if ( current_user_info.smb_name[0] == '\0' ) + return smb_user_name; + + return current_user_info.smb_name; +} + +/******************************************************************* Given a pointer to a %$(NAME) expand it as an environment variable. Return the number of characters by which the pointer should be advanced. Based on code by Branko Cibej <branko.cibej@hermes.si> |