+tlm NEWS
\ No newline at end of file
+TLM is a daemon that handles user logins in a multi-user, multi-seat system by
+authenticating the users through PAM, and setting up, launching, and tracking user
+sessions.
\ No newline at end of file
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for tlm 0.0.6.
+# Generated by GNU Autoconf 2.69 for tlm 0.0.7.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
# Identity of this package.
PACKAGE_NAME='tlm'
PACKAGE_TARNAME='tlm'
-PACKAGE_VERSION='0.0.6'
-PACKAGE_STRING='tlm 0.0.6'
+PACKAGE_VERSION='0.0.7'
+PACKAGE_STRING='tlm 0.0.7'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures tlm 0.0.6 to adapt to many kinds of systems.
+\`configure' configures tlm 0.0.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of tlm 0.0.6:";;
+ short | recursive ) echo "Configuration of tlm 0.0.7:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-tlm configure 0.0.6
+tlm configure 0.0.7
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by tlm $as_me 0.0.6, which was
+It was created by tlm $as_me 0.0.7, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='tlm'
- VERSION='0.0.6'
+ VERSION='0.0.7'
cat >>confdefs.h <<_ACEOF
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by tlm $as_me 0.0.6, which was
+This file was extended by tlm $as_me 0.0.7, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-tlm config.status 0.0.6
+tlm config.status 0.0.7
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
-AC_INIT([tlm], [0.0.6], [])
+AC_INIT([tlm], [0.0.7], [])
AC_CONFIG_SRCDIR([src/daemon/tlm-main.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
tlm.conf.in \
tlm.service \
tlm-login \
- tlm-default-login
+ tlm-default-login \
+ tlm-system-login \
+ multi-seat
sysconf_DATA = tlm.conf
tlm.conf.in \
tlm.service \
tlm-login \
- tlm-default-login
+ tlm-default-login \
+ tlm-system-login \
+ multi-seat
sysconf_DATA = tlm.conf
all: all-am
--- /dev/null
+#!/bin/sh
+#
+export WAYLAND_CLIENT_DIR=/tmp
+weston --backend=wayland-backend.so --log=/tmp/app-weston.log #--width=1920 --height=1080
--- /dev/null
+#!/bin/sh
+#
+export WAYLAND_SERVER_DIR=/tmp
+#mkdir /run/memory/display
+#chmod 0750 /run/memory/display
+#chgrp weston-launch /run/memory/display
+#export WAYLAND_SERVER_DIR=/run/memory/display
+export WAYLAND_SERVER_GROUP=weston-launch
+export WAYLAND_SERVER_MODE=0660
+/usr/bin/weston-launch -- -i0 --current-mode --log=/tmp/tizen-weston.log --shell=desktop-shell.so
--- /dev/null
+#
+# Example configuration for tlm.
+#
+
+#
+# This group contains top-level settings.
+#
+[General]
+#
+# Name of the account plugin to use to manage(add/remove) guest user accounts
+ACCOUNTS_PLUGIN=gumd
+#
+# Auto-login default user
+# Default: off
+AUTO_LOGIN=1
+#
+# Prepare default/guest users before auto-login
+# Default: off
+# PREPARE_DEFAULT=1
+#
+# PAM service file to use
+PAM_SERVICE=tlm-login
+#
+# PAM service file for default user
+DEFAULT_PAM_SERVICE=tlm-default-login
+#
+# Default (guest) username or template to use
+# %S - seat number
+# %I - seat id string
+# Default: "guest"
+DEFAULT_USER=guest_%S
+#
+# Session command : The command run after successfull login
+# Default: $SHELL
+# In case shell is not defined in /etc/passwd fallback is "systemd --user"
+#SESSION_CMD=systemd --user
+#
+# Session termination timeout in seconds
+# Default: 10
+#TERMINATE_TIMEOUT=10
+#
+# Setup terminal for session
+# Default: off
+#SETUP_TERMINAL=1
+#
+# Use X11 style sessions
+# Default: off
+#X11_SESSION=1
+#
+# Do not launch anything, let systemd handle it through PAM
+# Default: off
+#PAUSE_SESSION=1
+#
+# Specify session type
+# Default: unspecified
+#SESSION_TYPE=wayland
+#
+NSEATS=2
+#
+#
+# Seat specific settings where the group name is seat id
+[seat0]
+DEFAULT_USER=tizen
+SETUP_TERMINAL=1
+VTNR=7
+SESSION_CMD=/etc/session.d/tizen-session
+#SESSION_CMD=bash
+#SESSION_CMD=weston
+DEFAULT_PAM_SERVICE=tlm-system-login
+SETUP_RUNTIME_DIR=1
+#RUNTIME_MODE=0755
+#
+[seat1]
+DEFAULT_USER=app
+SESSION_CMD=/etc/session.d/app-session
+#DEFAULT_PAM_SERVICE=tlm-system-login
+#SETUP_RUNTIME_DIR=1
+#ACTIVE=0
+#DEFAULT_USER=guest_%S
+#
+#
+# plugin specific settings.
+#
+#[pluginname]
+#
+
--- /dev/null
+#%PAM-1.0
+auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
+auth required pam_permit.so
+account include system-auth
+password include system-auth
+
+session include system-auth
+session required pam_loginuid.so
+session required pam_namespace.so
+session optional pam_keyinit.so force revoke
+session required pam_smack.so
# Name of the account plugin to use to manage(add/remove) guest user accounts
ACCOUNTS_PLUGIN=@ACCOUNT_PLUGIN_NAME@
#
+# Number of seats
+# Default: obtain from systemd
+#NSEATS=2
+#
# Auto-login default user
# Default: off
AUTO_LOGIN=1
PAM_SERVICE=tlm-login
#
# PAM service file for default user
-PAM_DEFAULT_SERVICE=tlm-default-login
+DEFAULT_PAM_SERVICE=tlm-default-login
#
# Default (guest) username or template to use
# %S - seat number
# %I - seat id string
# Default: "guest"
-DEFAULT_USER=app
+DEFAULT_USER=guest_%S
#
# Session command : The command run after successfull login
# Default: $SHELL
#
# Do not launch anything, let systemd handle it through PAM
# Default: off
-PAUSE_SESSION=1
+#PAUSE_SESSION=1
+#
+# Specify session type, needs to be specified for
+# XDG_SESSION_CLASS and XDG_SESSION_TYPE to be set
+# Default: unspecified
+SESSION_TYPE=wayland
#
#
# Seat specific settings where the group name is seat id
-#[seat0]
+[seat0]
+DEFAULT_USER=app
+#DEFAULT_USER=tizen
+#SETUP_TERMINAL=1
+#VTNR=7
+#SESSION_CMD=weston-launch
+#DEFAULT_PAM_SERVICE=tlm-system-login
+#SETUP_RUNTIME_DIR=1
+#RUNTIME_MODE=0700
+#
+#[seat1]
+#ACTIVE=0
#DEFAULT_USER=guest_%S
+#DEFAULT_USER=app
#
#
# plugin specific settings.
[Unit]
Description=Tizen Login Manager
-After=systemd-user-sessions.service systemd-logind.service display-manager.path
-Requires=systemd-logind.service display-manager.path
+After=systemd-user-sessions.service systemd-logind.service
+Requires=systemd-logind.service
[Service]
ExecStart=/usr/bin/tlm
+#StandardInput=tty
+#StandardOutput=journal
+#StandardError=journal
+#TTYPath=/dev/tty1
[Install]
-WantedBy=graphical.target
+WantedBy=default.target
+tlm (0.0.7-0) unstable; urgency=low
+
+ * iNotify support
+ * Support for fake seats
+ * Bug fixes and improvements
+
+ -- Imran Zaman <imran.zaman@intel.com> Fri, 31 Oct 2014 16:02:53 +0200
+
tlm (0.0.6-0) unstable; urgency=low
* Updated tlm to libgum API changes
+* Fri Oct 31 2014 Imran Zaman <imran.zaman@intel.com>
+- iNotify support
+- Support for fake seats
+- Bug fixes and improvements
+
* Fri Oct 24 2014 Imran Zaman <imran.zaman@intel.com>
- Updated tlm to libgum API changes
+* Fri Sep 26 2014 Jussi Laako <jussi.laako@intel.com>
+- Add support for more XDG environment variables
+
* Mon Sep 15 2014 Imran Zaman <imran.zaman@intel.com>
- Updated tizen configuration file for tizen
Name: tlm
Summary: Login manager for Tizen
-Version: 0.0.6
+Version: 0.0.7
Release: 0
Group: System/Service
License: LGPL-2.1+
%description
-%{summary}.
+%{summary} files
%package devel
%description devel
-%{summary}.
+%{summary} files
%package doc
%description doc
-%{summary}.
+%{summary} files
%prep
install -m 755 -d %{buildroot}%{_sysconfdir}/pam.d
install -m 644 data/tlm-login %{buildroot}%{_sysconfdir}/pam.d/
install -m 644 data/tlm-default-login %{buildroot}%{_sysconfdir}/pam.d/
+install -m 644 data/tlm-system-login %{buildroot}%{_sysconfdir}/pam.d/
%post
%files
%defattr(-,root,root,-)
%manifest %{name}.manifest
-%doc AUTHORS COPYING INSTALL NEWS README
+%license COPYING
+%doc AUTHORS NEWS README
%{_bindir}/%{name}
%{_bindir}/%{name}-sessiond
%{_bindir}/%{name}-client
%{_libdir}/lib%{name}*.so.*
%{_libdir}/%{name}/plugins/*.so*
-%{_unitdir}/tlm.service
+%config %{_unitdir}/tlm.service
%config(noreplace) %{_sysconfdir}/tlm.conf
%config %{_sysconfdir}/pam.d/tlm-login
%config %{_sysconfdir}/pam.d/tlm-default-login
+%config %{_sysconfdir}/pam.d/tlm-system-login
%files devel
Name: tlm
Summary: Login manager for Tizen
-Version: 0.0.6
+Version: 0.0.7
Release: 0
Group: System/Daemons
License: LGPL-2.1+
%changelog
+* Fri Oct 31 2014 Imran Zaman <imran.zaman@intel.com>
+- iNotify support
+- Support for fake seats
+- Bug fixes and improvements
+
* Fri Oct 24 2014 Imran Zaman <imran.zaman@intel.com>
- Updated tlm to libgum API changes
</td>
</tr>
<tr>
+<td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="TlmConfig.html#tlm-config-get-string-default" title="tlm_config_get_string_default ()">tlm_config_get_string_default</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<div class="refsect3">
<a name="id-1.2.3.7.7.6"></a><h4>Returns</h4>
<p> the value corresponding to the key as an string. If the
-key does not exist or cannot be converted to the integer, NULL is returned.</p>
+key does not exist, NULL is returned.</p>
+<p></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="tlm-config-get-string-default"></a><h3>tlm_config_get_string_default ()</h3>
+<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
+tlm_config_get_string_default (<em class="parameter"><code><a class="link" href="TlmConfig.html" title="TlmConfig"><span class="type">TlmConfig</span></a> *self</code></em>,
+ <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *group</code></em>,
+ <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
+ <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *value</code></em>);</pre>
+<p>Get a string configuration value.</p>
+<div class="refsect3">
+<a name="id-1.2.3.7.8.5"></a><h4>Parameters</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>self</p></td>
+<td class="parameter_description"><p> an instance of <a class="link" href="TlmConfig.html" title="TlmConfig"><span class="type">TlmConfig</span></a>. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
+</tr>
+<tr>
+<td class="parameter_name"><p>group</p></td>
+<td class="parameter_description"><p> the group name, NULL refers to General. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
+</tr>
+<tr>
+<td class="parameter_name"><p>key</p></td>
+<td class="parameter_description"><p> the key name. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
+</tr>
+<tr>
+<td class="parameter_name"><p>value</p></td>
+<td class="parameter_description"><p> default value. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.3.7.8.6"></a><h4>Returns</h4>
+<p> the value corresponding to the key as an string. If the
+key does not exist, given default value is returned.</p>
<p></p>
</div>
</div>
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *value</code></em>);</pre>
<p>Sets the configuration value to the provided string.</p>
<div class="refsect3">
-<a name="id-1.2.3.7.8.5"></a><h4>Parameters</h4>
+<a name="id-1.2.3.7.9.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> retval</code></em>);</pre>
<p>Get a boolean configuration value.</p>
<div class="refsect3">
-<a name="id-1.2.3.7.9.5"></a><h4>Parameters</h4>
+<a name="id-1.2.3.7.10.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.2.3.7.9.6"></a><h4>Returns</h4>
+<a name="id-1.2.3.7.10.6"></a><h4>Returns</h4>
<p> the value corresponding to the key as boolean. If the
key does not exist or cannot be converted to boolean, retval is returned.</p>
<p></p>
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> value</code></em>);</pre>
<p>Sets the configuration value to the provided <span class="type">value</span>.</p>
<div class="refsect3">
-<a name="id-1.2.3.7.10.5"></a><h4>Parameters</h4>
+<a name="id-1.2.3.7.11.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *group</code></em>);</pre>
<p>Checks if any configuration available for <span class="type">group</span>.</p>
<div class="refsect3">
-<a name="id-1.2.3.7.11.5"></a><h4>Parameters</h4>
+<a name="id-1.2.3.7.12.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.2.3.7.11.6"></a><h4>Returns</h4>
+<a name="id-1.2.3.7.12.6"></a><h4>Returns</h4>
<p> TRUE if found, FALSE otherwise.</p>
<p></p>
</div>
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>);</pre>
<p>Checks if <span class="type">key</span> is in given <span class="type">group</span>.</p>
<div class="refsect3">
-<a name="id-1.2.3.7.12.5"></a><h4>Parameters</h4>
+<a name="id-1.2.3.7.13.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.2.3.7.12.6"></a><h4>Returns</h4>
+<a name="id-1.2.3.7.13.6"></a><h4>Returns</h4>
<p> TRUE, if found, FALSE otherwise.</p>
<p></p>
</div>
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *group</code></em>);</pre>
<p>Retrives the configuration in given <span class="type">group</span> as <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a></p>
<div class="refsect3">
-<a name="id-1.2.3.7.13.5"></a><h4>Parameters</h4>
+<a name="id-1.2.3.7.14.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.2.3.7.13.6"></a><h4>Returns</h4>
+<a name="id-1.2.3.7.14.6"></a><h4>Returns</h4>
<p> the key, value paired dictionary if found,
NULL otherwise. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
tlm_config_reload (<em class="parameter"><code><a class="link" href="TlmConfig.html" title="TlmConfig"><span class="type">TlmConfig</span></a> *self</code></em>);</pre>
<p>Reloads the configuration.</p>
<div class="refsect3">
-<a name="id-1.2.3.7.14.5"></a><h4>Parameters</h4>
+<a name="id-1.2.3.7.15.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</dt>
<dd></dd>
<dt>
+<a class="link" href="tlm-General-configuration.html#TLM-CONFIG-GENERAL-NSEATS:CAPS" title="TLM_CONFIG_GENERAL_NSEATS">TLM_CONFIG_GENERAL_NSEATS</a>, macro in <a class="link" href="tlm-General-configuration.html" title="General configuration">General configuration</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="tlm-General-configuration.html#TLM-CONFIG-GENERAL-PAM-SERVICE:CAPS" title="TLM_CONFIG_GENERAL_PAM_SERVICE">TLM_CONFIG_GENERAL_PAM_SERVICE</a>, macro in <a class="link" href="tlm-General-configuration.html" title="General configuration">General configuration</a>
</dt>
<dd></dd>
</dt>
<dd></dd>
<dt>
+<a class="link" href="tlm-General-configuration.html#TLM-CONFIG-GENERAL-RUNTIME-MODE:CAPS" title="TLM_CONFIG_GENERAL_RUNTIME_MODE">TLM_CONFIG_GENERAL_RUNTIME_MODE</a>, macro in <a class="link" href="tlm-General-configuration.html" title="General configuration">General configuration</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="tlm-General-configuration.html#TLM-CONFIG-GENERAL-SESSION-CMD:CAPS" title="TLM_CONFIG_GENERAL_SESSION_CMD">TLM_CONFIG_GENERAL_SESSION_CMD</a>, macro in <a class="link" href="tlm-General-configuration.html" title="General configuration">General configuration</a>
</dt>
<dd></dd>
</dt>
<dd></dd>
<dt>
+<a class="link" href="tlm-General-configuration.html#TLM-CONFIG-GENERAL-SESSION-TYPE:CAPS" title="TLM_CONFIG_GENERAL_SESSION_TYPE">TLM_CONFIG_GENERAL_SESSION_TYPE</a>, macro in <a class="link" href="tlm-General-configuration.html" title="General configuration">General configuration</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="tlm-General-configuration.html#TLM-CONFIG-GENERAL-SETUP-RUNTIME-DIR:CAPS" title="TLM_CONFIG_GENERAL_SETUP_RUNTIME_DIR">TLM_CONFIG_GENERAL_SETUP_RUNTIME_DIR</a>, macro in <a class="link" href="tlm-General-configuration.html" title="General configuration">General configuration</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="tlm-General-configuration.html#TLM-CONFIG-GENERAL-SETUP-TERMINAL:CAPS" title="TLM_CONFIG_GENERAL_SETUP_TERMINAL">TLM_CONFIG_GENERAL_SETUP_TERMINAL</a>, macro in <a class="link" href="tlm-General-configuration.html" title="General configuration">General configuration</a>
</dt>
<dd></dd>
</dt>
<dd></dd>
<dt>
+<a class="link" href="TlmConfig.html#tlm-config-get-string-default" title="tlm_config_get_string_default ()">tlm_config_get_string_default</a>, function in <a class="link" href="TlmConfig.html" title="TlmConfig">TlmConfig</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="TlmConfig.html#tlm-config-get-uint" title="tlm_config_get_uint ()">tlm_config_get_uint</a>, function in <a class="link" href="TlmConfig.html" title="TlmConfig">TlmConfig</a>
</dt>
<dd></dd>
</dt>
<dd></dd>
<dt>
+<a class="link" href="tlm-Seat-configuration.html#TLM-CONFIG-SEAT-NWATCH:CAPS" title="TLM_CONFIG_SEAT_NWATCH">TLM_CONFIG_SEAT_NWATCH</a>, macro in <a class="link" href="tlm-Seat-configuration.html" title="Seat configuration">Seat configuration</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="tlm-Seat-configuration.html#TLM-CONFIG-SEAT-VTNR:CAPS" title="TLM_CONFIG_SEAT_VTNR">TLM_CONFIG_SEAT_VTNR</a>, macro in <a class="link" href="tlm-Seat-configuration.html" title="Seat configuration">Seat configuration</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="tlm-Seat-configuration.html#TLM-CONFIG-SEAT-WATCHX:CAPS" title="TLM_CONFIG_SEAT_WATCHX">TLM_CONFIG_SEAT_WATCHX</a>, macro in <a class="link" href="tlm-Seat-configuration.html" title="Seat configuration">Seat configuration</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="TlmConfig.html#tlm-config-set-boolean" title="tlm_config_set_boolean ()">tlm_config_set_boolean</a>, function in <a class="link" href="TlmConfig.html" title="TlmConfig">TlmConfig</a>
</dt>
<dd></dd>
</dt>
<dd></dd>
<dt>
-<a class="link" href="tlm-Errors.html#TLM-ERROR:CAPS" title="TLM_ERROR">TLM_ERROR</a>, macro in <a class="link" href="tlm-Errors.html" title="Errors">Errors</a>
+<a class="link" href="tlm-Errors.html#TlmError" title="enum TlmError">TlmError</a>, enum in <a class="link" href="tlm-Errors.html" title="Errors">Errors</a>
</dt>
<dd></dd>
<dt>
-<a class="link" href="tlm-Errors.html#TlmError" title="enum TlmError">TlmError</a>, enum in <a class="link" href="tlm-Errors.html" title="Errors">Errors</a>
+<a class="link" href="tlm-Errors.html#TLM-ERROR:CAPS" title="TLM_ERROR">TLM_ERROR</a>, macro in <a class="link" href="tlm-Errors.html" title="Errors">Errors</a>
</dt>
<dd></dd>
<dt>
<ANCHOR id="tlm-config-get-uint" href="tlm/TlmConfig.html#tlm-config-get-uint">
<ANCHOR id="tlm-config-set-uint" href="tlm/TlmConfig.html#tlm-config-set-uint">
<ANCHOR id="tlm-config-get-string" href="tlm/TlmConfig.html#tlm-config-get-string">
+<ANCHOR id="tlm-config-get-string-default" href="tlm/TlmConfig.html#tlm-config-get-string-default">
<ANCHOR id="tlm-config-set-string" href="tlm/TlmConfig.html#tlm-config-set-string">
<ANCHOR id="tlm-config-get-boolean" href="tlm/TlmConfig.html#tlm-config-get-boolean">
<ANCHOR id="tlm-config-set-boolean" href="tlm/TlmConfig.html#tlm-config-set-boolean">
<ANCHOR id="tlm-General-configuration.other_details" href="tlm/tlm-General-configuration.html#tlm-General-configuration.other_details">
<ANCHOR id="TLM-CONFIG-GENERAL:CAPS" href="tlm/tlm-General-configuration.html#TLM-CONFIG-GENERAL:CAPS">
<ANCHOR id="TLM-CONFIG-GENERAL-ACCOUNTS-PLUGIN:CAPS" href="tlm/tlm-General-configuration.html#TLM-CONFIG-GENERAL-ACCOUNTS-PLUGIN:CAPS">
+<ANCHOR id="TLM-CONFIG-GENERAL-NSEATS:CAPS" href="tlm/tlm-General-configuration.html#TLM-CONFIG-GENERAL-NSEATS:CAPS">
<ANCHOR id="TLM-CONFIG-GENERAL-SESSION-CMD:CAPS" href="tlm/tlm-General-configuration.html#TLM-CONFIG-GENERAL-SESSION-CMD:CAPS">
<ANCHOR id="TLM-CONFIG-GENERAL-SESSION-PATH:CAPS" href="tlm/tlm-General-configuration.html#TLM-CONFIG-GENERAL-SESSION-PATH:CAPS">
<ANCHOR id="TLM-CONFIG-GENERAL-DATA-DIRS:CAPS" href="tlm/tlm-General-configuration.html#TLM-CONFIG-GENERAL-DATA-DIRS:CAPS">
<ANCHOR id="TLM-CONFIG-GENERAL-DEFAULT-PAM-SERVICE:CAPS" href="tlm/tlm-General-configuration.html#TLM-CONFIG-GENERAL-DEFAULT-PAM-SERVICE:CAPS">
<ANCHOR id="TLM-CONFIG-GENERAL-DEFAULT-USER:CAPS" href="tlm/tlm-General-configuration.html#TLM-CONFIG-GENERAL-DEFAULT-USER:CAPS">
<ANCHOR id="TLM-CONFIG-GENERAL-SETUP-TERMINAL:CAPS" href="tlm/tlm-General-configuration.html#TLM-CONFIG-GENERAL-SETUP-TERMINAL:CAPS">
+<ANCHOR id="TLM-CONFIG-GENERAL-SETUP-RUNTIME-DIR:CAPS" href="tlm/tlm-General-configuration.html#TLM-CONFIG-GENERAL-SETUP-RUNTIME-DIR:CAPS">
+<ANCHOR id="TLM-CONFIG-GENERAL-RUNTIME-MODE:CAPS" href="tlm/tlm-General-configuration.html#TLM-CONFIG-GENERAL-RUNTIME-MODE:CAPS">
<ANCHOR id="TLM-CONFIG-GENERAL-TERMINATE-TIMEOUT:CAPS" href="tlm/tlm-General-configuration.html#TLM-CONFIG-GENERAL-TERMINATE-TIMEOUT:CAPS">
<ANCHOR id="TLM-CONFIG-GENERAL-X11-SESSION:CAPS" href="tlm/tlm-General-configuration.html#TLM-CONFIG-GENERAL-X11-SESSION:CAPS">
<ANCHOR id="TLM-CONFIG-GENERAL-PAUSE-SESSION:CAPS" href="tlm/tlm-General-configuration.html#TLM-CONFIG-GENERAL-PAUSE-SESSION:CAPS">
+<ANCHOR id="TLM-CONFIG-GENERAL-SESSION-TYPE:CAPS" href="tlm/tlm-General-configuration.html#TLM-CONFIG-GENERAL-SESSION-TYPE:CAPS">
<ANCHOR id="gdbus-org.tizen.Tlm.Login" href="tlm/gdbus-org.tizen.Tlm.Login.html">
<ANCHOR id="gdbus-interface-org-tizen-Tlm-Login" href="tlm/gdbus-org.tizen.Tlm.Login.html#gdbus-interface-org-tizen-Tlm-Login">
<ANCHOR id="gdbus-methods-org.tizen.Tlm.Login" href="tlm/gdbus-org.tizen.Tlm.Login.html#gdbus-methods-org.tizen.Tlm.Login">
<ANCHOR id="tlm-Seat-configuration.functions_details" href="tlm/tlm-Seat-configuration.html#tlm-Seat-configuration.functions_details">
<ANCHOR id="tlm-Seat-configuration.other_details" href="tlm/tlm-Seat-configuration.html#tlm-Seat-configuration.other_details">
<ANCHOR id="TLM-CONFIG-SEAT-ACTIVE:CAPS" href="tlm/tlm-Seat-configuration.html#TLM-CONFIG-SEAT-ACTIVE:CAPS">
+<ANCHOR id="TLM-CONFIG-SEAT-NWATCH:CAPS" href="tlm/tlm-Seat-configuration.html#TLM-CONFIG-SEAT-NWATCH:CAPS">
+<ANCHOR id="TLM-CONFIG-SEAT-WATCHX:CAPS" href="tlm/tlm-Seat-configuration.html#TLM-CONFIG-SEAT-WATCHX:CAPS">
+<ANCHOR id="TLM-CONFIG-SEAT-VTNR:CAPS" href="tlm/tlm-Seat-configuration.html#TLM-CONFIG-SEAT-VTNR:CAPS">
<ANCHOR id="tlm-tlm-log" href="tlm/tlm-tlm-log.html">
<ANCHOR id="tlm-tlm-log.functions" href="tlm/tlm-tlm-log.html#tlm-tlm-log.functions">
<ANCHOR id="tlm-tlm-log.object-hierarchy" href="tlm/tlm-tlm-log.html#tlm-tlm-log.object-hierarchy">
</tr>
<tr>
<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="tlm-General-configuration.html#TLM-CONFIG-GENERAL-NSEATS:CAPS" title="TLM_CONFIG_GENERAL_NSEATS">TLM_CONFIG_GENERAL_NSEATS</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="tlm-General-configuration.html#TLM-CONFIG-GENERAL-SESSION-CMD:CAPS" title="TLM_CONFIG_GENERAL_SESSION_CMD">TLM_CONFIG_GENERAL_SESSION_CMD</a></td>
</tr>
<tr>
</tr>
<tr>
<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="tlm-General-configuration.html#TLM-CONFIG-GENERAL-SETUP-RUNTIME-DIR:CAPS" title="TLM_CONFIG_GENERAL_SETUP_RUNTIME_DIR">TLM_CONFIG_GENERAL_SETUP_RUNTIME_DIR</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="tlm-General-configuration.html#TLM-CONFIG-GENERAL-RUNTIME-MODE:CAPS" title="TLM_CONFIG_GENERAL_RUNTIME_MODE">TLM_CONFIG_GENERAL_RUNTIME_MODE</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="tlm-General-configuration.html#TLM-CONFIG-GENERAL-TERMINATE-TIMEOUT:CAPS" title="TLM_CONFIG_GENERAL_TERMINATE_TIMEOUT">TLM_CONFIG_GENERAL_TERMINATE_TIMEOUT</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="tlm-General-configuration.html#TLM-CONFIG-GENERAL-PAUSE-SESSION:CAPS" title="TLM_CONFIG_GENERAL_PAUSE_SESSION">TLM_CONFIG_GENERAL_PAUSE_SESSION</a></td>
</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="tlm-General-configuration.html#TLM-CONFIG-GENERAL-SESSION-TYPE:CAPS" title="TLM_CONFIG_GENERAL_SESSION_TYPE">TLM_CONFIG_GENERAL_SESSION_TYPE</a></td>
+</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
+<a name="TLM-CONFIG-GENERAL-NSEATS:CAPS"></a><h3>TLM_CONFIG_GENERAL_NSEATS</h3>
+<pre class="programlisting">#define TLM_CONFIG_GENERAL_NSEATS "NSEATS"
+</pre>
+<p>Number of seats, instead seat information from systemd.</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="TLM-CONFIG-GENERAL-SESSION-CMD:CAPS"></a><h3>TLM_CONFIG_GENERAL_SESSION_CMD</h3>
<pre class="programlisting">#define TLM_CONFIG_GENERAL_SESSION_CMD "SESSION_CMD"
</pre>
</div>
<hr>
<div class="refsect2">
+<a name="TLM-CONFIG-GENERAL-SETUP-RUNTIME-DIR:CAPS"></a><h3>TLM_CONFIG_GENERAL_SETUP_RUNTIME_DIR</h3>
+<pre class="programlisting">#define TLM_CONFIG_GENERAL_SETUP_RUNTIME_DIR "SETUP_RUNTIME_DIR"
+</pre>
+<p>Setup XDG_RUNTIME_DIR for the user.</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="TLM-CONFIG-GENERAL-RUNTIME-MODE:CAPS"></a><h3>TLM_CONFIG_GENERAL_RUNTIME_MODE</h3>
+<pre class="programlisting">#define TLM_CONFIG_GENERAL_RUNTIME_MODE "RUNTIME_MODE"
+</pre>
+<p>Access mode for the XDG_RUNTIME_DIR.</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="TLM-CONFIG-GENERAL-TERMINATE-TIMEOUT:CAPS"></a><h3>TLM_CONFIG_GENERAL_TERMINATE_TIMEOUT</h3>
<pre class="programlisting">#define TLM_CONFIG_GENERAL_TERMINATE_TIMEOUT "TERMINATE_TIMEOUT"
</pre>
<p>Do not actually launch anything after creating session, let systemd
handle it through PAM.</p>
</div>
+<hr>
+<div class="refsect2">
+<a name="TLM-CONFIG-GENERAL-SESSION-TYPE:CAPS"></a><h3>TLM_CONFIG_GENERAL_SESSION_TYPE</h3>
+<pre class="programlisting">#define TLM_CONFIG_GENERAL_SESSION_TYPE "SESSION_TYPE"
+</pre>
+<p>Specify session type, one of "unspecified", "tty", "x11", "wayland" or
+"mir".</p>
+</div>
</div>
</div>
<div class="footer">
<col width="150px" class="name">
<col class="description">
</colgroup>
-<tbody><tr>
+<tbody>
+<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="tlm-Seat-configuration.html#TLM-CONFIG-SEAT-ACTIVE:CAPS" title="TLM_CONFIG_SEAT_ACTIVE">TLM_CONFIG_SEAT_ACTIVE</a></td>
-</tr></tbody>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="tlm-Seat-configuration.html#TLM-CONFIG-SEAT-NWATCH:CAPS" title="TLM_CONFIG_SEAT_NWATCH">TLM_CONFIG_SEAT_NWATCH</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="tlm-Seat-configuration.html#TLM-CONFIG-SEAT-WATCHX:CAPS" title="TLM_CONFIG_SEAT_WATCHX">TLM_CONFIG_SEAT_WATCHX</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="tlm-Seat-configuration.html#TLM-CONFIG-SEAT-VTNR:CAPS" title="TLM_CONFIG_SEAT_VTNR">TLM_CONFIG_SEAT_VTNR</a></td>
+</tr>
+</tbody>
</table></div>
</div>
<div class="refsect1">
<p>Value specifying whether a seat is to be used or not.
Default value: 1</p>
</div>
+<hr>
+<div class="refsect2">
+<a name="TLM-CONFIG-SEAT-NWATCH:CAPS"></a><h3>TLM_CONFIG_SEAT_NWATCH</h3>
+<pre class="programlisting">#define TLM_CONFIG_SEAT_NWATCH "NWATCH"
+</pre>
+<p>Number of seat-ready watch items.
+Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="TLM-CONFIG-SEAT-WATCHX:CAPS"></a><h3>TLM_CONFIG_SEAT_WATCHX</h3>
+<pre class="programlisting">#define TLM_CONFIG_SEAT_WATCHX "WATCH"
+</pre>
+<p>Base key for seat-ready watch item.</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="TLM-CONFIG-SEAT-VTNR:CAPS"></a><h3>TLM_CONFIG_SEAT_VTNR</h3>
+<pre class="programlisting">#define TLM_CONFIG_SEAT_VTNR "VTNR"
+</pre>
+<p>Specifies virtual terminal number to be used for the seat, note that
+this has effect only when SETUP_TERMINAL is enabled.
+Default value: 0</p>
+</div>
</div>
</div>
<div class="footer">
<keyword type="function" name="tlm_config_get_uint ()" link="TlmConfig.html#tlm-config-get-uint"/>
<keyword type="function" name="tlm_config_set_uint ()" link="TlmConfig.html#tlm-config-set-uint"/>
<keyword type="function" name="tlm_config_get_string ()" link="TlmConfig.html#tlm-config-get-string"/>
+ <keyword type="function" name="tlm_config_get_string_default ()" link="TlmConfig.html#tlm-config-get-string-default"/>
<keyword type="function" name="tlm_config_set_string ()" link="TlmConfig.html#tlm-config-set-string"/>
<keyword type="function" name="tlm_config_get_boolean ()" link="TlmConfig.html#tlm-config-get-boolean"/>
<keyword type="function" name="tlm_config_set_boolean ()" link="TlmConfig.html#tlm-config-set-boolean"/>
<keyword type="function" name="tlm_config_reload ()" link="TlmConfig.html#tlm-config-reload"/>
<keyword type="macro" name="TLM_CONFIG_GENERAL" link="tlm-General-configuration.html#TLM-CONFIG-GENERAL:CAPS"/>
<keyword type="macro" name="TLM_CONFIG_GENERAL_ACCOUNTS_PLUGIN" link="tlm-General-configuration.html#TLM-CONFIG-GENERAL-ACCOUNTS-PLUGIN:CAPS"/>
+ <keyword type="macro" name="TLM_CONFIG_GENERAL_NSEATS" link="tlm-General-configuration.html#TLM-CONFIG-GENERAL-NSEATS:CAPS"/>
<keyword type="macro" name="TLM_CONFIG_GENERAL_SESSION_CMD" link="tlm-General-configuration.html#TLM-CONFIG-GENERAL-SESSION-CMD:CAPS"/>
<keyword type="macro" name="TLM_CONFIG_GENERAL_SESSION_PATH" link="tlm-General-configuration.html#TLM-CONFIG-GENERAL-SESSION-PATH:CAPS"/>
<keyword type="macro" name="TLM_CONFIG_GENERAL_DATA_DIRS" link="tlm-General-configuration.html#TLM-CONFIG-GENERAL-DATA-DIRS:CAPS"/>
<keyword type="macro" name="TLM_CONFIG_GENERAL_DEFAULT_PAM_SERVICE" link="tlm-General-configuration.html#TLM-CONFIG-GENERAL-DEFAULT-PAM-SERVICE:CAPS"/>
<keyword type="macro" name="TLM_CONFIG_GENERAL_DEFAULT_USER" link="tlm-General-configuration.html#TLM-CONFIG-GENERAL-DEFAULT-USER:CAPS"/>
<keyword type="macro" name="TLM_CONFIG_GENERAL_SETUP_TERMINAL" link="tlm-General-configuration.html#TLM-CONFIG-GENERAL-SETUP-TERMINAL:CAPS"/>
+ <keyword type="macro" name="TLM_CONFIG_GENERAL_SETUP_RUNTIME_DIR" link="tlm-General-configuration.html#TLM-CONFIG-GENERAL-SETUP-RUNTIME-DIR:CAPS"/>
+ <keyword type="macro" name="TLM_CONFIG_GENERAL_RUNTIME_MODE" link="tlm-General-configuration.html#TLM-CONFIG-GENERAL-RUNTIME-MODE:CAPS"/>
<keyword type="macro" name="TLM_CONFIG_GENERAL_TERMINATE_TIMEOUT" link="tlm-General-configuration.html#TLM-CONFIG-GENERAL-TERMINATE-TIMEOUT:CAPS"/>
<keyword type="macro" name="TLM_CONFIG_GENERAL_X11_SESSION" link="tlm-General-configuration.html#TLM-CONFIG-GENERAL-X11-SESSION:CAPS"/>
<keyword type="macro" name="TLM_CONFIG_GENERAL_PAUSE_SESSION" link="tlm-General-configuration.html#TLM-CONFIG-GENERAL-PAUSE-SESSION:CAPS"/>
+ <keyword type="macro" name="TLM_CONFIG_GENERAL_SESSION_TYPE" link="tlm-General-configuration.html#TLM-CONFIG-GENERAL-SESSION-TYPE:CAPS"/>
<keyword type="method" name="The loginUser() method" link="gdbus-org.tizen.Tlm.Login.html#gdbus-method-org-tizen-Tlm-Login.loginUser"/>
<keyword type="method" name="The logoutUser() method" link="gdbus-org.tizen.Tlm.Login.html#gdbus-method-org-tizen-Tlm-Login.logoutUser"/>
<keyword type="method" name="The switchUser() method" link="gdbus-org.tizen.Tlm.Login.html#gdbus-method-org-tizen-Tlm-Login.switchUser"/>
<keyword type="property" name="The “config” property" link="TlmAuthPlugin.html#TlmAuthPlugin--config"/>
<keyword type="signal" name="The “authenticate” signal" link="TlmAuthPlugin.html#TlmAuthPlugin-authenticate"/>
<keyword type="macro" name="TLM_CONFIG_SEAT_ACTIVE" link="tlm-Seat-configuration.html#TLM-CONFIG-SEAT-ACTIVE:CAPS"/>
+ <keyword type="macro" name="TLM_CONFIG_SEAT_NWATCH" link="tlm-Seat-configuration.html#TLM-CONFIG-SEAT-NWATCH:CAPS"/>
+ <keyword type="macro" name="TLM_CONFIG_SEAT_WATCHX" link="tlm-Seat-configuration.html#TLM-CONFIG-SEAT-WATCHX:CAPS"/>
+ <keyword type="macro" name="TLM_CONFIG_SEAT_VTNR" link="tlm-Seat-configuration.html#TLM-CONFIG-SEAT-VTNR:CAPS"/>
<keyword type="function" name="tlm_log_init ()" link="tlm-tlm-log.html#tlm-log-init"/>
<keyword type="function" name="tlm_log_close ()" link="tlm-tlm-log.html#tlm-log-close"/>
<keyword type="macro" name="EXPAND_LOG_MSG()" link="tlm-tlm-log.html#EXPAND-LOG-MSG:CAPS"/>
tlm_config_get_uint
tlm_config_set_uint
tlm_config_get_string
+tlm_config_get_string_default
tlm_config_set_string
tlm_config_get_boolean
tlm_config_set_boolean
<FILE>tlm-config-general</FILE>
TLM_CONFIG_GENERAL
TLM_CONFIG_GENERAL_ACCOUNTS_PLUGIN
+TLM_CONFIG_GENERAL_NSEATS
TLM_CONFIG_GENERAL_SESSION_CMD
TLM_CONFIG_GENERAL_SESSION_PATH
TLM_CONFIG_GENERAL_DATA_DIRS
TLM_CONFIG_GENERAL_DEFAULT_PAM_SERVICE
TLM_CONFIG_GENERAL_DEFAULT_USER
TLM_CONFIG_GENERAL_SETUP_TERMINAL
+TLM_CONFIG_GENERAL_SETUP_RUNTIME_DIR
+TLM_CONFIG_GENERAL_RUNTIME_MODE
TLM_CONFIG_GENERAL_TERMINATE_TIMEOUT
TLM_CONFIG_GENERAL_X11_SESSION
TLM_CONFIG_GENERAL_PAUSE_SESSION
+TLM_CONFIG_GENERAL_SESSION_TYPE
</SECTION>
<SECTION>
<FILE>tlm-config-seat</FILE>
TLM_CONFIG_SEAT_ACTIVE
+TLM_CONFIG_SEAT_NWATCH
+TLM_CONFIG_SEAT_WATCHX
+TLM_CONFIG_SEAT_VTNR
</SECTION>
<SECTION>
+* Fri Oct 31 2014 Imran Zaman <imran.zaman@intel.com>
+- iNotify support
+- Support for fake seats
+- Bug fixes and improvements
+
* Fri Oct 24 2014 Imran Zaman <imran.zaman@intel.com>
- Updated tlm to libgum API changes
+* Fri Sep 26 2014 Jussi Laako <jussi.laako@intel.com>
+- Add support for more XDG environment variables
+
* Mon Sep 15 2014 Imran Zaman <imran.zaman@intel.com>
- Updated tizen configuration file for tizen
Name: tlm
Summary: Login manager for Tizen
-Version: 0.0.6
+Version: 0.0.7
Release: 0
Group: System/Service
License: LGPL-2.1+
%description
-%{summary}.
+%{summary} files
%package devel
%description devel
-%{summary}.
+%{summary} files
%package doc
%description doc
-%{summary}.
+%{summary} files
%prep
install -m 755 -d %{buildroot}%{_sysconfdir}/pam.d
install -m 644 data/tlm-login %{buildroot}%{_sysconfdir}/pam.d/
install -m 644 data/tlm-default-login %{buildroot}%{_sysconfdir}/pam.d/
+install -m 644 data/tlm-system-login %{buildroot}%{_sysconfdir}/pam.d/
%post
%files
%defattr(-,root,root,-)
%manifest %{name}.manifest
-%doc AUTHORS COPYING INSTALL NEWS README
+%license COPYING
+%doc AUTHORS NEWS README
%{_bindir}/%{name}
%{_bindir}/%{name}-sessiond
%{_bindir}/%{name}-client
%{_libdir}/lib%{name}*.so.*
%{_libdir}/%{name}/plugins/*.so*
-%{_unitdir}/tlm.service
+%config %{_unitdir}/tlm.service
%config(noreplace) %{_sysconfdir}/tlm.conf
%config %{_sysconfdir}/pam.d/tlm-login
%config %{_sysconfdir}/pam.d/tlm-default-login
+%config %{_sysconfdir}/pam.d/tlm-system-login
%files devel
*
* Contact: Imran Zaman <imran.zaman@intel.com>
* Amarnath Valluri <amarnath.valluri@linux.intel.com>
+ * Jussi Laako <jussi.laako@linux.intel.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
*/
#define TLM_CONFIG_GENERAL_ACCOUNTS_PLUGIN "ACCOUNTS_PLUGIN"
+/**
+ * TLM_CONFIG_GENERAL_NSEATS:
+ *
+ * Number of seats, instead seat information from systemd.
+ */
+#define TLM_CONFIG_GENERAL_NSEATS "NSEATS"
+
/**
* TLM_CONFIG_GENERAL_SESSION_CMD:
*
*/
#define TLM_CONFIG_GENERAL_SETUP_TERMINAL "SETUP_TERMINAL"
+/**
+ * TLM_CONFIG_GENERAL_SETUP_RUNTIME_DIR
+ *
+ * Setup XDG_RUNTIME_DIR for the user.
+ */
+#define TLM_CONFIG_GENERAL_SETUP_RUNTIME_DIR "SETUP_RUNTIME_DIR"
+
+/**
+ * TLM_CONFIG_GENERAL_RUNTIME_MODE
+ *
+ * Access mode for the XDG_RUNTIME_DIR.
+ */
+#define TLM_CONFIG_GENERAL_RUNTIME_MODE "RUNTIME_MODE"
+
/**
* TLM_CONFIG_GENERAL_TERMINATE_TIMEOUT
*
*/
#define TLM_CONFIG_GENERAL_PAUSE_SESSION "PAUSE_SESSION"
+/**
+ * TLM_CONFIG_GENERAL_SESSION_TYPE
+ *
+ * Specify session type, one of "unspecified", "tty", "x11", "wayland" or
+ * "mir".
+ */
+#define TLM_CONFIG_GENERAL_SESSION_TYPE "SESSION_TYPE"
+
#endif /* __TLM_GENERAL_CONFIG_H_ */
*/
#define TLM_CONFIG_SEAT_ACTIVE "ACTIVE"
+/**
+ * TLM_CONFIG_SEAT_NWATCH:
+ *
+ * Number of seat-ready watch items.
+ * Default value: 0
+ */
+#define TLM_CONFIG_SEAT_NWATCH "NWATCH"
+
+/**
+ * TLM_CONFIG_SEAT_WATCHX:
+ *
+ * Base key for seat-ready watch item.
+ */
+#define TLM_CONFIG_SEAT_WATCHX "WATCH"
+
+/**
+ * TLM_CONFIG_SEAT_VTNR:
+ *
+ * Specifies virtual terminal number to be used for the seat, note that
+ * this has effect only when SETUP_TERMINAL is enabled.
+ * Default value: 0
+ */
+#define TLM_CONFIG_SEAT_VTNR "VTNR"
+
#endif /* __TLM_CONFIG_SEAT_H_ */
}
#endif /* ENABLE_DEBUG */
-static void
-_set_defaults (
- TlmConfig *self)
-{
-
- /* accounts plugin => default */
- if (!tlm_config_has_key (self,
- TLM_CONFIG_GENERAL,
- TLM_CONFIG_GENERAL_ACCOUNTS_PLUGIN)) {
- tlm_config_set_string (self,
- TLM_CONFIG_GENERAL,
- TLM_CONFIG_GENERAL_ACCOUNTS_PLUGIN,
- "default");
- }
-
- /* default PAM service => tlm-login */
- if (!tlm_config_has_key (self,
- TLM_CONFIG_GENERAL,
- TLM_CONFIG_GENERAL_PAM_SERVICE)) {
- tlm_config_set_string (self,
- TLM_CONFIG_GENERAL,
- TLM_CONFIG_GENERAL_PAM_SERVICE,
- "tlm-login");
- }
-
- /* default user PAM service => tlm-default-login */
- if (!tlm_config_has_key (self,
- TLM_CONFIG_GENERAL,
- TLM_CONFIG_GENERAL_DEFAULT_PAM_SERVICE)) {
- tlm_config_set_string (self,
- TLM_CONFIG_GENERAL,
- TLM_CONFIG_GENERAL_DEFAULT_PAM_SERVICE,
- "tlm-default-login");
- }
-
- /* default user => guest */
- if (!tlm_config_has_key (self,
- TLM_CONFIG_GENERAL,
- TLM_CONFIG_GENERAL_DEFAULT_USER)) {
- tlm_config_set_string (self,
- TLM_CONFIG_GENERAL,
- TLM_CONFIG_GENERAL_DEFAULT_USER,
- "guest");
- }
-}
-
/**
* tlm_config_get_group:
* @self: (transfer none): an instance of #TlmConfig
* Get a string configuration value.
*
* Returns: the value corresponding to the key as an string. If the
- * key does not exist or cannot be converted to the integer, NULL is returned.
+ * key does not exist, NULL is returned.
*/
const gchar *
tlm_config_get_string (
return (const gchar *) g_hash_table_lookup (group_table, key);
}
+/**
+ * tlm_config_get_string_default:
+ * @self: (transfer none): an instance of #TlmConfig
+ * @group: (transfer none): the group name, NULL refers to General
+ * @key: (transfer none): the key name
+ * @value: (transfer none): default value
+ *
+ * Get a string configuration value.
+ *
+ * Returns: the value corresponding to the key as an string. If the
+ * key does not exist, given default value is returned.
+ */
+const gchar *
+tlm_config_get_string_default (
+ TlmConfig *self,
+ const gchar *group,
+ const gchar *key,
+ const gchar *value)
+{
+ const gchar *res;
+ g_return_val_if_fail (self && TLM_IS_CONFIG (self), NULL);
+ g_return_val_if_fail (key && key[0], NULL);
+
+ GHashTable *group_table = tlm_config_get_group (self, group);
+ if (!group_table) return NULL;
+
+ res = g_hash_table_lookup (group_table, key);
+ if (!res)
+ return value;
+ return res;
+}
+
/**
* tlm_config_set_string:
* @self: (transfer none): an instance of #TlmConfig
#ifdef ENABLE_DEBUG
_load_environment (self);
#endif
- _set_defaults (self);
}
static void
/*
* This file is part of tlm
*
- * Copyright (C) 2013 Intel Corporation.
+ * Copyright (C) 2013-2014 Intel Corporation.
*
* Contact: Imran Zaman <imran.zaman@intel.com>
* Amarnath Valluri <amarnath.valluri@linux.intel.com>
const gchar *group,
const gchar *key);
+const gchar*
+tlm_config_get_string_default (
+ TlmConfig *self,
+ const gchar *group,
+ const gchar *key,
+ const gchar *value);
+
void
tlm_config_set_string (
TlmConfig *self,
/*
* This file is part of tlm (Tizen Login Manager)
*
- * Copyright (C) 2013 Intel Corporation.
+ * Copyright (C) 2013-2014 Intel Corporation.
*
* Contact: Amarnath Valluri <amarnath.valluri@linux.intel.com>
* Jussi Laako <jussi.laako@linux.intel.com>
#include "config.h"
#include <glib.h>
+#include <glib-unix.h>
#include <gio/gio.h>
+#include <glib/gstdio.h>
#include <stdio.h>
#include <string.h>
+#include <errno.h>
+#include <limits.h>
+#include <sys/inotify.h>
G_DEFINE_TYPE (TlmManager, tlm_manager, G_TYPE_OBJECT);
static guint signals[SIG_MAX];
+typedef struct _TlmSeatWatchClosure
+{
+ TlmManager *manager;
+ gchar *seat_id;
+ gchar *seat_path;
+ guint nwatch;
+ GList *watch_list;
+} TlmSeatWatchClosure;
+
static void
_unref_auth_plugins (gpointer data)
{
{
GObjectClass *g_klass = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof(TlmManagerPrivate));
+ g_type_class_add_private (klass, sizeof (TlmManagerPrivate));
g_klass->constructor = tlm_manager_constructor;
g_klass->dispose = tlm_manager_dispose ;
manager->priv = priv;
- _load_accounts_plugin (manager, tlm_config_get_string (priv->config,
- TLM_CONFIG_GENERAL, TLM_CONFIG_GENERAL_ACCOUNTS_PLUGIN));
+ _load_accounts_plugin (manager,
+ tlm_config_get_string_default (priv->config,
+ TLM_CONFIG_GENERAL,
+ TLM_CONFIG_GENERAL_ACCOUNTS_PLUGIN,
+ "default"));
_load_auth_plugins (manager);
/* delete tlm runtime directory */
}
}
+
static void
-_add_seat (TlmManager *manager, const gchar *seat_id, const gchar *seat_path)
+_create_seat (TlmManager *manager,
+ const gchar *seat_id, const gchar *seat_path)
{
g_return_if_fail (manager && TLM_IS_MANAGER (manager));
TlmManagerPrivate *priv = TLM_MANAGER_PRIV (manager);
- if (!tlm_config_get_boolean (priv->config,
- seat_id,
- TLM_CONFIG_SEAT_ACTIVE,
- TRUE))
- return;
-
TlmSeat *seat = tlm_seat_new (priv->config,
seat_id,
seat_path);
"prepare-user",
G_CALLBACK (_prepare_user_cb),
manager);
-
g_hash_table_insert (priv->seats, g_strdup (seat_id), seat);
-
g_signal_emit (manager, signals[SIG_SEAT_ADDED], 0, seat, NULL);
if (tlm_config_get_boolean (priv->config,
}
}
+
+gboolean
+_seat_watch_cb (gint ifd, GIOCondition condition, gpointer user_data)
+{
+ g_return_val_if_fail (user_data, G_SOURCE_REMOVE);
+ TlmSeatWatchClosure *closure = (TlmSeatWatchClosure *) user_data;
+ struct inotify_event *ievent;
+ gsize size_event;
+
+ size_event = sizeof (struct inotify_event) + PATH_MAX + 1;
+ ievent = (struct inotify_event *) g_malloc (size_event);
+ DBG ("seat %s inotify wakeup", closure->seat_id);
+ while (read (ifd, ievent, size_event) > (ssize_t) sizeof (struct inotify_event) &&
+ closure->nwatch) {
+ DBG ("seat %s notify for %s", closure->seat_id, ievent->name);
+ GList *res = g_list_find_custom (closure->watch_list, ievent->name,
+ (GCompareFunc) g_strcmp0);
+ if (res) {
+ DBG ("seat %s watch for %s succeeded, %u left",
+ closure->seat_id, (gchar *) res->data, closure->nwatch - 1);
+ g_free (res->data);
+ closure->watch_list = g_list_remove (closure->watch_list, res);
+ inotify_rm_watch (ifd, ievent->wd);
+ closure->nwatch--;
+ }
+ }
+ g_free (ievent);
+ if (!closure->nwatch) {
+ _create_seat (closure->manager, closure->seat_id, closure->seat_path);
+ close (ifd);
+ g_object_unref (closure->manager);
+ g_free (closure->seat_id);
+ g_free (closure->seat_path);
+ g_list_free_full (closure->watch_list, g_free);
+ g_free (closure);
+ return G_SOURCE_REMOVE;
+ }
+ return G_SOURCE_CONTINUE;
+}
+
+
+static void
+_add_seat (TlmManager *manager, const gchar *seat_id, const gchar *seat_path)
+{
+ g_return_if_fail (manager && TLM_IS_MANAGER (manager));
+
+ TlmManagerPrivate *priv = TLM_MANAGER_PRIV (manager);
+
+ if (!tlm_config_get_boolean (priv->config,
+ seat_id,
+ TLM_CONFIG_SEAT_ACTIVE,
+ TRUE))
+ return;
+
+ guint nwatch = tlm_config_get_uint (priv->config,
+ seat_id,
+ TLM_CONFIG_SEAT_NWATCH,
+ 0);
+ if (nwatch) {
+ GList *watch_list = NULL;
+ guint x, watch_len = 0;
+ int ifd = inotify_init1 (IN_NONBLOCK|IN_CLOEXEC);
+ if (ifd < 0)
+ ERR ("inotify_init(): %s", strerror (errno));
+ for (x = 0; x < nwatch; x++) {
+ gchar *watchx = g_strdup_printf ("%s%u",
+ TLM_CONFIG_SEAT_WATCHX,
+ x);
+ const gchar *watch_item = tlm_config_get_string (priv->config,
+ seat_id,
+ watchx);
+ g_free (watchx);
+ if (!watch_item)
+ continue;
+ gchar *watch_path = g_path_get_dirname (watch_item);
+ if (inotify_add_watch (ifd, watch_path, IN_CREATE) < 0)
+ WARN ("inotify_add_watch(): %s", strerror (errno));
+ g_free (watch_path);
+ if (g_access (watch_item, 0)) {
+ watch_list = g_list_append (watch_list,
+ g_path_get_basename (watch_item));
+ watch_len++;
+ DBG ("seat %s waiting for %s", seat_id, watch_item);
+ }
+ }
+
+ if (watch_len) {
+ TlmSeatWatchClosure *watch_closure =
+ g_new0 (TlmSeatWatchClosure, 1);
+ watch_closure->manager = g_object_ref (manager);
+ watch_closure->seat_id = g_strdup (seat_id);
+ watch_closure->seat_path = g_strdup (seat_path);
+ watch_closure->nwatch = watch_len;
+ watch_closure->watch_list = watch_list;
+ g_unix_fd_add (ifd, G_IO_IN, _seat_watch_cb, watch_closure);
+ return;
+ } else {
+ close (ifd);
+ }
+ }
+
+ _create_seat (manager, seat_id, seat_path);
+}
+
static void
_manager_hashify_seats (TlmManager *manager, GVariant *hash_map)
{
{
g_return_val_if_fail (manager && TLM_IS_MANAGER (manager), FALSE);
- _manager_sync_seats (manager);
- _manager_subscribe_seat_changes (manager);
+ guint nseats = tlm_config_get_uint (manager->priv->config,
+ TLM_CONFIG_GENERAL,
+ TLM_CONFIG_GENERAL_NSEATS,
+ 0);
+ if (nseats) {
+ guint i;
+ for (i = 0; i < nseats; i++) {
+ gchar *id = g_strdup_printf("seat%u", i);
+ DBG ("adding virtual seat '%s'", id);
+ _add_seat (manager, id, NULL);
+ g_free (id);
+ }
+ } else {
+ _manager_sync_seats (manager);
+ _manager_subscribe_seat_changes (manager);
+ }
manager->priv->is_started = TRUE;
DBG ("sighup recvd. reload configuration and account plugin");
tlm_config_reload (manager->priv->config);
g_clear_object (&manager->priv->account_plugin);
- _load_accounts_plugin (manager, tlm_config_get_string (
- manager->priv->config, TLM_CONFIG_GENERAL,
- TLM_CONFIG_GENERAL_ACCOUNTS_PLUGIN));
+ _load_accounts_plugin (manager,
+ tlm_config_get_string_default (manager->priv->config,
+ TLM_CONFIG_GENERAL,
+ TLM_CONFIG_GENERAL_ACCOUNTS_PLUGIN,
+ "default"));
}
+
{
DelayClosure *delay_closure = (DelayClosure *) user_data;
- g_return_val_if_fail (user_data, FALSE);
+ DBG ("delayed relogin for closure %p", delay_closure);
+ g_return_val_if_fail (user_data, G_SOURCE_REMOVE);
+ DBG ("delayed relogin for seat=%s, service=%s, user=%s",
+ delay_closure->seat->priv->id,
+ delay_closure->service,
+ delay_closure->username);
tlm_seat_create_session (delay_closure->seat,
delay_closure->service,
delay_closure->username,
if (delay_closure->environment)
g_hash_table_unref (delay_closure->environment);
g_slice_free (DelayClosure, delay_closure);
- return FALSE;
+ return G_SOURCE_REMOVE;
}
gboolean
gchar *default_user = NULL;
if (!service) {
+ DBG ("PAM service not defined, looking up configuration");
service = tlm_config_get_string (priv->config,
priv->id,
username ? TLM_CONFIG_GENERAL_PAM_SERVICE : TLM_CONFIG_GENERAL_DEFAULT_PAM_SERVICE);
service = tlm_config_get_string (priv->config,
TLM_CONFIG_GENERAL,
username ? TLM_CONFIG_GENERAL_PAM_SERVICE : TLM_CONFIG_GENERAL_DEFAULT_PAM_SERVICE);
+ if (!service)
+ service = username ? "tlm-login" : "tlm-default-login";
}
+ DBG ("using PAM service %s for seat %s", service, priv->id);
+
if (!username) {
const gchar *name_tmpl =
- tlm_config_get_string (priv->config,
- priv->id,
- TLM_CONFIG_GENERAL_DEFAULT_USER);
+ tlm_config_get_string_default (priv->config,
+ priv->id,
+ TLM_CONFIG_GENERAL_DEFAULT_USER,
+ "guest");
if (!name_tmpl)
- name_tmpl = tlm_config_get_string (priv->config,
- TLM_CONFIG_GENERAL,
- TLM_CONFIG_GENERAL_DEFAULT_USER);
+ name_tmpl = tlm_config_get_string_default (priv->config,
+ TLM_CONFIG_GENERAL,
+ TLM_CONFIG_GENERAL_DEFAULT_USER,
+ "guest");
if (name_tmpl) default_user = _build_user_name (name_tmpl, priv->id);
if (default_user)
g_signal_emit (seat,
env_item = g_strdup_printf ("%s=%s", var, value);
else
env_item = g_strdup_printf ("%s", var);
+ DBG (" pam_putenv(\"%s\")", env_item);
res = pam_putenv (auth_session->priv->pam_handle, env_item);
g_free (env_item);
if (res != PAM_SUCCESS) {
}
priv->session_id = _auth_session_get_logind_session_id (error);
- if (!priv->session_id) {
- pam_close_session (priv->pam_handle, 0);
- return FALSE;
- }
return TRUE;
}
g_object_unref (daemon);
return NULL;
}
- DBG("Started session daemon '%p' at path '%s' on conneciton '%p'",
+ DBG("Started session daemon '%p' at path '%s' on connection '%p'",
daemon, TLM_SESSION_OBJECTPATH, daemon->priv->connection);
g_dbus_connection_start_message_processing (daemon->priv->connection);
#include <sys/socket.h>
#include <netdb.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+
#include "tlm-session.h"
#include "tlm-auth-session.h"
#include "common/tlm-log.h"
#include "common/tlm-utils.h"
#include "common/tlm-error.h"
#include "common/tlm-config-general.h"
+#include "common/tlm-config-seat.h"
G_DEFINE_TYPE (TlmSession, tlm_session, G_TYPE_OBJECT);
pid_t child_pid;
uid_t tty_uid;
gid_t tty_gid;
+ unsigned vtnr;
struct termios stdin_state, stdout_state, stderr_state;
gchar *seat_id;
gchar *service;
guint timer_id;
guint child_watch_id;
gchar *sessionid;
+ gchar *xdg_runtime_dir;
+ gboolean setup_runtime_dir;
gboolean can_emit_signal;
gboolean is_child_up;
gboolean session_pause;
_clear_session (TlmSession *session)
{
tlm_session_reset_tty (session);
+ if (session->priv->setup_runtime_dir)
+ tlm_utils_delete_dir (session->priv->xdg_runtime_dir);
if (session->priv->timer_id) {
g_source_remove (session->priv->timer_id);
g_clear_string (&session->priv->service);
g_clear_string (&session->priv->username);
g_clear_string (&session->priv->sessionid);
+ g_clear_string (&session->priv->xdg_runtime_dir);
}
static void
static gboolean
_set_terminal (TlmSessionPrivate *priv)
{
+ gboolean res = TRUE;
int i;
int tty_fd;
pid_t tty_pgid;
- const char *tty_dev;
+ gchar *tty_dev = NULL;
struct stat tty_stat;
- tty_dev = ttyname (0);
+ DBG ("VTNR is %u", priv->vtnr);
+ if (priv->vtnr > 0) {
+ tty_dev = g_strdup_printf ("/dev/tty%u", priv->vtnr);
+ } else {
+ tty_dev = g_strdup (ttyname (0));
+ }
DBG ("trying to setup TTY '%s'", tty_dev);
if (!tty_dev) {
WARN ("No TTY");
- return FALSE;
+ res = FALSE;
+ goto term_exit;
}
if (access (tty_dev, R_OK|W_OK)) {
WARN ("TTY not accessible: %s", strerror(errno));
- return FALSE;
+ res = FALSE;
+ goto term_exit;
}
if (lstat (tty_dev, &tty_stat)) {
WARN ("lstat() failed: %s", strerror(errno));
- return FALSE;
+ res = FALSE;
+ goto term_exit;
}
if (tty_stat.st_nlink > 1 ||
!S_ISCHR (tty_stat.st_mode) ||
strncmp (tty_dev, "/dev/", 5)) {
WARN ("Invalid TTY");
- return FALSE;
+ res = FALSE;
+ goto term_exit;
}
tty_fd = open (tty_dev, O_RDWR | O_NONBLOCK);
if (tty_fd < 0) {
WARN ("open() failed: %s", strerror(errno));
- return FALSE;
+ res = FALSE;
+ goto term_exit;
}
if (!isatty (tty_fd)) {
close (tty_fd);
WARN ("isatty() failed");
- return FALSE;
+ res = FALSE;
+ goto term_exit;
}
if (ioctl (tty_fd, TIOCSCTTY, 1))
WARN ("ioctl(TIOCSCTTY) failed: %s", strerror(errno));
dup2 (tty_fd, 2);
close (tty_fd);
- return TRUE;
+term_exit:
+ g_free (tty_dev);
+ return res;
}
static gboolean
if (home_dir) _setenv_to_session ("HOME", home_dir, priv);
shell = tlm_user_get_shell (priv->username);
if (shell) _setenv_to_session ("SHELL", shell, priv);
- _setenv_to_session ("XDG_SEAT", priv->seat_id, priv);
+ // TODO: figure out if this should be set or not for logical seats (NSEATS)
+ if (priv->seat_id) _setenv_to_session ("XDG_SEAT", priv->seat_id, priv);
const gchar *xdg_data_dirs =
tlm_config_get_string (priv->config,
xdg_data_dirs = "/usr/share:/usr/local/share";
_setenv_to_session ("XDG_DATA_DIRS", xdg_data_dirs, priv);
+ if (priv->xdg_runtime_dir)
+ _setenv_to_session ("XDG_RUNTIME_DIR", priv->xdg_runtime_dir, priv);
+
if (priv->env_hash)
g_hash_table_foreach (priv->env_hash,
(GHFunc) _setenv_to_session,
TlmSession *session)
{
gint i;
+ guint rtdir_perm = 0700;
const gchar *pattern = "('.*?'|\".*?\"|\\S+)";
+ const gchar *rtdir_perm_str;
const char *home;
const char *shell = NULL;
const char *env_shell = NULL;
+ gchar *uid_str;
gchar **args = NULL;
gchar **args_iter = NULL;
TlmSessionPrivate *priv = session->priv;
priv->auth_session));
DBG ("session ID : %s", priv->sessionid);
+ if (tlm_config_has_key (priv->config,
+ priv->seat_id,
+ TLM_CONFIG_GENERAL_SETUP_RUNTIME_DIR)) {
+ priv->setup_runtime_dir = tlm_config_get_boolean (priv->config,
+ priv->seat_id,
+ TLM_CONFIG_GENERAL_SETUP_RUNTIME_DIR,
+ FALSE);
+ } else {
+ priv->setup_runtime_dir = tlm_config_get_boolean (priv->config,
+ TLM_CONFIG_GENERAL,
+ TLM_CONFIG_GENERAL_SETUP_RUNTIME_DIR,
+ FALSE);
+ }
+ rtdir_perm_str = tlm_config_get_string (priv->config,
+ priv->seat_id,
+ TLM_CONFIG_GENERAL_RUNTIME_MODE);
+ if (!rtdir_perm_str)
+ rtdir_perm_str = tlm_config_get_string (priv->config,
+ TLM_CONFIG_GENERAL,
+ TLM_CONFIG_GENERAL_RUNTIME_MODE);
+ uid_str = g_strdup_printf ("%u", tlm_user_get_uid (priv->username));
+ priv->xdg_runtime_dir = g_build_filename ("/run/user",
+ uid_str,
+ NULL);
+ g_free (uid_str);
+ if (priv->setup_runtime_dir) {
+ tlm_utils_delete_dir (priv->xdg_runtime_dir);
+ if (g_mkdir_with_parents ("/run/user", 0755))
+ WARN ("g_mkdir_with_parents(\"/run/user\") failed");
+ if (rtdir_perm_str)
+ sscanf(rtdir_perm_str, "%o", &rtdir_perm);
+ DBG ("setting up XDG_RUNTIME_DIR=%s mode=%o",
+ priv->xdg_runtime_dir, rtdir_perm);
+ if (g_mkdir (priv->xdg_runtime_dir, rtdir_perm))
+ WARN ("g_mkdir(\"%s\") failed", priv->xdg_runtime_dir);
+ if (chown (priv->xdg_runtime_dir,
+ tlm_user_get_uid (priv->username),
+ tlm_user_get_gid (priv->username)))
+ WARN ("chown(\"%s\"): %s", priv->xdg_runtime_dir, strerror(errno));
+ if (chmod (priv->xdg_runtime_dir, rtdir_perm))
+ WARN ("chmod(\"%s\"): %s", priv->xdg_runtime_dir, strerror(errno));
+ } else {
+ DBG ("not setting up XDG_RUNTIME_DIR");
+ }
+
priv->child_pid = fork ();
if (priv->child_pid) {
DBG ("establish handler for the child pid %u", priv->child_pid);
WARN ("setsid() failed: %s", strerror (errno));
DBG ("new pgid=%u", getpgrp());
- if (tlm_config_get_boolean (priv->config,
- TLM_CONFIG_GENERAL,
- TLM_CONFIG_GENERAL_SETUP_TERMINAL,
- FALSE)) {
+ gboolean setup_terminal;
+ if (tlm_config_has_key (priv->config,
+ priv->seat_id,
+ TLM_CONFIG_GENERAL_SETUP_TERMINAL)) {
+ setup_terminal = tlm_config_get_boolean (priv->config,
+ priv->seat_id,
+ TLM_CONFIG_GENERAL_SETUP_TERMINAL,
+ FALSE);
+ } else {
+ setup_terminal = tlm_config_get_boolean (priv->config,
+ TLM_CONFIG_GENERAL,
+ TLM_CONFIG_GENERAL_SETUP_TERMINAL,
+ FALSE);
+ }
+ if (setup_terminal) {
/* usually terminal settings are handled by PAM */
_set_terminal (priv);
}
DBG (" state:\n\truid=%d, euid=%d, rgid=%d, egid=%d (%s)",
getuid(), geteuid(), getgid(), getegid(), priv->username);
_set_environment (priv);
- umask(0700);
+ umask(0077);
home = getenv("HOME");
if (home) {
} else WARN ("Could not get home directory");
shell = tlm_config_get_string (priv->config,
- TLM_CONFIG_GENERAL,
+ priv->seat_id,
TLM_CONFIG_GENERAL_SESSION_CMD);
+ if (!shell)
+ shell = tlm_config_get_string (priv->config,
+ TLM_CONFIG_GENERAL,
+ TLM_CONFIG_GENERAL_SESSION_CMD);
if (shell) {
DBG ("Session command : %s", shell);
temp_strv = g_regex_split_simple (pattern,
GError *error = NULL;
g_return_val_if_fail (session && TLM_IS_SESSION(session), FALSE);
TlmSessionPrivate *priv = TLM_SESSION_PRIV(session);
+ const gchar *session_type;
if (!seat_id || !service || !username) {
error = TLM_GET_ERROR_FOR_ID (TLM_ERROR_SESSION_CREATION_FAILURE,
return FALSE;
}
- tlm_auth_session_putenv (priv->auth_session, "XDG_SEAT", priv->seat_id);
+ priv->vtnr = tlm_config_get_uint (priv->config,
+ priv->seat_id,
+ TLM_CONFIG_SEAT_VTNR,
+ 0);
+ session_type = tlm_config_get_string (priv->config,
+ priv->seat_id,
+ TLM_CONFIG_GENERAL_SESSION_TYPE);
+ if (!session_type)
+ session_type = tlm_config_get_string (priv->config,
+ TLM_CONFIG_GENERAL,
+ TLM_CONFIG_GENERAL_SESSION_TYPE);
+ if (!tlm_config_has_key (priv->config,
+ TLM_CONFIG_GENERAL,
+ TLM_CONFIG_GENERAL_NSEATS))
+ tlm_auth_session_putenv (priv->auth_session,
+ "XDG_SEAT",
+ priv->seat_id);
+ if (session_type) {
+ tlm_auth_session_putenv (priv->auth_session,
+ "XDG_SESSION_CLASS",
+ "user");
+ tlm_auth_session_putenv (priv->auth_session,
+ "XDG_SESSION_TYPE",
+ session_type);
+ }
+ if (priv->vtnr > 0) {
+ gchar *vtnr_str = g_strdup_printf("%u", priv->vtnr);
+ tlm_auth_session_putenv (priv->auth_session,
+ "XDG_VTNR",
+ vtnr_str);
+ g_free (vtnr_str);
+ }
if (!tlm_auth_session_authenticate (priv->auth_session, &error)) {
if (error) {
FALSE);
if (priv->session_pause) {
_set_environment (priv);
- umask(0700);
+ umask(0077);
}
if (!tlm_auth_session_open (priv->auth_session, &error)) {
tlm_utils_log_utmp_entry (priv->username);
if (!priv->session_pause)
_exec_user_session (session);
- g_signal_emit (session, signals[SIG_SESSION_CREATED], 0, priv->sessionid);
+ g_signal_emit (session, signals[SIG_SESSION_CREATED], 0,
+ priv->sessionid ? priv->sessionid : "");
return TRUE;
}
daemontest_CFLAGS = \
-I$(abs_top_srcdir)/src \
+ -I$(abs_top_builddir)/src \
$(TLM_CFLAGS) \
$(CHECK_CFLAGS) \
-U G_LOG_DOMAIN \
daemontest_SOURCES = daemon-test.c
daemontest_CFLAGS = \
-I$(abs_top_srcdir)/src \
+ -I$(abs_top_builddir)/src \
$(TLM_CFLAGS) \
$(CHECK_CFLAGS) \
-U G_LOG_DOMAIN \