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

« back to all changes in this revision

Viewing changes to man/sd_seat_get_active.3

  • 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
'\" t
 
2
.\"     Title: sd_seat_get_active
 
3
.\"    Author: Lennart Poettering <lennart@poettering.net>
 
4
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
 
5
.\"      Date: 03/16/2012
 
6
.\"    Manual: sd_seat_get_active
 
7
.\"    Source: systemd
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "SD_SEAT_GET_ACTIVE" "3" "03/16/2012" "systemd" "sd_seat_get_active"
 
11
.\" -----------------------------------------------------------------
 
12
.\" * Define some portability stuff
 
13
.\" -----------------------------------------------------------------
 
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
15
.\" http://bugs.debian.org/507673
 
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
 
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
18
.ie \n(.g .ds Aq \(aq
 
19
.el       .ds Aq '
 
20
.\" -----------------------------------------------------------------
 
21
.\" * set default formatting
 
22
.\" -----------------------------------------------------------------
 
23
.\" disable hyphenation
 
24
.nh
 
25
.\" disable justification (adjust text to left margin only)
 
26
.ad l
 
27
.\" -----------------------------------------------------------------
 
28
.\" * MAIN CONTENT STARTS HERE *
 
29
.\" -----------------------------------------------------------------
 
30
.SH "NAME"
 
31
sd_seat_get_active, sd_seat_get_sessions, sd_seat_can_multi_session \- Determine state of a specific seat
 
32
.SH "SYNOPSIS"
 
33
.sp
 
34
.ft B
 
35
.nf
 
36
#include <systemd/sd\-login\&.h>
 
37
.fi
 
38
.ft
 
39
.HP \w'int\ sd_seat_get_active('u
 
40
.BI "int sd_seat_get_active(const\ char*\ " "seat" ", char**\ " "session" ", uid_t*\ " "uid" ");"
 
41
.HP \w'int\ sd_seat_get_sessions('u
 
42
.BI "int sd_seat_get_sessions(const\ char*\ " "seat" ", char***\ " "sessions" ", uid_t**\ " "uid" ", unsigned*\ " "n_uids" ");"
 
43
.HP \w'int\ sd_seat_can_multi_session('u
 
44
.BI "int sd_seat_can_multi_session(const\ char*\ " "seat" ");"
 
45
.SH "DESCRIPTION"
 
46
.PP
 
47
\fBsd_seat_get_active()\fR
 
48
may be used to determine which session is currently active on a seat, if there is any\&. Returns the session identifier and the user identifier of the Unix user the session is belonging to\&. Either the session or the user identifier parameter can be be passed NULL, in case only one of the parameters shall be queried\&. The returned string needs to be freed with the libc
 
49
\fBfree\fR(3)
 
50
call after use\&.
 
51
.PP
 
52
\fBsd_seat_get_sessions()\fR
 
53
may be used to determine all sessions on the specified seat\&. Returns two arrays, one (NULL terminated) with the session identifiers of the sessions and one with the user identifiers of the Unix users the sessions belong to\&. An additional parameter may be used to return the number of entries in the latter array\&. The two arrays and the latter parameter may be passed as NULL in case these values need not to be determined\&. The arrays and the strings referenced by them need to be freed with the libc
 
54
\fBfree\fR(3)
 
55
call after use\&. Note that instead of an empty array NULL may be returned and should be considered equivalent to an empty array\&.
 
56
.PP
 
57
\fBsd_seat_can_multi_session()\fR
 
58
may be used to determine whether a specific seat is capable of multi\-session, i\&.e\&. allows multiple login sessions in parallel (whith only one being active at a time)\&.
 
59
.PP
 
60
If the
 
61
seat
 
62
parameter of any of these functions is passed as NULL the operation is executed for the seat of the session of the calling process, if there is any\&.
 
63
.SH "RETURN VALUE"
 
64
.PP
 
65
On success
 
66
\fBsd_seat_get_active()\fR
 
67
return return 0 or a positive integer\&. On success
 
68
\fBsd_seat_get_sessions()\fR
 
69
returns the number of entries in the session identifier array\&. If the test succeeds
 
70
\fBsd_seat_can_multi_session\fR
 
71
returns a positive integer, if it fails 0\&. On failure, these calls return a negative errno\-style error code\&.
 
72
.SH "NOTES"
 
73
.PP
 
74
The
 
75
\fBsd_seat_get_active()\fR,
 
76
\fBsd_seat_get_sessions()\fR, and
 
77
\fBsd_seat_can_multi_session()\fR
 
78
interfaces are available as shared library, which can be compiled and linked to with the
 
79
libsystemd\-login
 
80
\fBpkg-config\fR(1)
 
81
file\&.
 
82
.SH "SEE ALSO"
 
83
.PP
 
84
 
 
85
\fBsystemd\fR(1),
 
86
\fBsd-login\fR(7),
 
87
\fBsd_session_get_seat\fR(3)
 
88
.SH "AUTHOR"
 
89
.PP
 
90
\fBLennart Poettering\fR <\&lennart@poettering\&.net\&>
 
91
.RS 4
 
92
Developer
 
93
.RE