fix the closing session bug, even if next user authentication is failed.
[platform/core/system/tlm.git] / src / common / tlm-config-general.h
1 /* vi: set et sw=4 ts=4 cino=t0,(0: */
2 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 /*
4  * This file is part of tlm
5  *
6  * Copyright (C) 2013-2014 Intel Corporation.
7  *
8  * Contact: Imran Zaman <imran.zaman@intel.com>
9  *          Amarnath Valluri <amarnath.valluri@linux.intel.com>
10  *          Jussi Laako <jussi.laako@linux.intel.com>
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful, but
18  * WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25  * 02110-1301 USA
26  */
27
28 #ifndef __TLM_CONFIG_GENERAL_H_
29 #define __TLM_CONFIG_GENERAL_H_
30
31 /**
32  * SECTION:tlm-config-general
33  * @title: General configuration
34  * @short_description: tlm general configuration keys
35  *
36  * General configuration keys are defined below. See #TlmConfig for how to use
37  * them.
38  */
39
40 /**
41  * TLM_CONFIG_GENERAL:
42  *
43  * A prefix for general keys. Should be used only when defining new keys.
44  */
45 #define TLM_CONFIG_GENERAL                  "General"
46
47 /**
48  * TLM_CONFIG_GENERAL_ACCOUNTS_PLUGIN:
49  *
50  * Accounts plugin (implementation of #TlmAccountPlugin) to use.
51  * Default value: "default". If Tlm has been configured with --enable-debug, the
52  * value can be overriden with TLM_ACCOUNT_PLUGIN environment variable.
53  */
54 #define TLM_CONFIG_GENERAL_ACCOUNTS_PLUGIN  "ACCOUNTS_PLUGIN"
55
56 /**
57  * TLM_CONFIG_GENERAL_NSEATS:
58  *
59  * Number of seats, instead seat information from systemd.
60  */
61 #define TLM_CONFIG_GENERAL_NSEATS           "NSEATS"
62
63 /**
64  * TLM_CONFIG_GENERAL_SESSION_CMD:
65  *
66  * Session command line: the command run after successfull login. If the value
67  * is not defined in the config file, user's shell from /etc/passwd is used,
68  * and if that is not defined, the fallback is "systemd --user"
69  */
70 #define TLM_CONFIG_GENERAL_SESSION_CMD      "SESSION_CMD"
71
72 /**
73  * TLM_CONFIG_GENERAL_SESSION_PATH:
74  *
75  * Default value for PATH environment variable in user's session. If not set,
76  * "/usr/local/bin:/usr/bin:/bin" is used.
77  */
78 #define TLM_CONFIG_GENERAL_SESSION_PATH     "SESSION_PATH"
79
80 /**
81  * TLM_CONFIG_GENERAL_DATA_DIRS:
82  *
83  * Default value for XDG_DATA_DIRS environment variable. If not set,
84  * "/usr/share:/usr/local/share" is used.
85  */
86 #define TLM_CONFIG_GENERAL_DATA_DIRS        "XDG_DATA_DIRS"
87
88 /**
89  * TLM_CONFIG_GENERAL_AUTO_LOGIN
90  *
91  * Autologin to default user : TRUE/FALSE. TRUE if value is not set
92  *
93  * Whether to automatically log in the default user on startup and when another
94  * user session has been terminated.
95  *
96  */
97 #define TLM_CONFIG_GENERAL_AUTO_LOGIN       "AUTO_LOGIN"
98
99 /**
100  * TLM_CONFIG_GENERAL_PREPARE_DEFAULT
101  *
102  * Prepare default user before auto-login: TRUE/FALSE (FALSE if value not set).
103  *
104  * If set to TRUE, methods of #TlmAccountPlugin are used to set up the default
105  * user's account before auto-login.
106  */
107 #define TLM_CONFIG_GENERAL_PREPARE_DEFAULT  "PREPARE_DEFAULT"
108
109 /**
110  * TLM_CONFIG_GENERAL_PAM_SERVICE:
111  *
112  * PAM service file to use for authentication and session setup. Default value: "tlm-login".
113  */ 
114 #define TLM_CONFIG_GENERAL_PAM_SERVICE      "PAM_SERVICE"
115
116
117 #define TLM_CONFIG_PAM_AUTHENTICATION_SERVICE   "PAM_AUTHENTICATION_SERVICE"
118
119 /**
120  * TLM_CONFIG_GENERAL_DEFAULT_PAM_SERVICE:
121  *
122  * PAM service file to use for default user authentication and session setup. Default value: "tlm-default-login".
123  */
124 #define TLM_CONFIG_GENERAL_DEFAULT_PAM_SERVICE "DEFAULT_PAM_SERVICE"
125
126 /**
127  * TLM_CONFIG_GENERAL_DEFAULT_USER:
128  *
129  * Default username for autologin. Default value: "guest".
130  *
131  * The value can include: \%S - seat number, \%I - seat id string.
132  */
133 #define TLM_CONFIG_GENERAL_DEFAULT_USER     "DEFAULT_USER"
134
135 /**
136  * TLM_CONFIG_GENERAL_SETUP_TERMINAL
137  *
138  * Setup terminal while creating session : TRUE/FALSE. (TRUE if not set).
139  *
140  * Whether to connect the standard input, output and error streams for a newly
141  * created session to the terminal device.
142  */
143 #define TLM_CONFIG_GENERAL_SETUP_TERMINAL   "SETUP_TERMINAL"
144
145 /**
146  * TLM_CONFIG_GENERAL_SETUP_RUNTIME_DIR
147  *
148  * Setup XDG_RUNTIME_DIR for the user.
149  */
150 #define TLM_CONFIG_GENERAL_SETUP_RUNTIME_DIR "SETUP_RUNTIME_DIR"
151
152 /**
153  * TLM_CONFIG_GENERAL_RUNTIME_MODE
154  *
155  * Access mode for the XDG_RUNTIME_DIR.
156  */
157 #define TLM_CONFIG_GENERAL_RUNTIME_MODE     "RUNTIME_MODE"
158
159 /**
160  * TLM_CONFIG_GENERAL_TERMINATE_TIMEOUT
161  *
162  * Timeout for session termination in seconds. Default value: 10
163  *
164  * Specifies timeout between sending different termination signals in case
165  * the previous signal wasn't obeyed.
166  */
167 #define TLM_CONFIG_GENERAL_TERMINATE_TIMEOUT "TERMINATE_TIMEOUT" 
168
169 /**
170  * TLM_CONFIG_GENERAL_X11_SESSION
171  *
172  * Use X11 style sessions. Default value: 0
173  *
174  * Switches session handling style to X11 sessions where display manager
175  * is terminated and Xserver restarted for each session.
176  */
177 #define TLM_CONFIG_GENERAL_X11_SESSION      "X11_SESSION"
178
179 /**
180  * TLM_CONFIG_GENERAL_PAUSE_SESSION
181  *
182  * Do not actually launch anything after creating session, let systemd
183  * handle it through PAM.
184  */
185 #define TLM_CONFIG_GENERAL_PAUSE_SESSION    "PAUSE_SESSION"
186
187 /**
188  * TLM_CONFIG_GENERAL_SESSION_TYPE
189  *
190  * Specify session type, one of "unspecified", "tty", "x11", "wayland" or
191  * "mir".
192  */
193 #define TLM_CONFIG_GENERAL_SESSION_TYPE     "SESSION_TYPE"
194
195 #endif /* __TLM_GENERAL_CONFIG_H_ */