1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 00:51:24 +03:00
Commit Graph

14011 Commits

Author SHA1 Message Date
Lennart Poettering
97e0691f85 core: only send SIGHUP when doing first kill, not when doing final sigkill 2014-02-06 02:13:23 +01:00
Jóhann B. Guðmundsson
99bd4af0c7 udev: add zram to the list of devices inappropriate for symlinks
udev seems to have a race condition with swapon to see which can open
/dev/zram0 first, causing swapon to fail. Seems to be most noticeable
on arm devices one out of every 7 times or something.
2014-02-05 19:29:33 -05:00
Zbigniew Jędrzejewski-Szmek
90b2de37b8 Update some message formats
Use PID_FMT/USEC_FMT/... in more places.

Also update logind error messages to print the full path to a file that
failed. This should make debugging easier for people who do not know
off the top of their head where logind stores it state.
2014-02-05 19:00:36 -05:00
Lennart Poettering
284c0b9176 nspawn: add --quiet switch for turning off any output noise 2014-02-06 00:43:14 +01:00
Lennart Poettering
1c03020cc4 nspawn: always use default bus 2014-02-05 23:06:34 +01:00
Lennart Poettering
f4d140e9a6 bus: properly unset default bus pointer when destroying last reference 2014-02-05 23:06:13 +01:00
Lennart Poettering
a4cd87e9dc man: introduce new "Desktop" property for sessions
This is initialized from XDG_SESSION_DESKTOP and is useful for GNOME
to recognize its own sessions. It's supposed to be set to a short string
identifying the session, such as "kde" or "gnome".
2014-02-05 20:44:49 +01:00
Lennart Poettering
49ebd11fb0 logind: make session type and class settable via the same ways
If the session type/class is set via environment variables, use that,
and otherwise fallback to something that is set via the PAM module
command line.
2014-02-05 18:55:18 +01:00
Lennart Poettering
d9eb81f984 logind: add new "wayland" session type 2014-02-05 18:27:43 +01:00
Lennart Poettering
1baccdda2e core: don't wait for non-control/non-main processes when killing processes on the host either
Since the current kernel cgroup notification logic is easily confused by
existing subgroups, let's do the same thing as in containers before. and
just not wait for non-control and non-main processes.

This should be corrected as soon as we have sane cgroup notifications
from the kernel.
2014-02-05 02:22:11 +01:00
Lennart Poettering
b4f052a05a kill: fix error return 2014-02-05 02:11:18 +01:00
Lennart Poettering
c7040b5d1c core: allow User=, Group=, Nice=, Environment=, Type= to be passed when creating a transient service 2014-02-05 02:03:10 +01:00
Susant Sahani
7b1796403a Added attribute support for sd-rtnl
Added sd_rtnl_message_append_u8 and
  few attribute support in sd_rtnl_message_append_u32
       IFLA_GROUP, IFLA_TXQLEN, IFLA_NUM_TX_QUEUES, IFLA_NUM_RX_QUEUES
2014-02-05 00:07:29 +01:00
Lennart Poettering
d002827b03 nspawn: various fixes in selinux hookup
- As suggested, prefix argument variables with "arg_" how we do this
  usually.

- As suggested, don't involve memory allocations when storing command
  line arguments.

- Break --help text at 80 chars

- man: explain that this is about SELinux

- don't do unnecessary memory allocations when putting together mount
  option string
2014-02-04 22:56:07 +01:00
Dan Walsh
a8828ed938 Add SELinux support to systemd-nspawn
This patch adds to new options:

-Z PROCESS_LABEL

This specifies the process label to run on processes run within the container.

-L FILE_LABEL

The file label to assign to memory file systems created within the container.

For example if you wanted to wrap an container with SELinux sandbox labels, you could execute a command line the following

chcon system_u:object_r:svirt_sandbox_file_t:s0:c0,c1 -R /srv/container
systemd-nspawn -L system_u:object_r:svirt_sandbox_file_t:s0:c0,c1 -Z system_u:system_r:svirt_lxc_net_t:s0:c0,c1 -D /srv/container /bin/sh
2014-02-04 13:33:15 -08:00
Colin Guthrie
483798e077 journal: Drop pkgconfig reference to libsystemd-id128.
This is now part of libsystemd.
2014-02-04 14:35:59 +01:00
Lennart Poettering
f389bf15d0 bus: when closing the bus don't end up in a recursive destruction deadlock 2014-02-03 19:59:18 +01:00
Lennart Poettering
fdb9161cd3 conf-parser: warn when we open configuration files with weird access bits 2014-02-03 19:59:18 +01:00
Tom Gundersen
e59749b1f8 build-sys: move -lresolv out of CFLAGS
Thomas H.P. Andersen <phomes@gmail.com> wrote:
> Does -lresolv belong in libsystemd_la_CFLAGS? I would have thought
> that it should be in LIBADD for the lib and LDADD for the test.
2014-02-03 15:25:45 +01:00
Kay Sievers
486e99a387 bus: update kdbus.h (ABI break) 2014-02-01 17:21:36 +01:00
Tom Gundersen
172f6635d1 networkd: remove unused variable 2014-02-01 16:51:35 +01:00
Tom Gundersen
71acb5e7dc networkd: don't fail on DHCP errors 2014-02-01 16:51:35 +01:00
Hendrik Brueckner
07901fc142 s390/getty-generator: initialize essential system terminals/consoles
Ensure to start getty programs on all essential system consoles on Linux on
System z.  Add these essential devices to the list of virtualization_consoles
to always generate getty configurations.

For the sake of completion, the list of essential consoles is:

  /dev/sclp_line0 - Operating system messages applet (LPAR)
  /dev/ttysclp0 - Integrated ASCII console applet (z/VM and LPAR)
  /dev/ttyS0 - Already handled by systemd (3215 console on z/VM)
  /dev/hvc0  - Already handled by systemd (IUCV HVC terminal on z/VM)

Depending on the environment, z/VM or LPAR, only a subset of these terminals
are available.

See also RH BZ 860158[1] "Cannot login via Operating System Console into RHEL7
instance installed on a LPAR".  This bugzilla actually blocks the installation
of Linux on System z instances in LPAR mode.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=860158
2014-01-31 18:16:36 +01:00
Lennart Poettering
eb15fe5cbb run: drop mistakenly committed test code 2014-01-31 18:03:15 +01:00
Lennart Poettering
9ceefc810f core: fix oom check 2014-01-31 17:48:36 +01:00
Lennart Poettering
2d4a39e759 core: introduce new stop protocol for unit scopes
By specifiy a Controller property when creating the scope a client can
specify a bus name that will be notified with a RequestStop bus signal
when the scope has been asked to shut down, instead of sending SIGTERM
to the scope processes themselves.

https://bugzilla.redhat.com/show_bug.cgi?id=1032695
2014-01-31 17:48:36 +01:00
Lennart Poettering
fb818b2ea1 util: use alloca0() intead of alloca() + memzero() 2014-01-31 17:48:36 +01:00
Tom Gundersen
c07aeadfea networkd: dhcp - refactor handler 2014-01-31 12:20:34 +01:00
Tom Gundersen
c3ab23898f networkd: don't check for ifindex in answer to RTM_NEWLINK
The kernel will not be changed to support this, so drop the code. Listening
for all RTM_NEWLINK messages and filtering on name is reliable, so it is not
a problem.
2014-01-31 12:20:34 +01:00
Patrik Flykt
40e39f6283 libsystemd-dhcp: Update secs field only when sending Discover
Compute the 'secs' field as seconds since start of lease acquisition
procedure. Start off with a value of zero and increase it only for
each resent DHCP discover message. See the discussion before and
after http://www.ietf.org/mail-archive/web/dhcwg/current/msg05836.html
and Section 3.1 of RFC 2131.
2014-01-31 12:04:51 +01:00
Patrik Flykt
f8fdefe4f5 libsystemd-dhcp: Fix stopping of DHCP client
Go back to Init state independent of the current state the client
is in.
2014-01-31 12:04:51 +01:00
Patrik Flykt
1aed1cbc10 libsystemd-dhcp: Compute UDP checksum only if set
A checksum field with value zero means no UDP checksum has been
computed for the packet.
2014-01-31 12:04:51 +01:00
Patrik Flykt
e44127018a libsystemd-dhcp: Rename function to be clearer that options are parsed 2014-01-31 12:04:51 +01:00
Patrik Flykt
74e22380ed libsystemd-dhcp: DNS name option must be a multiple of 4 bytes 2014-01-31 12:04:51 +01:00
Greg KH
29804cc1e0 use memzero(foo, length); for all memset(foo, 0, length); calls
In trying to track down a stupid linker bug, I noticed a bunch of
memset() calls that should be using memzero() to make it more "obvious"
that the options are correct (i.e. 0 is not the length, but the data to
set).  So fix up all current calls to memset(foo, 0, length) to
memzero(foo, length).
2014-01-31 11:55:01 +01:00
Thomas Hindoe Paaboel Andersen
b5cfa7408c analyze: fix plot issues when using gummiboot
It would crash and the legend in the bottom followed the time 0.0.
2014-01-31 07:12:43 +01:00
Zbigniew Jędrzejewski-Szmek
498f8a39e6 tmpfiles: fix memory leak of exclude_prefixes
Missed in 5c795114.
2014-01-30 22:53:01 -05:00
Tom Gundersen
ba91431154 shared: net - use u32ctz to compute prefixlen 2014-01-30 17:23:34 +01:00
Tom Gundersen
32216660c7 TODO: update sd-rtnl section 2014-01-30 17:19:10 +01:00
Lennart Poettering
ec417ccc27 util: add u32ctz() call for determining ctz of uint32_t 2014-01-30 16:47:18 +01:00
Tom Gundersen
50add2909c networkd: netdev - reduce chance of race when receiving netdev's ifindex
When creating a new link, the kernel will not inform us about the new ifindex
in its ack. We have to listen for newly created devices and deduce the new
ifindex by matching on the ifname.

We used to do this by waiting for a new device from libudev, but that is asking
for trouble, as udev will happily rename the device before handing it to us.
Listen on rtnl instead, the chance of the name being changed before reaching us
is much smaller (if not nil).

Kernel patch in the works to make this unneccessary.
2014-01-30 14:30:39 +01:00
Tom Gundersen
3815f36f05 sd-rtnl: beef up rtnl-util a bit 2014-01-30 14:30:39 +01:00
Tom Gundersen
377a218f87 sd-dhcp-client/net-util: make netmask_to_prefixlen generic
This was originally included in the dhcp-client at my request, but it is not
really dhcp-specific and useful outside of it, so let's pull it out.
2014-01-30 14:30:39 +01:00
Tom Gundersen
eb0ea358b6 networkd: address - add support for broadcast 2014-01-30 14:30:39 +01:00
Tom Gundersen
801bd9e859 net-util: verify the address family
Error out if the address family is already set to something incompatible with the
address being parsed.
2014-01-30 14:30:39 +01:00
Tom Gundersen
eb27aeca24 networkd: dhcpv4 - add notion of 'CriticalConnection'
These connections are never torn down, even when the DHCP specifications say that
they should be. This is useful/necessary when the rootfs (or another critical fs)
is mounted over this network connection, and dataloss would result if the connection
is lost.

This option defaults to off, but our initrd generator (TBD) will enable it when
applicable.
2014-01-30 14:30:39 +01:00
Lennart Poettering
e7fb33ffef utmp: make sure we don't write the utmp reboot record twice on each boot
(Also, only send the audit msg once, too)
2014-01-30 14:18:46 +01:00
Lennart Poettering
1cea22a5e3 update-utmp: code modernizations 2014-01-30 13:28:56 +01:00
Lennart Poettering
084f83586e update TODO 2014-01-29 21:26:57 +01:00
Lennart Poettering
7b217f41d2 bus: when proxying messages from the bus driver patch the driver's well-known name into the sender 2014-01-29 21:26:57 +01:00