diff options
Diffstat (limited to 'source3/lib')
-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 6ec3bb4a76..615a8d73b0 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> |