File: sd-login.html

package info (click to toggle)
systemd 215-17
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 49,568 kB
  • sloc: ansic: 192,789; xml: 39,586; sh: 13,002; makefile: 4,700; perl: 1,461; python: 1,355
file content (75 lines) | stat: -rw-r--r-- 7,055 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd-login</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
    a.headerlink {
      color: #c60f0f;
      font-size: 0.8em;
      padding: 0 4px 0 4px;
      text-decoration: none;
      visibility: hidden;
    }

    a.headerlink:hover {
      background-color: #c60f0f;
      color: white;
    }

    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
      visibility: visible;
    }
  </style><a href="index.html">Index </a>·
  <a href="systemd.directives.html">Directives </a>·
  <a href="../python-systemd/index.html">Python </a>·
  <a href="../libudev/index.html">libudev </a>·
  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-login"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-login — APIs for
                tracking logins</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214203511616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-login.h</code> provides APIs to
                introspect and monitor seat, login session and user
                status information on the local system. </p><p>See <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/multiseat" target="_top">Multi-Seat
                on Linux</a> for an introduction into multi-seat
                support on Linux, the background for this set of APIs.</p><p>Note that these APIs only allow purely passive access
                and monitoring of seats, sessions and users. To
                actively make changes to the seat configuration,
                terminate login sessions, or switch session on a seat
                you need to utilize the D-Bus API of
                systemd-logind, instead.</p><p>These functions synchronously access data in
                <code class="filename">/proc</code>,
                <code class="filename">/sys/fs/cgroup</code> and
                <code class="filename">/run</code>. All of these are virtual
                file systems, hence the runtime cost of the accesses
                is relatively cheap.</p><p>It is possible (and often a very good choice) to
                mix calls to the synchronous interface of
                <code class="filename">sd-login.h</code> with the asynchronous
                D-Bus interface of systemd-logind. However, if this is
                done you need to think a bit about possible races
                since the stream of events from D-Bus and from
                <code class="filename">sd-login.h</code> interfaces such as the
                login monitor are asynchronous and not ordered against
                each other.</p><p>If the functions return string arrays, these are
                generally <code class="constant">NULL</code> terminated and need to be freed by the
                caller with the libc
                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                call after use, including the strings referenced
                therein. Similarly, individual strings returned need to
                be freed, as well.</p><p>As a special exception, instead of an empty
                string array <code class="constant">NULL</code> may be returned, which should be
                treated equivalent to an empty string array.</p><p>See
                <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>,
                <a href="sd_uid_get_state.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_state</span>(3)</span></a>,
                <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>,
                <a href="sd_seat_get_active.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_get_active</span>(3)</span></a>,
                <a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>,
                <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a>
                for more information about the functions
                implemented.</p></div><div class="refsect1"><a name="idm214195679696"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
  library, which can be compiled and linked to with the
  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
  file.</p></div><div class="refsect1"><a name="idm214199735312"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                        <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>,
                        <a href="sd_uid_get_state.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_state</span>(3)</span></a>,
                        <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>,
                        <a href="sd_seat_get_active.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_get_active</span>(3)</span></a>,
                        <a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>,
                        <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a>,
                        <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                        <a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a>,
                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                </p></div></div></body></html>