Makefile and file location changes
This commit is contained in:
parent
58976ccc97
commit
19314ec055
5
Makefile
5
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
|
||||
|
@ -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
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "list.h"
|
||||
#include "file.h"
|
||||
#include "libxrdpinc.h"
|
||||
#include "file_loc.h"
|
||||
|
||||
/* tcp */
|
||||
struct xrdp_tcp
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
12
xrdp/xrdp.c
12
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);
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "thread_calls.h"
|
||||
#include "list.h"
|
||||
#include "file.h"
|
||||
#include "file_loc.h"
|
||||
|
||||
/* xrdp.c */
|
||||
long APP_CC
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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++)
|
||||
{
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user