Fix default configuration and empty terminal handling 82/20282/2 accepted/tizen/common/20140506.123125 accepted/tizen/ivi/20140430.143925 submit/tizen/20140430.130050
authorJussi Laako <jussi.laako@linux.intel.com>
Wed, 30 Apr 2014 12:51:38 +0000 (15:51 +0300)
committerJussi Laako <jussi.laako@linux.intel.com>
Wed, 30 Apr 2014 12:55:31 +0000 (15:55 +0300)
Change-Id: If23a8b756cfe6e958fe7696ac2c3b87f90c242c3

data/tlm.conf.in
data/tlm.service [new file with mode: 0644]
packaging/tlm.changes
packaging/tlm.spec
src/daemon/tlm-auth-session.c

index d6b5371..1638c6c 100644 (file)
@@ -16,7 +16,7 @@ AUTO_LOGIN=1
 #
 # Prepare default/guest users before auto-login
 # Default: off
-PREPARE_DEFAULT=1
+#PREPARE_DEFAULT=1
 #
 # PAM service file to use
 PAM_SERVICE=tlm-login
@@ -46,7 +46,7 @@ PAM_SERVICE=tlm-login
 #
 # Do not launch anything, let systemd handle it through PAM
 # Default: off
-#PAUSE_SESSION=1
+PAUSE_SESSION=1
 #
 #
 # Seat specific settings where the group name is seat id
diff --git a/data/tlm.service b/data/tlm.service
new file mode 100644 (file)
index 0000000..8f471a0
--- /dev/null
@@ -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
index 8f765af..af51dbb 100644 (file)
@@ -1,3 +1,6 @@
+* Wed Apr 30 2014 Jussi Laako <jussi.laako@linux.intel.com>
+- Update default configurations
+
 * Thu Mar 13 2014 Jussi Laako <jussi.laako@linux.intel.com>
 - Update to 0.0.2
 
index d3ddb19..1b9785b 100644 (file)
@@ -5,7 +5,7 @@
 Name: tlm
 Summary: Login manager for Tizen
 Version: 0.0.2
-Release: 2
+Release: 3
 Group: System/Service
 License: LGPL-2.1+
 Source: %{name}-%{version}.tar.gz
@@ -62,6 +62,8 @@ make %{?_smp_mflags}
 %install
 rm -rf %{buildroot}
 %make_install
+install -m 755 -d %{buildroot}%{_libdir}/systemd/system
+install -m 644 data/tlm.service %{buildroot}%{_libdir}/systemd/system/
 cp -a %{SOURCE1001} %{buildroot}%{_datadir}/%{name}.manifest
 
 
@@ -79,6 +81,7 @@ cp -a %{SOURCE1001} %{buildroot}%{_datadir}/%{name}.manifest
 %{_bindir}/%{name}
 %{_libdir}/lib%{name}*.so.*
 %{_libdir}/%{name}/plugins/*.so*
+%{_libdir}/systemd/system/tlm.service
 %config(noreplace) %{_sysconfdir}/tlm.conf
 
 
index fa72c9f..efa11a7 100644 (file)
@@ -358,13 +358,15 @@ tlm_auth_session_start (TlmAuthSession *auth_session)
 
     TlmAuthSessionPrivate *priv = TLM_AUTH_SESSION_PRIV (auth_session);
 
-    /*pam_tty = getenv ("DISPLAY");
-    if (!pam_tty) {*/
+    pam_tty = getenv ("DISPLAY");
+    if (!pam_tty) {
         pam_tty = ttyname (0);
-    //}
-    DBG ("setting PAM_TTY to '%s'", pam_tty);
-    if (pam_set_item (priv->pam_handle, PAM_TTY, pam_tty) != PAM_SUCCESS) {
-            WARN ("pam_set_item(PAM_TTY, '%s')", pam_tty);
+    }
+    if (pam_tty) {
+        DBG ("setting PAM_TTY to '%s'", pam_tty);
+        if (pam_set_item (priv->pam_handle, PAM_TTY, pam_tty) != PAM_SUCCESS) {
+                WARN ("pam_set_item(PAM_TTY, '%s')", pam_tty);
+        }
     }
 
     pam_ruser = tlm_user_get_name (geteuid());