Skip to content

Commit

Permalink
sessiond: create a new process for each session
Browse files Browse the repository at this point in the history
  • Loading branch information
izaman committed Jul 30, 2014
1 parent 1a18a74 commit d0d8991
Show file tree
Hide file tree
Showing 56 changed files with 3,139 additions and 778 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ examples/tlm-ui
data/tlm.conf
tests/tlm-test.conf
src/daemon/tlm
src/sessiond/tlm-sessiond
tests/config/configtest
tests/daemon/daemontest
4 changes: 3 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.68])
AC_INIT([tlm], [0.0.2], [])
AC_INIT([tlm], [0.0.3], [])
AC_CONFIG_SRCDIR([src/daemon/tlm-main.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
Expand Down Expand Up @@ -114,6 +114,8 @@ src/common/dbus/Makefile
src/daemon/Makefile
src/daemon/dbus/Makefile
src/daemon/tlm.pc
src/sessiond/Makefile
src/utils/Makefile
src/plugins/Makefile
src/plugins/default/Makefile
src/plugins/gumd/Makefile
Expand Down
3 changes: 2 additions & 1 deletion data/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ include $(top_srcdir)/common.mk
EXTRA_DIST = \
tlm.conf.in \
tlm.service \
tlm-login
tlm-login \
tlm-login.debian

sysconf_DATA = tlm.conf
13 changes: 13 additions & 0 deletions data/tlm-login
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#%PAM-1.0
auth requisite pam_nologin.so
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth

session include system-auth
session required pam_systemd.so
session required pam_loginuid.so
session required pam_namespace.so
session optional pam_keyinit.so force revoke
10 changes: 10 additions & 0 deletions data/tlm.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Tizen Login Manager
After=systemd-user-sessions.service systemd-logind.service display-manager.path
Requires=systemd-logind.service display-manager.path

[Service]
ExecStart=/usr/bin/tlm

[Install]
WantedBy=graphical.target
6 changes: 6 additions & 0 deletions dists/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
tlm (0.0.3-1) unstable; urgency=low

* Create a new process (tlm-sessiond) for each session

-- Imran Zaman <[email protected]> Mon, 21 Jul 2014 17:24:53 +0200

tlm (0.0.2-2) unstable; urgency=low

* Update to 0.0.2
Expand Down
7 changes: 7 additions & 0 deletions dists/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@ Architecture: all
Description: documentation for tlm
Developer documentation for developing plugins.

Package: tlm-dbg
Architecture: any
Section: debug
Priority: extra
Depends: tlm (= ${binary:Version}), ${misc:Depends}
Description: debugging symbols for tlm
debugging symbols
2 changes: 2 additions & 0 deletions dists/debian/install
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/usr/bin/tlm
/usr/bin/tlm-sessiond
/usr/lib/*.so.*
/usr/lib/tlm/plugins/*.so*
/etc/tlm.conf
/usr/bin/tlm-client
7 changes: 7 additions & 0 deletions dists/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS

override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info

.PHONY: override_dh_strip
override_dh_strip:
dh_strip --dbg-package=tlm-dbg

%:
dh $@ --parallel

Expand Down
3 changes: 3 additions & 0 deletions dists/rpm/tizen/packaging/tlm.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* Mon Jul 21 2014 Imran Zaman <[email protected]>
- Update to 0.0.3; create a new process (tlm-sessiond) for each session

* Wed Jun 11 2014 Jussi Laako <[email protected]>
- Depend on gumd on Tizen

Expand Down
6 changes: 4 additions & 2 deletions dists/rpm/tizen/packaging/tlm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

Name: tlm
Summary: Login manager for Tizen
Version: 0.0.2
Release: 7
Version: 0.0.3
Release: 1
Group: System/Service
License: LGPL-2.1+
Source: %{name}-%{version}.tar.gz
Expand Down Expand Up @@ -82,6 +82,8 @@ install -m 644 data/tlm-login %{buildroot}%{_sysconfdir}/pam.d/
%manifest %{name}.manifest
%doc AUTHORS COPYING INSTALL NEWS README
%{_bindir}/%{name}
%{_bindir}/%{name}-sessiond
%{_bindir}/%{name}-client
%{_libdir}/lib%{name}*.so.*
%{_libdir}/%{name}/plugins/*.so*
%{_libdir}/systemd/system/tlm.service
Expand Down
7 changes: 6 additions & 1 deletion dists/rpm/tlm-suse.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name: tlm
Summary: Login manager for Tizen
Version: 0.0.2
Version: 0.0.3
Release: 1
Group: System/Daemons
License: LGPL-2.1+
Expand Down Expand Up @@ -76,6 +76,8 @@ rm -rf %{buildroot}
%defattr(-,root,root,-)
%doc AUTHORS COPYING INSTALL NEWS README
%{_bindir}/%{name}
%{_bindir}/%{name}-sessiond
%{_bindir}/%{name}-client
%{_libdir}/lib%{name}*.so.*
%{_libdir}/%{name}/plugins/*.so*
%exclude %{_libdir}/tlm/plugins/*.la
Expand All @@ -97,6 +99,9 @@ rm -rf %{buildroot}


%changelog
* Mon Jul 21 2014 Imran Zaman <[email protected]>
- Update to 0.0.3; create a new process (tlm-sessiond) for each session

* Thu Mar 13 2014 Jussi Laako <[email protected]>
- Update to 0.0.2

Expand Down
11 changes: 7 additions & 4 deletions docs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ SCAN_OPTIONS=
# Extra options to supply to gtkdoc-mkdb.
# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml
MKDB_OPTIONS=--xml-mode --output-format=xml \
--ignore-files="tlm-dbus-login-gen.c"
--ignore-files="tlm-dbus-login-gen.c tlm-dbus-session-gen.c tlm-dbus-utils.c \
tlm-pipe-stream.c tlm-utils.c"

# Extra options to supply to gtkdoc-mktmpl
# e.g. MKTMPL_OPTIONS=--only-section-tmpl
Expand All @@ -66,7 +67,8 @@ EXTRA_HFILES=

# Header files or dirs to ignore when scanning. Use base file/dir names
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code
IGNORE_HFILES=tlm-dbus-login-gen.h tlm-dbus.h
IGNORE_HFILES=tlm-dbus-login-gen.h tlm-dbus-session-gen.h tlm-dbus.h \
tlm-dbus-utils.h tlm-pipe-stream.h tlm-utils.h

# Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
Expand All @@ -75,7 +77,8 @@ HTML_IMAGES=
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
content_files=introduction.xml \
tlm-dbus-login-doc-gen-org.tizen.Tlm.Login.xml
tlm-dbus-login-doc-gen-org.tizen.Tlm.Login.xml \
tlm-dbus-session-doc-gen-org.tizen.Tlm.Session.xml

# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
# These files must be listed here *and* in content_files
Expand All @@ -89,7 +92,7 @@ expand_content_files=
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
GTKDOC_CFLAGS=$(GLIB_CFLAGS)
GTKDOC_LIBS=$(GLIB_LIBS) \
$(top_builddir)/src/common/libtlm-plugin.la \
$(top_builddir)/src/common/libtlm-common.la \
$(top_builddir)/src/plugins/default/libtlm-plugin-default.la

if HAVE_LIBGUM
Expand Down
2 changes: 1 addition & 1 deletion examples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tlm_ui_LDADD = \
$(GMODULE_LIBS) \
$(ELEMENTARY_LIBS) \
$(DEPS_LIBS) \
$(top_builddir)/src/daemon/tlm-tlm-utils.o \
$(top_builddir)/src/common/.libs/libtlm_common_la-tlm-utils.o \
$(top_builddir)/src/daemon/dbus/libtlm-dbus.la \
$(top_builddir)/src/common/dbus/libtlm-dbus-glue.la

Expand Down
2 changes: 1 addition & 1 deletion examples/tlm-ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "common/tlm-log.h"
#include "common/dbus/tlm-dbus.h"
#include "common/dbus/tlm-dbus-login-gen.h"
#include "daemon/dbus/tlm-dbus-utils.h"
#include "common/dbus/tlm-dbus-utils.h"

#define BUFLEN 8096
#define UID_MIN "UID_MIN"
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NULL=
SUBDIRS = common plugins daemon
SUBDIRS = common plugins daemon sessiond utils
18 changes: 11 additions & 7 deletions src/common/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
include $(top_srcdir)/common.mk
SUBDIRS = dbus

lib_LTLIBRARIES = libtlm-plugin.la
lib_LTLIBRARIES = libtlm-common.la
BUILT_SOURCES =

libtlm_plugin_la_includedir = $(includedir)/tlm
libtlm_plugin_la_include_HEADERS = \
libtlm_common_la_includedir = $(includedir)/tlm
libtlm_common_la_include_HEADERS = \
tlm-account-plugin.h \
tlm-auth-plugin.h \
$(NULL)

libtlm_plugin_la_SOURCES = \
libtlm_common_la_SOURCES = \
$(BUILT_SOURCES) \
tlm-account-plugin.c \
tlm-auth-plugin.c \
Expand All @@ -21,17 +21,21 @@ libtlm_plugin_la_SOURCES = \
tlm-config.h \
tlm-config.c \
tlm-config-general.h \
tlm-pipe-stream.c \
tlm-pipe-stream.h \
tlm-utils.h \
tlm-utils.c \
$(NULL)

libtlm_plugin_la_CFLAGS = \
libtlm_common_la_CFLAGS = \
-I$(abs_top_srcdir)/src \
-DG_LOG_DOMAIN=\"TLM_PLUGIN\" \
-DG_LOG_DOMAIN=\"TLM_COMMON\" \
-DTLM_PLUGINS_DIR='"$(pluginsdir)"' \
-DTLM_SYSCONF_DIR='"$(sysconfdir)"' \
$(TLM_CFLAGS) \
$(NULL)

libtlm_plugin_la_LIBADD = \
libtlm_common_la_LIBADD = \
$(TLM_LIBS) \
$(NULL)

24 changes: 20 additions & 4 deletions src/common/dbus/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ INTERFACES_DIR = $(top_builddir)/src/common/dbus/interfaces
DBUS_BUILT_SOURCES = \
tlm-dbus-login-gen.c \
tlm-dbus-login-gen.h \
tlm-dbus-session-gen.c \
tlm-dbus-session-gen.h \
$(NULL)

DBUS_BUILT_DOCS = \
tlm-dbus-login-doc-gen-org.tizen.Tlm.Login.xml \
tlm-dbus-session-doc-gen-org.tizen.Tlm.Session.xml \
$(NULL)

DBUS_INTERFACE_PREFIX="org.tizen.Tlm."
Expand All @@ -18,6 +21,14 @@ tlm-dbus-login-gen.c tlm-dbus-login-gen.h : $(INTERFACES_DIR)/org.tizen.Tlm.Logi
--generate-docbook tlm-dbus-login-doc-gen \
$<

tlm-dbus-session-gen.c tlm-dbus-session-gen.h : $(INTERFACES_DIR)/org.tizen.Tlm.Session.xml
gdbus-codegen \
--interface-prefix $(DBUS_INTERFACE_PREFIX) \
--c-namespace TlmDbus \
--generate-c-code tlm-dbus-session-gen \
--generate-docbook tlm-dbus-session-doc-gen \
$<

noinst_LTLIBRARIES = libtlm-dbus-glue.la

libtlm_dbus_glue_la_CPPFLAGS = \
Expand All @@ -34,19 +45,24 @@ nodist_libtlm_dbus_glue_la_SOURCES = \

libtlm_dbus_glue_la_SOURCES = \
tlm-dbus.h \
tlm-dbus-utils.c \
tlm-dbus-utils.h \
$(NULL)

EXTRA_DIST = interfaces tlm-dbus-login-doc-gen-org.tizen.Tlm.Login.xml
EXTRA_DIST = interfaces tlm-dbus-login-doc-gen-org.tizen.Tlm.Login.xml \
tlm-dbus-session-doc-gen-org.tizen.Tlm.Session.xml

all-local: login_xml_doc
all-local: copy_xml_doc

mostlyclean-local:
rm -rf $(abs_top_builddir)/docs/tlm-dbus-login-doc-gen-org.tizen.Tlm.Login.xml
rm -rf $(abs_top_builddir)/docs/tlm-dbus-session-doc-gen-org.tizen.Tlm.Session.xml

login_xml_doc: tlm-dbus-login-gen.c
copy_xml_doc: tlm-dbus-login-gen.c tlm-dbus-session-gen.c
cp -f $(abs_top_srcdir)/src/common/dbus/tlm-dbus-login-doc-gen-org.tizen.Tlm.Login.xml $(abs_top_builddir)/docs/tlm-dbus-login-doc-gen-org.tizen.Tlm.Login.xml
chmod +w $(abs_top_builddir)/docs/tlm-dbus-login-doc-gen-org.tizen.Tlm.Login.xml
cp -f $(abs_top_srcdir)/src/common/dbus/tlm-dbus-session-doc-gen-org.tizen.Tlm.Session.xml $(abs_top_builddir)/docs/tlm-dbus-session-doc-gen-org.tizen.Tlm.Session.xml
chmod +w $(abs_top_builddir)/docs/tlm-dbus-session-doc-gen-org.tizen.Tlm.Session.xml

clean-local:
rm -f *~ $(DBUS_BUILT_SOURCES) $(DBUS_BUILT_DOCS)

28 changes: 28 additions & 0 deletions src/common/dbus/interfaces/org.tizen.Tlm.Session.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.tizen.Tlm.Session">
<property type='s' name='seatid' access='readwrite'/>
<property type='s' name='username' access='readwrite'/>
<property type='s' name='service' access='readwrite'/>
<property type='s' name='sessionid' access='read'/>

<method name="sessionCreate">
<arg name="password" type="s" direction="in"/>
<arg name="environment" type="a{ss}" direction="in"/>
</method>
<method name="sessionTerminate">
</method>

<signal name="sessionCreated">
<arg name="sessionid" type="s" direction="out"/>
</signal>
<signal name="sessionTerminated">
</signal>
<signal name="error">
<arg name="error" type="(uis)" direction="out"/>
</signal>
<signal name="authenticated">
</signal>

</interface>
</node>
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@ tlm_dbus_utils_create_request (
if (!request) return NULL;

request->type = type;
request->dbus_adapter = g_object_ref (object);
request->invocation = g_object_ref (invocation);
if (invocation) request->invocation = g_object_ref (invocation);
if (object) request->dbus_adapter = g_object_ref (object);
if (seat_id) request->seat_id = g_strdup (seat_id);
if (username) request->username = g_strdup (username);
if (password) request->password = g_strdup (password);
if (environment) {
request->environment =
tlm_dbus_utils_hash_table_from_variant (environment);
}
if (environment)
request->environment = tlm_dbus_utils_hash_table_from_variant (
environment);
return request;
}

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions src/common/dbus/tlm-dbus.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#define TLM_SERVICE_PREFIX "org.tizen.Tlm"
#define TLM_SERVICE TLM_SERVICE_PREFIX
#define TLM_LOGIN_OBJECTPATH "/org/tizen/Tlm/Login"
#define TLM_SESSION_OBJECTPATH "/org/tizen/Tlm/Session"

#define TLM_DBUS_FREEDESKTOP_SERVICE "org.freedesktop.DBus"
#define TLM_DBUS_FREEDESKTOP_PATH "/org/freedesktop/DBus"
Expand Down
Loading

0 comments on commit d0d8991

Please sign in to comment.