~ubuntu-branches/debian/jessie/systemd/jessie

« back to all changes in this revision

Viewing changes to man/sd_seat_get_active.xml

  • Committer: Package Import Robot
  • Author(s): Tollef Fog Heen, Tollef Fog Heen, Michael Biebl
  • Date: 2012-04-03 19:59:17 UTC
  • mfrom: (1.1.10) (6.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20120403195917-l532urrbg4pkreas
Tags: 44-1
[ Tollef Fog Heen ]
* New upstream version.
  - Backport 3492207: journal: PAGE_SIZE is not known on ppc and other
    archs
  - Backport 5a2a2a1: journal: react with immediate rotation to a couple
    of more errors
  - Backport 693ce21: util: never follow symlinks in rm_rf_children()
    Fixes CVE-2012-1174, closes: #664364
* Drop output message from init-functions hook, it's pointless.
* Only rmdir /lib/init/rw if it exists.
* Explicitly order debian-fixup before sysinit.target to prevent a
  possible race condition with the creation of sockets.  Thanks to
  Michael Biebl for debugging this.
* Always restart the initctl socket on upgrades, to mask sysvinit
  removing it.

[ Michael Biebl ]
* Remove workaround for non-interactive sessions from pam config again.
* Create compat /dev/initctl symlink in case we are upgrading from a system
  running a newer version of sysvinit (using /run/initctl) and sysvinit is
  replaced with systemd-sysv during the upgrade. Closes: #663219
* Install new man pages.
* Build-Depend on valac (>= 0.12) instead of valac-0.12. Closes: #663323

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version='1.0'?> <!--*-nxml-*-->
 
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
 
3
        "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
4
 
 
5
<!--
 
6
  This file is part of systemd.
 
7
 
 
8
  Copyright 2010 Lennart Poettering
 
9
 
 
10
  systemd is free software; you can redistribute it and/or modify it
 
11
  under the terms of the GNU General Public License as published by
 
12
  the Free Software Foundation; either version 2 of the License, or
 
13
  (at your option) any later version.
 
14
 
 
15
  systemd is distributed in the hope that it will be useful, but
 
16
  WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 
18
  General Public License for more details.
 
19
 
 
20
  You should have received a copy of the GNU General Public License
 
21
  along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
22
-->
 
23
 
 
24
<refentry id="sd_seat_get_active">
 
25
 
 
26
        <refentryinfo>
 
27
                <title>sd_seat_get_active</title>
 
28
                <productname>systemd</productname>
 
29
 
 
30
                <authorgroup>
 
31
                        <author>
 
32
                                <contrib>Developer</contrib>
 
33
                                <firstname>Lennart</firstname>
 
34
                                <surname>Poettering</surname>
 
35
                                <email>lennart@poettering.net</email>
 
36
                        </author>
 
37
                </authorgroup>
 
38
        </refentryinfo>
 
39
 
 
40
        <refmeta>
 
41
                <refentrytitle>sd_seat_get_active</refentrytitle>
 
42
                <manvolnum>3</manvolnum>
 
43
        </refmeta>
 
44
 
 
45
        <refnamediv>
 
46
                <refname>sd_seat_get_active</refname>
 
47
                <refname>sd_seat_get_sessions</refname>
 
48
                <refname>sd_seat_can_multi_session</refname>
 
49
                <refpurpose>Determine state of a specific seat</refpurpose>
 
50
        </refnamediv>
 
51
 
 
52
        <refsynopsisdiv>
 
53
                <funcsynopsis>
 
54
                        <funcsynopsisinfo>#include &lt;systemd/sd-login.h&gt;</funcsynopsisinfo>
 
55
 
 
56
                        <funcprototype>
 
57
                                <funcdef>int <function>sd_seat_get_active</function></funcdef>
 
58
                                <paramdef>const char* <parameter>seat</parameter></paramdef>
 
59
                                <paramdef>char** <parameter>session</parameter></paramdef>
 
60
                                <paramdef>uid_t* <parameter>uid</parameter></paramdef>
 
61
                        </funcprototype>
 
62
 
 
63
                        <funcprototype>
 
64
                                <funcdef>int <function>sd_seat_get_sessions</function></funcdef>
 
65
                                <paramdef>const char* <parameter>seat</parameter></paramdef>
 
66
                                <paramdef>char*** <parameter>sessions</parameter></paramdef>
 
67
                                <paramdef>uid_t** <parameter>uid</parameter></paramdef>
 
68
                                <paramdef>unsigned* <parameter>n_uids</parameter></paramdef>
 
69
                        </funcprototype>
 
70
 
 
71
                        <funcprototype>
 
72
                                <funcdef>int <function>sd_seat_can_multi_session</function></funcdef>
 
73
                                <paramdef>const char* <parameter>seat</parameter></paramdef>
 
74
                        </funcprototype>
 
75
                </funcsynopsis>
 
76
        </refsynopsisdiv>
 
77
 
 
78
        <refsect1>
 
79
                <title>Description</title>
 
80
 
 
81
                <para><function>sd_seat_get_active()</function> may be
 
82
                used to determine which session is currently active on
 
83
                a seat, if there is any. Returns the session
 
84
                identifier and the user identifier of the Unix user
 
85
                the session is belonging to. Either the session or the
 
86
                user identifier parameter can be be passed NULL, in
 
87
                case only one of the parameters shall be queried. The
 
88
                returned string needs to be freed with the libc
 
89
                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
 
90
                call after use.</para>
 
91
 
 
92
                <para><function>sd_seat_get_sessions()</function> may
 
93
                be used to determine all sessions on the specified
 
94
                seat. Returns two arrays, one (NULL terminated) with
 
95
                the session identifiers of the sessions and one with
 
96
                the user identifiers of the Unix users the sessions
 
97
                belong to. An additional parameter may be used to
 
98
                return the number of entries in the latter array. The
 
99
                two arrays and the latter parameter may be passed as
 
100
                NULL in case these values need not to be
 
101
                determined. The arrays and the strings referenced by
 
102
                them need to be freed with the libc
 
103
                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
 
104
                call after use. Note that instead of an empty array
 
105
                NULL may be returned and should be considered
 
106
                equivalent to an empty array.</para>
 
107
 
 
108
                <para><function>sd_seat_can_multi_session()</function>
 
109
                may be used to determine whether a specific seat is
 
110
                capable of multi-session, i.e. allows multiple login
 
111
                sessions in parallel (whith only one being active at a
 
112
                time).</para>
 
113
 
 
114
                <para>If the <literal>seat</literal> parameter of any
 
115
                of these functions is passed as NULL the operation is
 
116
                executed for the seat of the session of the calling
 
117
                process, if there is any.</para>
 
118
        </refsect1>
 
119
 
 
120
        <refsect1>
 
121
                <title>Return Value</title>
 
122
 
 
123
                <para> On success
 
124
                <function>sd_seat_get_active()</function> return
 
125
                return 0 or a positive integer. On success
 
126
                <function>sd_seat_get_sessions()</function> returns
 
127
                the number of entries in the session identifier
 
128
                array. If the test succeeds
 
129
                <function>sd_seat_can_multi_session</function> returns
 
130
                a positive integer, if it fails 0. On failure, these
 
131
                calls return a negative errno-style error code.</para>
 
132
        </refsect1>
 
133
 
 
134
        <refsect1>
 
135
                <title>Notes</title>
 
136
 
 
137
                <para>The <function>sd_seat_get_active()</function>,
 
138
                <function>sd_seat_get_sessions()</function>, and
 
139
                <function>sd_seat_can_multi_session()</function> interfaces
 
140
                are available as shared library, which can be compiled
 
141
                and linked to with the
 
142
                <literal>libsystemd-login</literal>
 
143
                <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
 
144
                file.</para>
 
145
        </refsect1>
 
146
 
 
147
        <refsect1>
 
148
                <title>See Also</title>
 
149
 
 
150
                <para>
 
151
                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
 
152
                        <citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
 
153
                        <citerefentry><refentrytitle>sd_session_get_seat</refentrytitle><manvolnum>3</manvolnum></citerefentry>
 
154
                </para>
 
155
        </refsect1>
 
156
 
 
157
</refentry>