Commit graph

14571 commits

Author SHA1 Message Date
Lennart Poettering a7b1c3971a README: document that we still encourage people to turn off audit when they want to use containers 2014-03-11 05:40:36 +01:00
Djalal Harouni 236af516b8 logind: add a debug message in case the session already exists
If the session already exists then the only way to log it is to set the
debug option of pam_systemd. There are no debug messages in the login
service that permits to log if the session already exists.

So just add it, and while we are it add the "uid" field to the debug
message that indicates that the session was created.
2014-03-11 05:34:08 +01:00
Andrey Borzenkov 4a77ca700d man: fix description of systemctl --after/--before
It was backward - --after fetches After property, so units shown really
come *before* unit given as argument. Same for --before.
2014-03-11 05:29:43 +01:00
Lennart Poettering 252094eb05 man: multiple sleep modes are to be separated by whitespace, not commas
As pointed out by Jason A. Donenfeld.
2014-03-11 05:24:22 +01:00
Harald Hoyer f39d4a08e7 systemctl: for switch-root check, if we switch to a systemd init
If "systemctl switch-root" is called with a specific "INIT" or
/proc/cmdline contains "init=", then systemd would not serialize
itsself.

Let systemctl check, if the new init is in the standard systemd
installation path and if so, clear the INIT parameter,
to let systemd serialize itsself.
2014-03-11 04:45:33 +01:00
Harald Hoyer 9d9951a460 util: add files_same() helper function
files_same() returns
     1, if the files are the same
     0, if the files have different inode/dev numbers
 errno, for any stat error
2014-03-11 04:34:06 +01:00
Lennart Poettering 756461fd56 update TODO 2014-03-11 04:20:11 +01:00
Lennart Poettering fe7f06f142 dbus: suppress duplicate and misleading messages
When we try to send a signal on a connection we didn't hae the time to
process the Disconnected message yet, don't generate multiple warning
messages, but only a single debug message.

https://bugs.freedesktop.org/show_bug.cgi?id=75874
2014-03-11 04:19:59 +01:00
Lennart Poettering 7ced1d8f87 update TODO 2014-03-11 03:09:00 +01:00
Lennart Poettering 8c4e25b73c nspawn: fix getent fallback 2014-03-11 03:08:54 +01:00
Lennart Poettering 2cb46a2b0c update TODO 2014-03-11 02:48:59 +01:00
Lennart Poettering 0cb9fbcd44 nspawn: when resoliving UIDs/GIDs for "-u", do so in forked off /usr/bin/getent instead of in-process
When the container runs a different native architecture than the host we
shouldn't attempt to load the container's NSS modules with the host's
libc. Instead, resolve UID/GID by invoking /usr/bin/getent in the
container. The tool should be fairly universally available and allows us
to do resolving of the UID/GID with the container's libc in a parsable
format.

https://bugs.freedesktop.org/show_bug.cgi?id=75733
2014-03-11 02:41:13 +01:00
Lennart Poettering d96c1ecf7b nspawn: make sure we don't try to mount the container block device in the child after the parent added us to the device cgroup 2014-03-11 01:01:38 +01:00
Lennart Poettering 2ecfc64e59 update TODO 2014-03-10 23:17:42 +01:00
Peter Rajnoha ebc54302d7 rules: mark loop device as SYSTEMD_READY=0 if no file is attached
Check existence of loop/backing_file in sysfs and mark loop devices with
SYSTEMD_READY if missing. Such loop files is uninitialized and it's not
ready for use yet (there's no file attached).
2014-03-10 22:58:14 +01:00
Samuli Suominen 2d0efdf1af build-sys: Find the tools for users with no /sbin:/usr/sbin in PATH since some systems still make the distiction between bin and sbin. 2014-03-10 22:36:17 +01:00
Lennart Poettering eb0f0863f5 nspawn: don't try mknod() of /dev/console with the correct major/minor
We overmount /dev/console with an external pty anyway, hence there's no
point in using the real major/minor when we create the node to
overmount. Instead, use the one of /dev/null now.

This fixes a race against the cgroup device controller setup we are
using. In case /dev/console was create before the cgroup policy was
applied all was good, but if created in the opposite order the mknod()
would fail, since creating /dev/console is not allowed by it. Creating
/dev/null instances is however permitted, and hence use it.
2014-03-10 21:36:01 +01:00
Lennart Poettering 1b9e5b1263 nspawn: add --image= switch to boot GPT disk images that follow the Discoverable Partitions Specification 2014-03-10 20:35:52 +01:00
Lennart Poettering 79fbcd8869 man: fix formatting of uuids 2014-03-10 17:21:16 +01:00
Zbigniew Jędrzejewski-Szmek 055d406624 logind: fix policykit checks 2014-03-10 10:43:47 -04:00
Martin Pitt 2658624399 input_id: Recognize buttonless joystick types
Input devices like rudders or pedals are joystick-like; they don't have
buttons, but axes like RX, THROTTLE, or RUDDER. These don't interfere with
other device types with absolute axes (touch screens, touchpads, and
accelerometers), so it's fairly safe to mark them as ID_INPUT_JOYSTICK and thus
hand out dynamic ACLs to the user.

https://bugs.freedesktop.org/show_bug.cgi?id=70734
2014-03-10 08:54:22 +01:00
poma 7abaad1ab0 man: fix example in systemd.link
'man/systemd.link.xml' recovery from:

commit eac684ef1c
Author: Tom Gundersen <teg@jklm.no>
Date:   Tue Feb 25 19:30:40 2014 +0100

    man: split out systemd.net{work,dev}(5) from systemd-networkd(8)
2014-03-09 18:22:18 +01:00
Tom Gundersen a748b692dd network: link - simplify code a bit and remove some debug logging 2014-03-09 18:22:18 +01:00
Dave Reisner 26abdc73a2 fix off by one error in array index assertion
Since the index is already post-incremented when the array is appended
to, this assertion can be wrongly reached when the array is at capacity
(with the NULL terminator). The bug is reproducible on shutdown with
the following settings in /etc/systemd/system.conf:

  LogTarget=journal-or-kmsg
  LogColor=yes
  LogLocation=yes

Reported by Thermi on IRC.
2014-03-08 17:57:18 -05:00
Kay Sievers d5ce683c07 units: remove "AllowUser=root own", the bus owner can always own names 2014-03-08 19:38:06 +01:00
Daniel Mack 088b51107a sd-bus: sync kdbus.h 2014-03-08 18:22:44 +01:00
Zbigniew Jędrzejewski-Szmek 58b129170c networkd: fix confusion from missing braces
Fixup for 76800848f2 'networkd: link - degrade failed UP to warning'.
2014-03-08 11:58:56 -05:00
Daniel Mack b629d09842 sd-bus: check for potential integer overflow in KDBUS_ITEM_FOREACH()
For large values of item->size, the 'part' pointer can wrap around,
which results in an illegal pointer, but currently passes the for-loop
condition.
2014-03-08 14:18:48 +01:00
Lennart Poettering 2a781fc9bd update TODO 2014-03-08 04:06:04 +01:00
Lennart Poettering 61331eab0a gpt-auto-generator: probe only partition table and partitions we are interested in
Instead of iterating through the list of partitions and probing them all
with blkid, simply probe the partition table and use that information to
only probe the partitions we care for.
2014-03-08 04:06:04 +01:00
Tom Gundersen 76800848f2 networkd: link - degrade failed UP to warning
Something else may still bring the link up, so don't enter failed state prematurely.
2014-03-08 01:12:46 +01:00
Tom Gundersen 59a7a68422 sd-rtnl: increase default timeout to match sd-bus 2014-03-08 01:12:46 +01:00
Daniel Mack 2c5859afec Make tables for DEFINE_STRING_TABLE_LOOKUP consistent
Bring some arrays that are used for DEFINE_STRING_TABLE_LOOKUP() in the
same order than the enums they reference.

Also, pass the corresponding _MAX value to the array initalizer where
appropriate.
2014-03-07 21:38:48 +01:00
Daniel Mack fe8d029277 units: set 'AllowUser=root own' and 'AllowWorld=talk' own for all .busname files 2014-03-07 19:19:02 +01:00
Daniel Mack a9beb58d8d dbus1-generator: set AllowWorld=own for now 2014-03-07 19:19:01 +01:00
Daniel Mack 1683342af1 sd-bus: add support for policy upload on activator connections
Activator connections may upload policy when registering to the bus.
This patch contains code to translate between BusNamePolicy objects and
the kdbus specific items.
2014-03-07 19:14:05 +01:00
Daniel Mack f7c7cd03d1 sd-bus: sync kdbus.h (ABI break)
Bring kdbus.h in sync with recent policy related changes. Most notably,
KDBUS_MAKE_POLICY_OPEN is now gone. The rest doesn't matter for systemd
at this point, as the policy functionality was not yet used.
2014-03-07 19:14:05 +01:00
Daniel Mack 54d76c9286 busname: add parser for bus name policies
There are three directives to specify bus name polices in .busname
files:

 * AllowUser [username] [access]
 * AllowGroup [groupname] [access]
 * AllowWorld [access]

Where [access] is one of

 * 'see': The user/group/world is allowed to see a name on the bus
 * 'talk': The user/group/world is allowed to talk to a name
 * 'own': The user/group/world is allowed to own a name

There is no user added yet in this commit.
2014-03-07 19:14:05 +01:00
Lennart Poettering fb255b31c5 man: reference the Discoverable Partitions Spec from the gpt-auto-generator man page 2014-03-07 18:50:43 +01:00
Lennart Poettering 700ff4d973 busname: don't drop 'service' from the result string 2014-03-07 18:50:43 +01:00
Tom Gundersen 9842de0d93 networkd: use new rtnl_message_read() API 2014-03-07 17:39:04 +01:00
Susant Sahani 4e9e7f1836 sd-rtnl: introduce read ether and ip address functions
This patch introduces reading ethernet address and IPV4/IPv6
as well which is based on table based look up.

[tomegun: rename read_ether() to read_ether_addr() to match the append function.]
2014-03-07 17:39:04 +01:00
Daniel Mack b2cdc6664e manager: flush memory stream before using the buffer
When the manager receives a SIGUSR2 signal, it opens a memory stream
with open_memstream(), uses the returned file handle for logging, and
dumps the logged content with log_dump().

However, the char* buffer is only safe to use after the file handle has
been flushed with fflush, as the man pages states:

  When the stream is closed (fclose(3)) or flushed (fflush(3)), the
  locations pointed to by ptr and sizeloc are updated to contain,
  respectively, a pointer to the buffer and the current size of  the
  buffer.
  These values remain valid only as long as the caller performs no
  further output on the stream.  If further output is performed, then the
  stream must again be flushed before trying to access these variables.

Without that call, dump remains NULL and the daemon crashes in
log_dump().
2014-03-07 15:15:56 +01:00
Kay Sievers 8a39439e08 udev-builtin-blkid: remove dead code 2014-03-07 14:39:20 +01:00
Daniel Mack 36d239dbda core/busname: add lookup string for BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT
When a busname unit enters BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT, the
serialization will not be able to look up the result as string via
busname_result_to_string(). This leads to an assertion trap during
daemon-reexec.
2014-03-07 11:41:18 +01:00
Thomas Bächler 6c49212741 units: Do not unescape instance name in systemd-backlight@.service
The instance name is never escaped in the udev rule, but unescaped in the unit.
This results in the following error message on Asus boards:

  Failed to get backlight or LED device 'backlight:eeepc/wmi': No such file or directory
2014-03-07 00:30:56 -05:00
Armin K e2eb18d56b build-sys: Don't distribute generated udev rule
It contains hardcoded path to systemd-sysctl executable which
is /usr/lib/systemd/systemd-sysctl on latest stable release and
as such it will complain at runtime if rootprefix != prefix

[zj: readd the file to nodist_udevrules_DATA]
2014-03-07 00:17:18 -05:00
Zbigniew Jędrzejewski-Szmek 7d06ef0a5c man: add missing comma
marcosf0> missing comma in udevadm "see also" section
2014-03-07 00:17:18 -05:00
Zbigniew Jędrzejewski-Szmek d86dd07d46 build-sys: update intructions for Makefile-man.am regeneration 2014-03-06 23:24:30 -05:00
Zbigniew Jędrzejewski-Szmek effbc8e4f7 man: describe functions for appending to messages 2014-03-06 23:24:20 -05:00