sd-login.xml revision 595aae376fae21f885ec9af2cac1aaf3ff3e9bee
402N/A<?xml version='1.0'?> <!--*-nxml-*-->
402N/A<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
402N/A "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
402N/A
402N/A<!--
402N/A This file is part of systemd.
402N/A
402N/A Copyright 2010 Lennart Poettering
402N/A
402N/A systemd is free software; you can redistribute it and/or modify it
402N/A under the terms of the GNU General Public License as published by
402N/A the Free Software Foundation; either version 2 of the License, or
402N/A (at your option) any later version.
402N/A
402N/A systemd is distributed in the hope that it will be useful, but
402N/A WITHOUT ANY WARRANTY; without even the implied warranty of
402N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
402N/A General Public License for more details.
402N/A
402N/A You should have received a copy of the GNU General Public License
814N/A along with systemd; If not, see <http://www.gnu.org/licenses/>.
402N/A-->
814N/A
814N/A<refentry id="sd-login">
814N/A
814N/A <refentryinfo>
814N/A <title>sd-login</title>
402N/A <productname>systemd</productname>
402N/A
402N/A <authorgroup>
402N/A <author>
402N/A <contrib>Developer</contrib>
402N/A <firstname>Lennart</firstname>
618N/A <surname>Poettering</surname>
402N/A <email>lennart@poettering.net</email>
402N/A </author>
402N/A </authorgroup>
402N/A </refentryinfo>
402N/A
402N/A <refmeta>
814N/A <refentrytitle>sd-login</refentrytitle>
814N/A <manvolnum>7</manvolnum>
402N/A </refmeta>
402N/A
402N/A <refnamediv>
402N/A <refname>sd-login</refname>
402N/A <refpurpose>APIs for
402N/A tracking logins</refpurpose>
402N/A </refnamediv>
402N/A
402N/A <refsynopsisdiv>
402N/A <funcsynopsis>
402N/A <funcsynopsisinfo>#include &lt;systemd/sd-login.h&gt;</funcsynopsisinfo>
402N/A </funcsynopsis>
402N/A
402N/A <cmdsynopsis>
402N/A <command>pkg-config --cflags --libs libsystemd-login</command>
402N/A </cmdsynopsis>
402N/A </refsynopsisdiv>
402N/A
402N/A <refsect1>
402N/A <title>Description</title>
402N/A
402N/A <para><filename>sd-login.h</filename> provides APIs to
402N/A introspect and monitor seat, login session and user
402N/A status information on the local system. </para>
402N/A
402N/A <para>See <ulink
402N/A url="http://www.freedesktop.org/wiki/Software/systemd/multiseat">Multi-Seat
402N/A on Linux</ulink> for an introduction into multi-seat
402N/A support on Linux, the background for this set of APIs.</para>
402N/A
402N/A <para>Note that these APIs only allow purely passive access
402N/A and monitoring of seats, sessions and users. To
402N/A actively make changes to the seat configuration,
402N/A terminate login sessions, or switch session on a seat
402N/A you need to utilize the D-Bus API of
402N/A systemd-logind, instead.</para>
402N/A
402N/A <para>These functions access data in
402N/A <filename>/proc</filename>,
402N/A <filename>/sys/fs/cgroup</filename> and
402N/A <filename>/run</filename>. All of these are virtual
402N/A file systems, hence the runtime cost of the accesses
402N/A is relatively cheap.</para>
402N/A
402N/A <para>If the functions return string arrays, these are
402N/A generally NULL terminated and need to be freed by the
459N/A caller with the libc
402N/A <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
402N/A call after use, including the strings referenced
402N/A therein. Similar, individual strings returned need to
402N/A be freed, as well.</para>
402N/A
402N/A <para>As a special exception, instead of an empty
402N/A string array NULL may be returned, which should be
402N/A treated equivalent to an empty string array.</para>
402N/A
402N/A <para>See
402N/A <citerefentry><refentrytitle>sd_pid_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
402N/A <citerefentry><refentrytitle>sd_uid_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
402N/A <citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
402N/A <citerefentry><refentrytitle>sd_seat_get_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
402N/A <citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
402N/A <citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>
402N/A for more information about the functions
402N/A implemented.</para>
402N/A </refsect1>
402N/A
402N/A <refsect1>
402N/A <title>Notes</title>
402N/A
402N/A <para>These APIs are implemented as shared library,
402N/A which can be compiled and linked to with the
402N/A <literal>libsystemd-login</literal>
402N/A <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
402N/A file.</para>
402N/A </refsect1>
402N/A
402N/A <refsect1>
402N/A <title>See Also</title>
402N/A <para>
402N/A <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
402N/A <citerefentry><refentrytitle>sd_pid_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
402N/A <citerefentry><refentrytitle>sd_uid_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
402N/A <citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
402N/A <citerefentry><refentrytitle>sd_seat_get_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
402N/A <citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
402N/A <citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
402N/A <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
402N/A <citerefentry><refentrytitle>sd-readahead</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
402N/A <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
402N/A </para>
402N/A </refsect1>
402N/A
402N/A</refentry>
402N/A