diff options
author | Pavel Roskin <plroskin@gmail.com> | 2016-03-03 22:29:53 -0800 |
---|---|---|
committer | Pavel Roskin <plroskin@gmail.com> | 2016-03-03 22:56:08 -0800 |
commit | 3eb495f425969be1fc7123f4d75a05833e0e4231 (patch) | |
tree | 88202c62c23030f5976257bc5f28ee59a1f0c805 /xrdp/xrdp.c | |
parent | 86ec50789c8b88dbc38926c26f068c8a469aeb4c (diff) | |
download | xrdp-proprietary-3eb495f425969be1fc7123f4d75a05833e0e4231.tar.gz xrdp-proprietary-3eb495f425969be1fc7123f4d75a05833e0e4231.zip |
Check if rsakeys.ini exists on startup, exit if it's missing
Diffstat (limited to 'xrdp/xrdp.c')
-rw-r--r-- | xrdp/xrdp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c index f985bba3..51820688 100644 --- a/xrdp/xrdp.c +++ b/xrdp/xrdp.c @@ -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; } |