diff options
author | ilsimo <ilsimo> | 2007-05-06 21:02:25 +0000 |
---|---|---|
committer | ilsimo <ilsimo> | 2007-05-06 21:02:25 +0000 |
commit | f22b5b42a74314af8c4232c86ccce968c6a37ce5 (patch) | |
tree | 83da9d21acb9b9c8bb04414228a85153ec972259 /sesman/env.c | |
parent | d0e066ee8b0d428f6876bc32a97ce1e70420a65e (diff) | |
download | xrdp-proprietary-f22b5b42a74314af8c4232c86ccce968c6a37ce5.tar.gz xrdp-proprietary-f22b5b42a74314af8c4232c86ccce968c6a37ce5.zip |
making libscp a real library
some fixes in configuration options
Diffstat (limited to 'sesman/env.c')
-rw-r--r-- | sesman/env.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sesman/env.c b/sesman/env.c index 32984b50..53849e3a 100644 --- a/sesman/env.c +++ b/sesman/env.c @@ -31,6 +31,7 @@ #include "grp.h" extern unsigned char g_fixedkey[8]; /* in sesman.c */ +extern struct config_sesman g_cfg; /******************************************************************************/ int DEFAULT_CC @@ -97,8 +98,18 @@ env_set_user(char* username, char* passwd_file, int display) g_setenv("DISPLAY", text, 1); if (passwd_file != 0) { - g_mkdir(".vnc"); - g_sprintf(passwd_file, "%s/.vnc/sesman_passwd", pw_dir); + if (0==g_cfg.auth_file_path) + { + /* if no auth_file_path is set, then we go for $HOME/.vnc/sesman_passwd */ + g_mkdir(".vnc"); + g_sprintf(passwd_file, "%s/.vnc/sesman_passwd", pw_dir); + } + else + { + /* we use auth_file_path as requested */ + g_sprintf(passwd_file, g_cfg.auth_file_path, username); + } + LOG_DBG("pass file: %s", passwd_file); } } } |