402N/A<?
xml version='1.0'?>
<!--*-nxml-*--> 402N/A<!
DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 402N/A This file is part of systemd. 402N/A Copyright 2010 Lennart Poettering 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 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 You should have received a copy of the GNU General Public License 814N/A<
refentry id="sd-login">
814N/A <
title>sd-login</
title>
402N/A <
productname>systemd</
productname>
402N/A <
contrib>Developer</
contrib>
402N/A <
firstname>Lennart</
firstname>
618N/A <
surname>Poettering</
surname>
402N/A <
email>lennart@poettering.net</
email>
814N/A <
refentrytitle>sd-login</
refentrytitle>
814N/A <
manvolnum>7</
manvolnum>
402N/A <
refname>sd-login</
refname>
402N/A tracking logins</
refpurpose>
402N/A <
command>pkg-config --cflags --libs libsystemd-login</
command>
402N/A <
title>Description</
title>
402N/A introspect and monitor seat, login session and user
402N/A status information on the local system. </
para>
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 <
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 <
para>These functions access data in
402N/A <
filename>/proc</
filename>,
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 <
para>If the functions return string arrays, these are
402N/A generally NULL terminated and need to be freed by the
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 <
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 <
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 <
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 <
title>See Also</
title>
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>