summaryrefslogtreecommitdiffstats
path: root/libxrdp
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2009-05-19 04:23:49 +0000
committerjsorg71 <jsorg71>2009-05-19 04:23:49 +0000
commit23ffdb0c5fe0315d9d237f168e7d72abe0ba422c (patch)
tree9c565ce9f75c1aab5329837d209af63a9dd74a54 /libxrdp
parenta386eac0f931716e421e20a7cc07c2f0b4e70a2f (diff)
downloadxrdp-proprietary-23ffdb0c5fe0315d9d237f168e7d72abe0ba422c.tar.gz
xrdp-proprietary-23ffdb0c5fe0315d9d237f168e7d72abe0ba422c.zip
autotools fix and file_loc.h simplified
Diffstat (limited to 'libxrdp')
-rw-r--r--libxrdp/Makefile.am7
-rw-r--r--libxrdp/xrdp_rdp.c4
-rw-r--r--libxrdp/xrdp_sec.c6
3 files changed, 14 insertions, 3 deletions
diff --git a/libxrdp/Makefile.am b/libxrdp/Makefile.am
index 9d140d83..5e545e57 100644
--- a/libxrdp/Makefile.am
+++ b/libxrdp/Makefile.am
@@ -1,3 +1,10 @@
+
+AM_CFLAGS = \
+ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
+ -DXRDP_SBIN_PATH=\"${sbindir}\" \
+ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
+ -DXRDP_PID_PATH=\"${localstatedir}/run\"
+
INCLUDES = \
-I$(top_srcdir)/common
diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c
index a217791b..c8e9698b 100644
--- a/libxrdp/xrdp_rdp.c
+++ b/libxrdp/xrdp_rdp.c
@@ -62,12 +62,14 @@ xrdp_rdp_read_config(struct xrdp_client_info* client_info)
struct list* values;
char* item;
char* value;
+ char cfg_file[256];
items = list_create();
items->auto_free = 1;
values = list_create();
values->auto_free = 1;
- file_by_name_read_section(XRDP_CFG_FILE, "globals", items, values);
+ g_snprintf(cfg_file, 255, "%s/xrdp.ini", XRDP_CFG_PATH);
+ file_by_name_read_section(cfg_file, "globals", items, values);
for (index = 0; index < items->count; index++)
{
item = (char*)list_get_item(items, index);
diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c
index 139b1ca1..758283ad 100644
--- a/libxrdp/xrdp_sec.c
+++ b/libxrdp/xrdp_sec.c
@@ -901,6 +901,7 @@ xrdp_sec_incoming(struct xrdp_sec* self)
int index;
char* item;
char* value;
+ char key_file[256];
DEBUG((" in xrdp_sec_incoming"));
g_random(self->server_random, 32);
@@ -908,10 +909,11 @@ xrdp_sec_incoming(struct xrdp_sec* self)
items->auto_free = 1;
values = list_create();
values->auto_free = 1;
- if (file_by_name_read_section(XRDP_KEY_FILE, "keys", items, values) != 0)
+ g_snprintf(key_file, 255, "%s/rsakeys.ini", XRDP_CFG_PATH);
+ if (file_by_name_read_section(key_file, "keys", items, values) != 0)
{
/* this is a show stopper */
- g_writeln("xrdp_sec_incoming: error reading %s file", XRDP_KEY_FILE);
+ g_writeln("xrdp_sec_incoming: error reading %s file", key_file);
list_delete(items);
list_delete(values);
return 1;