Check if rsakeys.ini exists on startup, exit if it's missing

This commit is contained in:
Pavel Roskin 2016-03-03 22:29:53 -08:00
parent 86ec50789c
commit 3eb495f425

View File

@ -299,6 +299,7 @@ xrdp_sanity_check(void)
{
int intval = 1;
int host_be;
char key_file[256];
/* check compiled endian with actual endian */
host_be = !((int)(*(unsigned char *)(&intval)));
@ -343,6 +344,13 @@ xrdp_sanity_check(void)
return 1;
}
g_snprintf(key_file, 255, "%s/rsakeys.ini", XRDP_CFG_PATH);
if (!g_file_exist(key_file))
{
g_writeln("File %s is missing, create it using xrdp-keygen", key_file);
return 1;
}
return 0;
}