diff options
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r-- | source3/smbd/reply.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index b8270495fd..c927e09425 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -586,7 +586,14 @@ int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize) strlower(user); - strcpy(sesssetup_user,user); + /* + * In share level security, only overwrite sesssetup_use if + * it's a non null-session share. Helps keep %U and %G + * working. + */ + + if((lp_security() != SEC_SHARE) || *user) + strcpy(sesssetup_user,user); reload_services(True); |