summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sesman/Makefile19
-rw-r--r--sesman/Makefile.am12
-rw-r--r--sesman/sessvc/Makefile29
-rw-r--r--sesman/sessvc/sessvc.c (renamed from sesman/sessvc.c)5
4 files changed, 43 insertions, 22 deletions
diff --git a/sesman/Makefile b/sesman/Makefile
index f059fbe7..9d925ee1 100644
--- a/sesman/Makefile
+++ b/sesman/Makefile
@@ -4,8 +4,6 @@ SESMANOBJ = sesman.o config.o sig.o session.o env.o \
os_calls.o d3des.o list.o file.o log.o access.o \
scp.o scp_v0.o scp_v1.o scp_v1_mng.o thread.o lock.o
-SESSVCOBJ = sessvc.o os_calls.o log.o
-
CFGDIR = /etc/xrdp
PIDDIR = /var/run
LIBDIR = /usr/local/lib/xrdp
@@ -19,13 +17,13 @@ LDFLAGS = -L/usr/gnu/lib -L/usr/lib/nptl -L./libscp -Wl,-rpath,$(LIBDIR) -lpthre
C_OS_FLAGS = $(CFLAGS) -c
CC = gcc
-all: libscp_ pam_base xrdp-sessvc tools_
+all: libscp_ pam_base xrdp-sessvc_ tools_
-nopam: libscp_ no_pam_base xrdp-sessvc tools_
+nopam: libscp_ no_pam_base xrdp-sessvc_ tools_
-pamuserpass: libscp_ pam_userpass_base xrdp-sessvc tools
+pamuserpass: libscp_ pam_userpass_base xrdp-sessvc_ tools
-kerberos: libscp_ kerberos_base xrdp-sessvc tools
+kerberos: libscp_ kerberos_base xrdp-sessvc_ tools
pam_base: $(SESMANOBJ) verify_user_pam.o
$(CC) $(LDFLAGS) -o xrdp-sesman $(SESMANOBJ) verify_user_pam.o -lpam
@@ -40,8 +38,8 @@ pam_userpass_base: $(SESMANOBJ) verify_user_pam_userpass.o
kerberos_base: $(SESMANOBJ) verify_user_kerberos.o
$(CC) $(LDFLAGS) -o xrdp-sesman $(SESMANOBJ) verify_user_kerberos.o -lkrb5
-xrdp-sessvc: $(SESSVCOBJ)
- $(CC) $(LDFLAGS) -o xrdp-sessvc $(SESSVCOBJ)
+xrdp-sessvc_:
+ make -C sessvc
tools_:
make -C tools
@@ -50,17 +48,18 @@ libscp_:
make -C libscp
clean:
- rm -f $(SESMANOBJ) verify_user.o verify_user_pam.o verify_user_pam_userpass.o verify_user_kerberos.o xrdp-sesman sessvc.o xrdp-sessvc
+ rm -f $(SESMANOBJ) verify_user.o verify_user_pam.o verify_user_pam_userpass.o verify_user_kerberos.o xrdp-sesman
make -C tools clean
make -C libscp clean
+ make -C sessvc clean
install:
install xrdp-sesman $(SBINDIR)/xrdp-sesman
install startwm.sh $(CFGDIR)/startwm.sh
install sesman.ini $(CFGDIR)/sesman.ini
- install xrdp-sessvc $(SBINDIR)/xrdp-sessvc
make -C tools install
make -C libscp install
+ make -C sessvc install
os_calls.o: ../common/os_calls.c
$(CC) $(C_OS_FLAGS) ../common/os_calls.c
diff --git a/sesman/Makefile.am b/sesman/Makefile.am
index ab388ed0..0020a480 100644
--- a/sesman/Makefile.am
+++ b/sesman/Makefile.am
@@ -21,8 +21,7 @@ endif
endif
sbin_PROGRAMS = \
- xrdp-sesman \
- xrdp-sessvc
+ xrdp-sesman
xrdp_sesman_SOURCES = \
scp.c \
@@ -39,17 +38,11 @@ xrdp_sesman_SOURCES = \
env.c \
$(AUTH_C)
-xrdp_sessvc_SOURCES = \
- sessvc.c
-
xrdp_sesman_LDADD = \
$(top_srcdir)/common/libcommon.la \
$(top_srcdir)/sesman/libscp/libscp.la \
$(AUTH_LIB)
-xrdp_sessvc_LDADD = \
- $(top_srcdir)/common/libcommon.la
-
sesmansysconfdir=$(sysconfdir)/xrdp
sesmansysconf_DATA = \
@@ -58,7 +51,8 @@ sesmansysconf_DATA = \
SUBDIRS = \
libscp \
- tools
+ tools \
+ sessvc
# must be tab below
install-data-hook:
diff --git a/sesman/sessvc/Makefile b/sesman/sessvc/Makefile
new file mode 100644
index 00000000..39905e94
--- /dev/null
+++ b/sesman/sessvc/Makefile
@@ -0,0 +1,29 @@
+
+SESSVCOBJ = sessvc.o os_calls.o log.o
+
+CFGDIR = /etc/xrdp
+PIDDIR = /var/run
+LIBDIR = /usr/local/lib/xrdp
+SBINDIR = /usr/local/sbin
+
+CFLAGS = -Wall -O2 -I../../common
+LDFLAGS = -lpthread -ldl
+C_OS_FLAGS = $(CFLAGS) -c
+CC = gcc
+
+all: xrdp-sessvc
+
+xrdp-sessvc: $(SESSVCOBJ)
+ $(CC) $(LDFLAGS) -o xrdp-sessvc $(SESSVCOBJ)
+
+clean:
+ rm -f $(SESSVCOBJ) xrdp-sessvc
+
+install:
+ install xrdp-sessvc $(SBINDIR)/xrdp-sessvc
+
+os_calls.o: ../../common/os_calls.c
+ $(CC) $(C_OS_FLAGS) ../../common/os_calls.c
+
+log.o: ../../common/log.c
+ $(CC) $(C_OS_FLAGS) -DLOG_ENABLE_THREAD ../../common/log.c
diff --git a/sesman/sessvc.c b/sesman/sessvc/sessvc.c
index 927ddca7..3d24070e 100644
--- a/sesman/sessvc.c
+++ b/sesman/sessvc/sessvc.c
@@ -56,13 +56,12 @@ main(int argc, char** argv)
g_signal(9, signal_handler); /* SIGKILL */
g_signal(15, signal_handler); /* SIGTERM */
g_signal(17, signal_handler); /* SIGCHLD */
-
+
g_printf("\n[sessvc] Waiting for X (pid %d) and WM (pid %d)\n", x_pid, wm_pid);
-
+
ret = g_waitpid(wm_pid);
g_sigterm(x_pid);
g_printf("\n[sessvc] WM is dead (waitpid said %d, errno is %d). exiting...\n", ret, errno);
return 0;
}
-