summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--libxrdp/Makefile3
-rw-r--r--libxrdp/libxrdp.h1
-rw-r--r--libxrdp/xrdp_rdp.c2
-rw-r--r--libxrdp/xrdp_sec.c2
-rw-r--r--sesman/Makefile3
-rw-r--r--xrdp/Makefile5
-rw-r--r--xrdp/xrdp.c12
-rw-r--r--xrdp/xrdp.h1
-rw-r--r--xrdp/xrdp.ini13
-rw-r--r--xrdp/xrdp_listen.c2
-rw-r--r--xrdp/xrdp_login_wnd.c2
-rw-r--r--xrdp/xrdp_wm.c2
13 files changed, 29 insertions, 24 deletions
diff --git a/Makefile b/Makefile
index 48fee44b..ffa9d044 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,7 @@ clean:
install:
mkdir -p $(DESTDIR)
- mkdir -p $(CONFDIR)
+ mkdir -p $(CFGDIR)
mkdir -p $(PIDDIR)
mkdir -p $(MANDIR)
mkdir -p $(DOCDIR)
@@ -41,4 +41,5 @@ install:
make -C rdp install
make -C sesman install
make -C docs install
-# install instfiles/pam.d/sesman /etc/pam.d/sesman
+ install instfiles/pam.d/sesman /etc/pam.d/sesman
+ install instfiles/xrdpstart.sh $(DESTDIR)/xrdpstart.sh
diff --git a/libxrdp/Makefile b/libxrdp/Makefile
index 097785d7..925b125a 100644
--- a/libxrdp/Makefile
+++ b/libxrdp/Makefile
@@ -10,7 +10,8 @@ PIDDIR = /var/run
MANDIR = /usr/local/man
DOCDIR = /usr/doc/xrdp
-DEFINES =
+DEFINES = -DXRDP_CFG_FILE=\"$(CFGDIR)/xrdp.ini\" \
+ -DXRDP_KEY_FILE=\"$(CFGDIR)/rsakeys.ini\"
CFLAGS = -Wall -O2 -I../common -fPIC $(DEFINES)
C_OS_FLAGS = $(CFLAGS) -c
diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h
index e725e968..1084a728 100644
--- a/libxrdp/libxrdp.h
+++ b/libxrdp/libxrdp.h
@@ -32,6 +32,7 @@
#include "list.h"
#include "file.h"
#include "libxrdpinc.h"
+#include "file_loc.h"
/* tcp */
struct xrdp_tcp
diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c
index a1d5df6b..8715eb7c 100644
--- a/libxrdp/xrdp_rdp.c
+++ b/libxrdp/xrdp_rdp.c
@@ -57,7 +57,7 @@ xrdp_rdp_read_config(struct xrdp_client_info* client_info)
char* item;
char* value;
- fd = g_file_open("xrdp.ini");
+ fd = g_file_open(XRDP_CFG_FILE); /* xrdp.ini */
if (fd > 0)
{
items = list_create();
diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c
index 1b44751c..980c20fa 100644
--- a/libxrdp/xrdp_sec.c
+++ b/libxrdp/xrdp_sec.c
@@ -187,7 +187,7 @@ xrdp_sec_create(struct xrdp_rdp* owner, int sck)
g_random(self->server_random, 32);
self->mcs_layer = xrdp_mcs_create(self, sck, &self->client_mcs_data,
&self->server_mcs_data);
- fd = g_file_open("rsakeys.ini");
+ fd = g_file_open(XRDP_KEY_FILE); /* rsakeys.ini */
if (fd > 0)
{
items = list_create();
diff --git a/sesman/Makefile b/sesman/Makefile
index 3bf8276d..720fbf77 100644
--- a/sesman/Makefile
+++ b/sesman/Makefile
@@ -43,9 +43,8 @@ clean:
install:
install sesman $(DESTDIR)/sesman
install sesrun $(DESTDIR)/sesrun
- install startwm.sh $(CFGDIR)/startwm.sh
+ install startwm.sh $(DESTDIR)/startwm.sh
install sesman.ini $(CFGDIR)/sesman.ini
- install pam.d/sesman /etc/pam.d/sesman
os_calls.o:
$(CC) $(C_OS_FLAGS) ../common/os_calls.c
diff --git a/xrdp/Makefile b/xrdp/Makefile
index 6efc891b..3d184a59 100644
--- a/xrdp/Makefile
+++ b/xrdp/Makefile
@@ -11,7 +11,8 @@ PIDDIR = /var/run
MANDIR = /usr/local/man
DOCDIR = /usr/doc/xrdp
-DEFINES =
+DEFINES = -DXRDP_CFG_FILE=\"$(CFGDIR)/xrdp.ini\" \
+ -DXRDP_PID_FILE=\"$(PIDDIR)/xrdp.pid\"
CFLAGS = -Wall -O2 -I../common -I../libxrdp $(DEFINES)
#CFLAGS += -DXRDP_DEBUG
@@ -36,8 +37,8 @@ install:
install cursor1.cur $(DESTDIR)/cursor1.cur
install Tahoma-10.fv1 $(DESTDIR)/Tahoma-10.fv1
install xrdp.ini $(CFGDIR)/xrdp.ini
- install xrdpstart.sh $(DESTDIR)/xrdpstart.sh
install rsakeys.ini $(CFGDIR)/rsakeys.ini
+ install xrdp $(DESTDIR)/xrdp
list.o:
$(CC) $(C_OS_FLAGS) ../common/list.c
diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c
index 2a9ccdc7..4577f2d2 100644
--- a/xrdp/xrdp.c
+++ b/xrdp/xrdp.c
@@ -102,7 +102,7 @@ xrdp_shutdown(int sig)
xrdp_listen_delete(listen);
}
/* delete the xrdp.pid file */
- g_file_delete("./xrdp.pid");
+ g_file_delete(XRDP_PID_FILE);
}
/*****************************************************************************/
@@ -432,9 +432,9 @@ main(int argc, char** argv)
g_printf("stopping xrdp\r\n");
/* read the xrdp.pid file */
fd = -1;
- if (g_file_exist("./xrdp.pid"))
+ if (g_file_exist(XRDP_PID_FILE)) /* xrdp.pid */
{
- fd = g_file_open("./xrdp.pid");
+ fd = g_file_open(XRDP_PID_FILE); /* xrdp.pid */
}
if (fd == -1)
{
@@ -491,7 +491,7 @@ main(int argc, char** argv)
g_printf("\r\n");
g_exit(0);
}
- if (g_file_exist("./xrdp.pid"))
+ if (g_file_exist(XRDP_PID_FILE)) /* xrdp.pid */
{
g_printf("It looks like xrdp is allready running,\r\n");
g_printf("if not delete the xrdp.pid file and try again\r\n");
@@ -523,7 +523,7 @@ main(int argc, char** argv)
}
/* write the pid to file */
pid = g_getpid();
- fd = g_file_open("./xrdp.pid");
+ fd = g_file_open(XRDP_PID_FILE); /* xrdp.pid */
if (fd == -1)
{
g_printf("trying to write process id to xrdp.pid\r\n");
@@ -532,7 +532,7 @@ main(int argc, char** argv)
}
else
{
- g_set_file_rights("./xrdp.pid", 1, 1);
+ g_set_file_rights(XRDP_PID_FILE, 1, 1); /* xrdp.pid */
g_sprintf(text, "%d", pid);
g_file_write(fd, text, g_strlen(text));
g_file_close(fd);
diff --git a/xrdp/xrdp.h b/xrdp/xrdp.h
index 7235d896..361ae912 100644
--- a/xrdp/xrdp.h
+++ b/xrdp/xrdp.h
@@ -32,6 +32,7 @@
#include "thread_calls.h"
#include "list.h"
#include "file.h"
+#include "file_loc.h"
/* xrdp.c */
long APP_CC
diff --git a/xrdp/xrdp.ini b/xrdp/xrdp.ini
index 7c10b52e..b9e7519c 100644
--- a/xrdp/xrdp.ini
+++ b/xrdp/xrdp.ini
@@ -2,10 +2,11 @@
[globals]
bitmap_cache=yes
bitmap_compression=yes
+port=3389
[vnc1]
name=sesman
-lib=../vnc/libvnc.so
+lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
@@ -13,7 +14,7 @@ port=-1
[vnc2]
name=console
-lib=../vnc/libvnc.so
+lib=libvnc.so
ip=127.0.0.1
port=5900
username=na
@@ -21,7 +22,7 @@ password=ask
[vnc3]
name=vnc-any
-lib=../vnc/libvnc.so
+lib=libvnc.so
ip=ask
port=ask5900
username=na
@@ -29,7 +30,7 @@ password=ask
[vnc4]
name=sesman-any
-lib=../vnc/libvnc.so
+lib=libvnc.so
ip=ask
port=-1
username=ask
@@ -37,6 +38,6 @@ password=ask
[vnc5]
name=rdp-any
-lib=../rdp/librdp.so
-ip=ask205.5.61.3
+lib=librdp.so
+ip=ask
port=ask3389
diff --git a/xrdp/xrdp_listen.c b/xrdp/xrdp_listen.c
index 740d166b..64bbc261 100644
--- a/xrdp/xrdp_listen.c
+++ b/xrdp/xrdp_listen.c
@@ -152,7 +152,7 @@ xrdp_listen_main_loop(struct xrdp_listen* self)
/* default to port 3389 */
g_strncpy(port, "3389", 7);
/* see if port is in xrdp.ini file */
- fd = g_file_open("xrdp.ini");
+ fd = g_file_open(XRDP_CFG_FILE);
if (fd > 0)
{
names = list_create();
diff --git a/xrdp/xrdp_login_wnd.c b/xrdp/xrdp_login_wnd.c
index 18e6eec1..1a26abc1 100644
--- a/xrdp/xrdp_login_wnd.c
+++ b/xrdp/xrdp_login_wnd.c
@@ -576,7 +576,7 @@ xrdp_wm_login_fill_in_combo(struct xrdp_wm* self, struct xrdp_bitmap* b)
section_names->auto_free = 1;
section_values = list_create();
section_values->auto_free = 1;
- fd = g_file_open("xrdp.ini");
+ fd = g_file_open(XRDP_CFG_FILE); /* xrdp.ini */
file_read_sections(fd, sections);
for (i = 0; i < sections->count; i++)
{
diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c
index 82005301..3aa53628 100644
--- a/xrdp/xrdp_wm.c
+++ b/xrdp/xrdp_wm.c
@@ -371,7 +371,7 @@ xrdp_wm_init(struct xrdp_wm* self)
self->screen->bg_color = self->black;
if (self->session->client_info->rdp_autologin)
{
- fd = g_file_open("xrdp.ini");
+ fd = g_file_open(XRDP_CFG_FILE); /* xrdp.ini */
if (fd > 0)
{
names = list_create();