Makefile and file location changes
This commit is contained in:
parent
58976ccc97
commit
19314ec055
5
Makefile
5
Makefile
@ -31,7 +31,7 @@ clean:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
mkdir -p $(DESTDIR)
|
mkdir -p $(DESTDIR)
|
||||||
mkdir -p $(CONFDIR)
|
mkdir -p $(CFGDIR)
|
||||||
mkdir -p $(PIDDIR)
|
mkdir -p $(PIDDIR)
|
||||||
mkdir -p $(MANDIR)
|
mkdir -p $(MANDIR)
|
||||||
mkdir -p $(DOCDIR)
|
mkdir -p $(DOCDIR)
|
||||||
@ -41,4 +41,5 @@ install:
|
|||||||
make -C rdp install
|
make -C rdp install
|
||||||
make -C sesman install
|
make -C sesman install
|
||||||
make -C docs 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
|
MANDIR = /usr/local/man
|
||||||
DOCDIR = /usr/doc/xrdp
|
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)
|
CFLAGS = -Wall -O2 -I../common -fPIC $(DEFINES)
|
||||||
C_OS_FLAGS = $(CFLAGS) -c
|
C_OS_FLAGS = $(CFLAGS) -c
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "list.h"
|
#include "list.h"
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "libxrdpinc.h"
|
#include "libxrdpinc.h"
|
||||||
|
#include "file_loc.h"
|
||||||
|
|
||||||
/* tcp */
|
/* tcp */
|
||||||
struct xrdp_tcp
|
struct xrdp_tcp
|
||||||
|
@ -57,7 +57,7 @@ xrdp_rdp_read_config(struct xrdp_client_info* client_info)
|
|||||||
char* item;
|
char* item;
|
||||||
char* value;
|
char* value;
|
||||||
|
|
||||||
fd = g_file_open("xrdp.ini");
|
fd = g_file_open(XRDP_CFG_FILE); /* xrdp.ini */
|
||||||
if (fd > 0)
|
if (fd > 0)
|
||||||
{
|
{
|
||||||
items = list_create();
|
items = list_create();
|
||||||
|
@ -187,7 +187,7 @@ xrdp_sec_create(struct xrdp_rdp* owner, int sck)
|
|||||||
g_random(self->server_random, 32);
|
g_random(self->server_random, 32);
|
||||||
self->mcs_layer = xrdp_mcs_create(self, sck, &self->client_mcs_data,
|
self->mcs_layer = xrdp_mcs_create(self, sck, &self->client_mcs_data,
|
||||||
&self->server_mcs_data);
|
&self->server_mcs_data);
|
||||||
fd = g_file_open("rsakeys.ini");
|
fd = g_file_open(XRDP_KEY_FILE); /* rsakeys.ini */
|
||||||
if (fd > 0)
|
if (fd > 0)
|
||||||
{
|
{
|
||||||
items = list_create();
|
items = list_create();
|
||||||
|
@ -43,9 +43,8 @@ clean:
|
|||||||
install:
|
install:
|
||||||
install sesman $(DESTDIR)/sesman
|
install sesman $(DESTDIR)/sesman
|
||||||
install sesrun $(DESTDIR)/sesrun
|
install sesrun $(DESTDIR)/sesrun
|
||||||
install startwm.sh $(CFGDIR)/startwm.sh
|
install startwm.sh $(DESTDIR)/startwm.sh
|
||||||
install sesman.ini $(CFGDIR)/sesman.ini
|
install sesman.ini $(CFGDIR)/sesman.ini
|
||||||
install pam.d/sesman /etc/pam.d/sesman
|
|
||||||
|
|
||||||
os_calls.o:
|
os_calls.o:
|
||||||
$(CC) $(C_OS_FLAGS) ../common/os_calls.c
|
$(CC) $(C_OS_FLAGS) ../common/os_calls.c
|
||||||
|
@ -11,7 +11,8 @@ PIDDIR = /var/run
|
|||||||
MANDIR = /usr/local/man
|
MANDIR = /usr/local/man
|
||||||
DOCDIR = /usr/doc/xrdp
|
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 = -Wall -O2 -I../common -I../libxrdp $(DEFINES)
|
||||||
#CFLAGS += -DXRDP_DEBUG
|
#CFLAGS += -DXRDP_DEBUG
|
||||||
@ -36,8 +37,8 @@ install:
|
|||||||
install cursor1.cur $(DESTDIR)/cursor1.cur
|
install cursor1.cur $(DESTDIR)/cursor1.cur
|
||||||
install Tahoma-10.fv1 $(DESTDIR)/Tahoma-10.fv1
|
install Tahoma-10.fv1 $(DESTDIR)/Tahoma-10.fv1
|
||||||
install xrdp.ini $(CFGDIR)/xrdp.ini
|
install xrdp.ini $(CFGDIR)/xrdp.ini
|
||||||
install xrdpstart.sh $(DESTDIR)/xrdpstart.sh
|
|
||||||
install rsakeys.ini $(CFGDIR)/rsakeys.ini
|
install rsakeys.ini $(CFGDIR)/rsakeys.ini
|
||||||
|
install xrdp $(DESTDIR)/xrdp
|
||||||
|
|
||||||
list.o:
|
list.o:
|
||||||
$(CC) $(C_OS_FLAGS) ../common/list.c
|
$(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);
|
xrdp_listen_delete(listen);
|
||||||
}
|
}
|
||||||
/* delete the xrdp.pid file */
|
/* 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");
|
g_printf("stopping xrdp\r\n");
|
||||||
/* read the xrdp.pid file */
|
/* read the xrdp.pid file */
|
||||||
fd = -1;
|
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)
|
if (fd == -1)
|
||||||
{
|
{
|
||||||
@ -491,7 +491,7 @@ main(int argc, char** argv)
|
|||||||
g_printf("\r\n");
|
g_printf("\r\n");
|
||||||
g_exit(0);
|
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("It looks like xrdp is allready running,\r\n");
|
||||||
g_printf("if not delete the xrdp.pid file and try again\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 */
|
/* write the pid to file */
|
||||||
pid = g_getpid();
|
pid = g_getpid();
|
||||||
fd = g_file_open("./xrdp.pid");
|
fd = g_file_open(XRDP_PID_FILE); /* xrdp.pid */
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
{
|
{
|
||||||
g_printf("trying to write process id to xrdp.pid\r\n");
|
g_printf("trying to write process id to xrdp.pid\r\n");
|
||||||
@ -532,7 +532,7 @@ main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
else
|
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_sprintf(text, "%d", pid);
|
||||||
g_file_write(fd, text, g_strlen(text));
|
g_file_write(fd, text, g_strlen(text));
|
||||||
g_file_close(fd);
|
g_file_close(fd);
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "thread_calls.h"
|
#include "thread_calls.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
|
#include "file_loc.h"
|
||||||
|
|
||||||
/* xrdp.c */
|
/* xrdp.c */
|
||||||
long APP_CC
|
long APP_CC
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
[globals]
|
[globals]
|
||||||
bitmap_cache=yes
|
bitmap_cache=yes
|
||||||
bitmap_compression=yes
|
bitmap_compression=yes
|
||||||
|
port=3389
|
||||||
|
|
||||||
[vnc1]
|
[vnc1]
|
||||||
name=sesman
|
name=sesman
|
||||||
lib=../vnc/libvnc.so
|
lib=libvnc.so
|
||||||
username=ask
|
username=ask
|
||||||
password=ask
|
password=ask
|
||||||
ip=127.0.0.1
|
ip=127.0.0.1
|
||||||
@ -13,7 +14,7 @@ port=-1
|
|||||||
|
|
||||||
[vnc2]
|
[vnc2]
|
||||||
name=console
|
name=console
|
||||||
lib=../vnc/libvnc.so
|
lib=libvnc.so
|
||||||
ip=127.0.0.1
|
ip=127.0.0.1
|
||||||
port=5900
|
port=5900
|
||||||
username=na
|
username=na
|
||||||
@ -21,7 +22,7 @@ password=ask
|
|||||||
|
|
||||||
[vnc3]
|
[vnc3]
|
||||||
name=vnc-any
|
name=vnc-any
|
||||||
lib=../vnc/libvnc.so
|
lib=libvnc.so
|
||||||
ip=ask
|
ip=ask
|
||||||
port=ask5900
|
port=ask5900
|
||||||
username=na
|
username=na
|
||||||
@ -29,7 +30,7 @@ password=ask
|
|||||||
|
|
||||||
[vnc4]
|
[vnc4]
|
||||||
name=sesman-any
|
name=sesman-any
|
||||||
lib=../vnc/libvnc.so
|
lib=libvnc.so
|
||||||
ip=ask
|
ip=ask
|
||||||
port=-1
|
port=-1
|
||||||
username=ask
|
username=ask
|
||||||
@ -37,6 +38,6 @@ password=ask
|
|||||||
|
|
||||||
[vnc5]
|
[vnc5]
|
||||||
name=rdp-any
|
name=rdp-any
|
||||||
lib=../rdp/librdp.so
|
lib=librdp.so
|
||||||
ip=ask205.5.61.3
|
ip=ask
|
||||||
port=ask3389
|
port=ask3389
|
||||||
|
@ -152,7 +152,7 @@ xrdp_listen_main_loop(struct xrdp_listen* self)
|
|||||||
/* default to port 3389 */
|
/* default to port 3389 */
|
||||||
g_strncpy(port, "3389", 7);
|
g_strncpy(port, "3389", 7);
|
||||||
/* see if port is in xrdp.ini file */
|
/* see if port is in xrdp.ini file */
|
||||||
fd = g_file_open("xrdp.ini");
|
fd = g_file_open(XRDP_CFG_FILE);
|
||||||
if (fd > 0)
|
if (fd > 0)
|
||||||
{
|
{
|
||||||
names = list_create();
|
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_names->auto_free = 1;
|
||||||
section_values = list_create();
|
section_values = list_create();
|
||||||
section_values->auto_free = 1;
|
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);
|
file_read_sections(fd, sections);
|
||||||
for (i = 0; i < sections->count; i++)
|
for (i = 0; i < sections->count; i++)
|
||||||
{
|
{
|
||||||
|
@ -371,7 +371,7 @@ xrdp_wm_init(struct xrdp_wm* self)
|
|||||||
self->screen->bg_color = self->black;
|
self->screen->bg_color = self->black;
|
||||||
if (self->session->client_info->rdp_autologin)
|
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)
|
if (fd > 0)
|
||||||
{
|
{
|
||||||
names = list_create();
|
names = list_create();
|
||||||
|
Loading…
Reference in New Issue
Block a user