~ubuntu-branches/ubuntu/trusty/systemd/trusty

« back to all changes in this revision

Viewing changes to man/sd_get_uids.html

  • Committer: Package Import Robot
  • Author(s): Michael Biebl, Michael Biebl, Michael Stapelberg, Daniel Schaal, Ondrej Balaz
  • Date: 2013-09-12 00:13:11 UTC
  • mfrom: (1.1.11) (9.1.2 experimental)
  • mto: This revision was merged to the branch mainline in revision 53.
  • Revision ID: package-import@ubuntu.com-20130912001311-dz35it34wr2lbday
Tags: 204-3
[ Michael Biebl ]
* Upload to unstable.
* Use /bin/bash in debug-shell.service as Debian doesn't have /sbin/sushell.
* Only import net.ifaces cmdline property for network devices.
* Generate strict dependencies between the binary packages using a
  shlibs.local file and add an explicit versioned dependency on
  libsystemd-login0 to systemd to ensure packages are upgraded in sync.
  Closes: #719444
* Drop obsolete Replaces: libudev0 from udev package.
* Use correct paths for various binaries, like /sbin/quotaon, which are
  installed in / and not /usr in Debian.  Closes: #721347
* Don't install kernel-install(8) man page since we don't install the
  corresponding binary either.  Closes: #722180
* Cherry-pick upstream fixes to make switching runlevels and starting
  reboot via ctrl-alt-del more robust.
* Cherry-pick upstream fix to properly apply ACLs to Journal files.

[ Michael Stapelberg ]
* Make systemctl enable|disable call update-rc.d for SysV init scripts.
  Closes: #709780
* Don't mount /tmp as tmpfs by default and make it possible to enable this
  feature via "systemctl enable tmp.mount".

[ Daniel Schaal ]
* Add bug-script to systemd and udev.  Closes: #711245

[ Ondrej Balaz ]
* Recognize discard option in /etc/crypttab.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_get_seats</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
 
2
    a.headerlink {
 
3
      color: #c60f0f;
 
4
      font-size: 0.8em;
 
5
      padding: 0 4px 0 4px;
 
6
      text-decoration: none;
 
7
      visibility: hidden;
 
8
    }
 
9
 
 
10
    a.headerlink:hover {
 
11
      background-color: #c60f0f;
 
12
      color: white;
 
13
    }
 
14
 
 
15
    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
 
16
      visibility: visible;
 
17
    }
 
18
  </style><a href="index.html">Index </a>·
 
19
  <a href="systemd.directives.html">Directives </a>·
 
20
  <a href="../python-systemd/index.html">Python </a>·
 
21
  <a href="../libudev/index.html">libudev </a>·
 
22
  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 204</span><hr><div class="refentry"><a name="sd_get_seats"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_get_seats, sd_get_sessions, sd_get_uids, sd_get_machine_names — Determine available seats, sessions, logged in users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_seats</b>(</code></td><td>char*** <var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_sessions</b>(</code></td><td>char*** <var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_uids</b>(</code></td><td>uid_t** <var class="pdparam">users</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_machine_names</b>(</code></td><td>char*** <var class="pdparam">machines</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm259797390800"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_get_seats()</code> may be used
 
23
                to determine all currently available local
 
24
                seats. Returns a NULL terminated array of seat
 
25
                identifiers. The returned array and all strings it
 
26
                references need to be freed with the libc
 
27
                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
 
28
                call after use. Note that instead of an empty array
 
29
                NULL may be returned and should be considered
 
30
                equivalent to an empty array.</p><p>Similar, <code class="function">sd_get_sessions()</code> may
 
31
                be used to determine all current login sessions.</p><p>Similar, <code class="function">sd_get_uids()</code> may
 
32
                be used to determine all Unix users who currently have login sessions.</p><p>Similar,
 
33
                <code class="function">sd_get_machine_names()</code> may be
 
34
                used to determine all current virtual machines and
 
35
                containers on the system.</p><p>Note that the returned lists are not sorted and in an undefined order.</p></div><div class="refsect1"><a name="idm259797383872"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success <code class="function">sd_get_seats()</code>,
 
36
                <code class="function">sd_get_sessions()</code>,
 
37
                <code class="function">sd_get_uids()</code> and
 
38
                <code class="function">sd_get_machine_names()</code> return the
 
39
                number of entries in the arrays. On failure, these
 
40
                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm259797379648"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_get_seats()</code>,
 
41
                <code class="function">sd_get_sessions()</code>,
 
42
                <code class="function">sd_get_uids()</code> and
 
43
                <code class="function">sd_get_machine_names()</code> interfaces
 
44
                are available as shared library, which can be compiled
 
45
                and linked to with the
 
46
                <code class="literal">libsystemd-login</code>
 
47
                <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
 
48
                file.</p></div><div class="refsect1"><a name="idm259801272720"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
 
49
                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
 
50
                        <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
 
51
                        <a href="sd_session_get_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_seat</span>(3)</span></a>
 
52
                </p></div></div></body></html>