1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00
Commit Graph

188 Commits

Author SHA1 Message Date
Malte Starostik
cabe5d2564 logind: punt duplicate definition of InhibitWhat
Trivial fix for:
  src/login/logind-inhibit.h:37:3: error: redefinition of typedef 'InhibitWhat'
  src/login/logind-inhibit.h:26:26: note: previous declaration of 'InhibitWhat' was here
2012-06-04 13:30:54 +02:00
Lennart Poettering
d5a745df4d logind: fix indentation 2012-06-01 15:58:21 +02:00
Matthias Clasen
398f7c881b logind: interpret the can_sleep return value properly
can_sleep() returns a boolean, so a return value > 0 does not
mean 'na'.
2012-06-01 15:58:21 +02:00
Lennart Poettering
e96cd586c5 logind: add new user state 'closing' 2012-05-31 19:47:52 +02:00
Lennart Poettering
8c8c43515c logind: properly clean up user cgroups when they run empty 2012-05-31 19:46:42 +02:00
Kay Sievers
d2e54fae5c mkdir: append _label to all mkdir() calls that explicitly set the selinux context 2012-05-31 12:40:20 +02:00
Lennart Poettering
d7e1c95e0a login: properly detect MIMO USB displays
MIMO USB displays use a generic VID/PID for the hub component. With a
bit of trickery we can detect them by the VID/PID of the graphics
component.
2012-05-31 01:20:37 +02:00
Lennart Poettering
ba1261bc02 build-sys: fix built with --disable-logind 2012-05-30 22:25:01 +02:00
Lennart Poettering
6de0e0e500 logind: rework button setting semantics
If a graphical session without full DE that handles power/suspend events
is used this can now be controlled by logind instead, optionally.
2012-05-30 21:40:32 +02:00
Tero Roponen
632c2e4123 login: Use the GOTO properly in udev rule
In udev rules the labels must be assigned to GOTO keys with '='.
2012-05-30 18:34:28 +02:00
Lennart Poettering
e9d21f2407 logind: add missing files 2012-05-30 15:07:19 +02:00
Lennart Poettering
069cfc85f8 logind: optionally handle power, sleep and lid switch events
This takes handling of chassis power and sleep keys as well as the lid
switch over from acpid.

This logic is enabled by default for power and sleep keys, but not for
the lid switch.

If a graphical session is in the foreground no action is taken under the
assumption that the graphical session does this.
2012-05-30 15:01:51 +02:00
Lennart Poettering
9b958eff3f logind: fix write out of user state file 2012-05-22 16:46:11 +02:00
Lennart Poettering
6ccf7562da login: minor typo fix 2012-05-21 15:22:28 +02:00
Lennart Poettering
d889a2069a logind: implement suspend/hibernate calls with inhibition logic 2012-05-08 19:02:25 +02:00
Lennart Poettering
4943c1c94b logind: use "sleep" as generic term for "suspend", "hibernate", and later on "hybrid suspend" 2012-05-08 13:54:23 +02:00
Lennart Poettering
dd5f0a96f7 logind: fix test-inhibit 2012-05-08 13:54:23 +02:00
Kay Sievers
9eb977db5b util: split-out path-util.[ch] 2012-05-08 02:33:10 +02:00
Frederic Crozat
b80efeb9ae logind: fix memory leak 2012-05-07 22:57:50 +02:00
Lennart Poettering
eecd1362f7 logind: implement delay inhibitor locks in addition to block inhibitor locks
This is useful to allow applications to synchronously save data before
the system is suspended or shut down.
2012-05-05 00:36:08 +02:00
Lennart Poettering
d1122ad5e3 login: assing /dev/console logins to seat0 2012-04-22 02:41:18 +02:00
Lennart Poettering
cc1368e3b3 loginctl: avoid segfault for kill-session and kill-user commands
As reported by Mantas Mikulėnas.

http://lists.freedesktop.org/archives/systemd-devel/2012-April/004993.html
2012-04-22 02:04:12 +02:00
Kay Sievers
9e13dbae50 udev: replace util_create_path() with mkdir_parents() 2012-04-17 01:09:39 +02:00
Lennart Poettering
b59e246565 logind: remove redundant entries from logind's default controller lists too 2012-04-16 19:15:00 +02:00
Lennart Poettering
b69d29ce04 systemctl: show main and control PID explicitly in cgroup-show
In some cases the main/control PID of a service can be outside of the
services cgroups (for example, if logind readjusts the processes'
cgroup). In order to clarify this for the user show the main/control PID
in the cgroup tree nonetheless, but mark them specially.
2012-04-16 18:59:40 +02:00
Lennart Poettering
c3175a7f40 cgls: don't show empty cgroups by default 2012-04-16 18:59:08 +02:00
Lennart Poettering
c7b5eb98e8 logind: hook up inhibit logic with idle hint logic 2012-04-16 18:59:08 +02:00
Lennart Poettering
f8e2fb7b14 logind: add shutdown/suspend/idle inhibition framework 2012-04-16 18:59:08 +02:00
Kay Sievers
378f2e074e udev: update some rules 2012-04-15 16:09:12 +02:00
Kay Sievers
3b6d9a7c50 update .gitignore 2012-04-13 21:58:01 +02:00
Lennart Poettering
74afee9c18 logind: explicitly check for /dev/tty0 2012-04-13 18:52:53 +02:00
Lennart Poettering
5430f7f2bc relicense to LGPLv2.1 (with exceptions)
We finally got the OK from all contributors with non-trivial commits to
relicense systemd from GPL2+ to LGPL2.1+.

Some udev bits continue to be GPL2+ for now, but we are looking into
relicensing them too, to allow free copy/paste of all code within
systemd.

The bits that used to be MIT continue to be MIT.

The big benefit of the relicensing is that closed source code may now
link against libsystemd-login.so and friends.
2012-04-12 00:24:39 +02:00
Lennart Poettering
6bb92a169e polkit: temporarily spawn of a polkit agent in terminals for possibly authenticated operations 2012-04-11 20:39:03 +02:00
Kay Sievers
79c077224b put acl.la in 'if HAVE_ACL' and rename acl.[ch] to acl-util.[ch] 2012-04-11 16:47:09 +02:00
Kay Sievers
49e942b2bc rename basic.la to shared.la and put selinux deps in shared-selinx.la
Only 34 of 74 tools need libselinux linked, and libselinux is a pain
with its unconditional library constructor.
2012-04-10 22:43:05 +02:00
Kay Sievers
78b2e3a632 util: move ACL code into internal library 2012-04-10 14:59:45 +02:00
Kay Sievers
d7832d2c6e util: move all to shared/ and split external dependencies in separate internal libraries
Before:
  $ ldd /lib/systemd/systemd-timestamp
  linux-vdso.so.1 =>  (0x00007fffb05ff000)
  libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f90aac57000)
  libcap.so.2 => /lib64/libcap.so.2 (0x00007f90aaa53000)
  librt.so.1 => /lib64/librt.so.1 (0x00007f90aa84a000)
  libc.so.6 => /lib64/libc.so.6 (0x00007f90aa494000)
  /lib64/ld-linux-x86-64.so.2 (0x00007f90aae90000)
  libdl.so.2 => /lib64/libdl.so.2 (0x00007f90aa290000)
  libattr.so.1 => /lib64/libattr.so.1 (0x00007f90aa08a000)
  libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f90a9e6e000)

After:
  $ ldd systemd-timestamp
  linux-vdso.so.1 =>  (0x00007fff3cbff000)
  libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f5eaa1c3000)
  librt.so.1 => /lib64/librt.so.1 (0x00007f5ea9fbb000)
  libc.so.6 => /lib64/libc.so.6 (0x00007f5ea9c04000)
  /lib64/ld-linux-x86-64.so.2 (0x00007f5eaa3fc000)
  libdl.so.2 => /lib64/libdl.so.2 (0x00007f5ea9a00000)
  libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5ea97e4000)
2012-04-10 14:13:38 +02:00
Kay Sievers
83cd6b754b udev: convert 'uaccess' to a builtin 2012-04-09 19:25:41 +02:00
Lennart Poettering
3eff4208ff logind: log with AUTH facility 2012-04-03 19:26:02 +02:00
Kay Sievers
18b754d345 rename /etc/systemd/systemd-{login,journal}d.conf to {login,journal}d.conf 2012-03-30 23:36:44 +02:00
Elan Ruusamäe
6ad548625e man: minor typo in reference to manual page 2012-03-26 18:20:55 +02:00
Lennart Poettering
75c8e3cffd logind: close FIFO before ending sessions cleanly
For clean session endings ask logind explicitly to get rid of the FIFO
before closing it so that the FIFO logic doesn't result in su/sudo to be
terminated immediately.
2012-03-22 02:06:40 +01:00
Lennart Poettering
c9d8629baa logind: extend comment about X11 socket symlink 2012-03-22 01:43:36 +01:00
Shawn Landden
fa734f4da8 login: tag the Mimo 720 ID_AUTOSEAT
This device is a combination USB hub, displaylink graphics, and e2i touchscreen

Bus 001 Device 005: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 001 Device 006: ID 17e9:401a Newnham Research
Bus 001 Device 007: ID 1ac7:0001

|__ Port 1: Dev 5, If 0, Class=hub, Driver=hub/4p, 480M
    |__ Port 2: Dev 6, If 0, Class=vend., Driver=udlfb, 480M
    |__ Port 2: Dev 6, If 1, Class=HID, Driver=usbhid, 480M
    |__ Port 3: Dev 7, If 0, Class=vend., Driver=usbtouchscreen, 12M
2012-03-12 22:49:14 +01:00
Lennart Poettering
fc8af9ff3f login: introduce sd_session_get_display() 2012-02-15 04:56:10 +01:00
Lennart Poettering
51f58f083a login: add new sd_session_get_type() and sd_session_get_class API calls 2012-02-14 21:54:00 +01:00
Lennart Poettering
55efac6cbc login: track login class (i.e. one of "user", "greeter", "lock-screen") for each session
This introduces the new PAM environment variable XDG_SESSION_CLASS. If
not set, defaults to "user".

This is useful for apps that want to distuingish real user logins from
"fake" ones which just exist to show a gdm login screen or a lock
screen.
2012-02-14 21:37:49 +01:00
Lennart Poettering
50b1678aab sd-login: if NULL or 0 is passed as first parameter of the sd_xxx functions, work on objects of the calling process 2012-02-13 23:50:02 +01:00
Lennart Poettering
89f134406a logind: introduce CanReboot/CanPowerOff bus calls 2012-02-11 00:13:10 +01:00
Lennart Poettering
1b73da108b logind: make seat device management accessible to normal users/via polkit 2012-02-10 02:35:48 +01:00
Benjamin Franzke
80df5f4c3b logind: Allow PowerOff/Reboot in default context 2012-02-10 02:33:41 +01:00
Benjamin Franzke
1d4ec31570 logind: Terminate bus_login_session_user_properties
Fixes segfault in systemd-logind, triggered by:
systemd-loginctl show-session $XDG_SESSION_ID.

Bug introduced by d200735e13,
so only systemd v39 is affected.
2012-02-07 23:52:58 +01:00
Lennart Poettering
cae5846b2c logind: fix introspection data 2012-02-07 20:12:21 +01:00
Lennart Poettering
84c3361e12 logind: introduce ActivateSessionOnSeat() 2012-02-07 20:12:13 +01:00
Lennart Poettering
acb14d318b cgroup: when getting cgroup empty notifications, always search up the tree 2012-02-03 05:25:31 +01:00
Lennart Poettering
c4aa65e714 logind: add GetSessionByPID() bus call 2012-02-01 19:04:54 +01:00
Lennart Poettering
9b221b63e5 logind: if we have to stop a session, kill at least its leader 2012-01-31 23:51:39 +01:00
Ray Strode
8906b207d1 login: lock down input devices on extra seats
We need to tell the X server to grab the keyboards
and mice associated with a hotplugged seat, so that
it doesn't have the ability to control the kernel
vt consoles.
2012-01-31 20:00:36 +01:00
Lennart Poettering
02b16a19a4 logind: make sure we create /var/lib/systemd before using it 2012-01-27 20:48:28 +01:00
Lennart Poettering
be70cdd67a login: fix multi-seat check 2012-01-24 05:15:04 +01:00
Lennart Poettering
b16f53046d login: extend comments in multi-seat-x 2012-01-24 04:32:09 +01:00
Lennart Poettering
36db9a8d5b login: add multi-session X wrapper
In preparation for https://bugzilla.gnome.org/show_bug.cgi?id=655380 we
decided it's better to include the multi-seat X wrapper in systemd,
rather than gdm. (Side effect: this makes this accessible for other
DMs)

This is a stop-gap for now, until X gins proper multi-seat graphics
support at which point this code will go away without replacement.
2012-01-23 23:34:36 +01:00
Kay Sievers
131a4dcfd4 login: move seat udev rules to login subdir 2012-01-22 18:32:13 +01:00
Lennart Poettering
1e5678d023 cgls: don't show kernel threads by default 2012-01-22 18:22:26 +01:00
Lennart Poettering
8d53b4534a exec: introduce ControlGroupPersistant= to make cgroups persistant 2012-01-18 15:40:21 +01:00
Lennart Poettering
fc3c1c6e09 logind: move X11 socket 2012-01-18 13:56:02 +01:00
Lennart Poettering
129eebe020 logind: simplify session_activate() a bit 2012-01-18 13:56:02 +01:00
Lennart Poettering
abc5bbc6f0 logind: allow to create multiple sessions on non-multi-session seats to deal with left-over sessions 2012-01-18 13:56:02 +01:00
Michal Schmidt
d200735e13 dbus: more efficient implementation of properties
The way the various properties[] arrays are initialized is inefficient:
 - only the .data members change at runtime, yet the whole arrays of
   properties with all the fields are constructed on the stack one by
   one by the code.
 - there's duplication, eg. the properties of "org.freedesktop.systemd1.Unit"
   are repeated in several unit types.

Fix it by moving the information about properties into static const
sections. Instead of storing the .data directly in the property, store
a constant offset from a run-time base.
The small arrays of struct BusBoundProperties bind together the constant
information with the right runtime information (the base pointer).

On my system the code shrinks by 60 KB, data increases by 10 KB.
2012-01-16 13:34:42 +01:00
Michal Schmidt
1637a8be55 logind: downgrade login message to debug
The messages make people nervous.

https://bugzilla.redhat.com/show_bug.cgi?id=727315
2012-01-16 13:18:17 +01:00
Lennart Poettering
6ef25fb65e pam: fix build 2012-01-13 20:52:45 +01:00
Lennart Poettering
fc7985ed67 pam: work correctly if a seat is specified but not vtnr 2012-01-13 20:51:58 +01:00
Lennart Poettering
ebda471d89 sd-login: teach sd_pid_get_unit() proper handling of instantiated services 2012-01-13 00:49:02 +01:00
Lennart Poettering
4cfa2c999d core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
Lennart Poettering
eff406331a login: implement sd_session_get_service() 2012-01-05 23:14:22 +01:00
Lennart Poettering
81527be142 build-sys: move public header files into a dir of their own 2012-01-05 16:01:58 +01:00
Kay Sievers
4726299357 logind: add needed include for sd_notify() 2012-01-05 00:52:56 +01:00
Lennart Poettering
e6960940b6 journald: parse configuration file 2012-01-04 20:40:04 +01:00
Lennart Poettering
94fb446e55 journald: store _SYSTEMD_UNIT= instead of _SYSTEMD_SERVICE= field, since processes might also be related to mount, swap or socket units, not just services 2012-01-04 15:35:30 +01:00
Lennart Poettering
bda061759c logind: send out Lock signal when locking 2012-01-03 23:08:15 +01:00
Lennart Poettering
976c088a02 logind: don't watch vcsa if nobody cares 2012-01-03 21:50:02 +01:00
Lennart Poettering
addedec48b logind: if we can't open /dev/tty0, assume there is no VT subsystem and don't pretend we could do VT switching 2012-01-03 21:47:54 +01:00
Lennart Poettering
9847946e12 login: introduce sd_pid_get_service() 2012-01-03 21:08:58 +01:00
Lennart Poettering
927f62bd54 login: move systemd-user-sessions.service into login/, too 2011-12-31 19:45:41 +01:00
Lennart Poettering
be5f4385d6 login: move the PAM module to src/login/ since it is just a client to logind 2011-12-31 18:06:56 +01:00
Lennart Poettering
9c5b60ca5f login: move libsystemd-login.pc.in into src/login/ 2011-12-31 13:37:23 +01:00
Lennart Poettering
4deba28559 logind: move more files into subdirectory 2011-12-31 03:24:31 +01:00
Lennart Poettering
4bba9156da logind: move logind into its own subdirectory 2011-12-31 03:16:08 +01:00