Don't try to create .vnc directory if it exists
Report system error if it cannot be created.
This commit is contained in:
parent
60029514a6
commit
e9d064e390
10
sesman/env.c
10
sesman/env.c
@ -151,10 +151,14 @@ env_set_user(const char *username, char **passwd_file, int display,
|
|||||||
{
|
{
|
||||||
/* if no auth_file_path is set, then we go for
|
/* if no auth_file_path is set, then we go for
|
||||||
$HOME/.vnc/sesman_username_passwd */
|
$HOME/.vnc/sesman_username_passwd */
|
||||||
if (g_mkdir(".vnc") < 0)
|
if (!g_directory_exist(".vnc"))
|
||||||
{
|
{
|
||||||
log_message(LOG_LEVEL_ERROR,
|
if (g_mkdir(".vnc") < 0)
|
||||||
"env_set_user: error creating .vnc dir");
|
{
|
||||||
|
log_message(LOG_LEVEL_ERROR,
|
||||||
|
"Error creating .vnc directory: %s",
|
||||||
|
g_get_strerror());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
len = g_snprintf(NULL, 0, "%s/.vnc/sesman_%s_passwd", pw_dir, username);
|
len = g_snprintf(NULL, 0, "%s/.vnc/sesman_%s_passwd", pw_dir, username);
|
||||||
|
Loading…
Reference in New Issue
Block a user