summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-06-13rpm: add RPM macros to apply sysusers, sysctl, and binfmt drop-insLennart Poettering
With this in place RPMs can make sure that whatever they drop in is immeidately applied, and not delayed until next reboot. This also moves systemd-sysusers back to /usr/bin, since hardcoding the path to /usr/lib in the macros would mean compatibility breaks in future, should we turn sysusers into a command that is actually OK for people to call directly. And given that that is quite likely to happen (since it is useful to prepare images with its --root= switch), let's just prepare for it.
2014-06-13rpm: don't hardcode the binary paths in the macros, rely on $PATHLennart Poettering
this gives us a little bit more freedom to move things around later on, as we don't hardcode the systemd paths in old RPMs that shall work with new systemds.
2014-06-13sd-dhcp-server: test - skip when lacking permsTom Gundersen
2014-06-13install: fix invalid free() in unit_file_mask()Andreas Henriksson
int unit_file_mask(...) in ./src/shared/install.c calls get_config_path(...) which can in 4 error cases return without setting "ret", and thus "prefix" can be uninitialized when unit_file_mask(...) finishes (which it does directly after the error is returned from get_config_path(...)).
2014-06-13udev: fix invalid free() in enable_name_policy()Andreas Henriksson
static bool enable_name_policy(...) in ./src/udev/net/link-config.c calls proc_cmdline(...) to get "line" initialized, but proc_cmdline(...) does not guarantee that atleast when both conditions (detect_container(NULL) > 0) and read_full_file(...) returned < 0.
2014-06-13core: fix invalid free() in killall()Andreas Henriksson
static int killall(....) in ./src/core/killall.c tries to get "s" initialized by calling get_process_comm(...) which calls read_one_line_file(...) which if it fails will mean it is left uninitialized. It is then used in argument to strna(s) call where it is dereferenced(!), in addition to nothing else initializing it before the scope it is in finishes.
2014-06-13sd-dhcp-client: fix invalid free() in client_send_request()Andreas Henriksson
static int client_send_request(...) in ./src/libsystemd-network/sd-dhcp-client.c tries to initialize "request" by calling client_message_init(...), which has atleast 5 error cases where it can return without that happening. This leads to the function finishing without "request" being initialized.
2014-06-13networkd: link - left-align debug messagesTom Gundersen
Still add some whitespace betwen ifname and the message to get the messages aligned (as I find it easier to spot specific messages this way).
2014-06-13networkd: add dhcp server supportTom Gundersen
When enabled in [Network] it will set up a dhcp server on the interface, listening on one of its statically configured IPv4 addresses and with a fixed size pool of leases determined from it. Example: [Match] Name=ve-arch-tree [Network] Address=192.168.12.5/24 DHCPServer=yes [Route] Gateway=192.168.12.5 Destination=192.168.12.0/24 In this case we will configure ve-arch-tree with the address 192.168.12.5 and hand out addresses in the range 192.168.12.6 - 192.168.12.38. In the future, we should (as suggested by Lennart) introduce a syntax to pick the server address automatically.
2014-06-13sd-dhcp-server: add RELEASE supportTom Gundersen
2014-06-13sd-dhcp-server: add dummy DECLINE supportTom Gundersen
2014-06-13sd-dhcp-server: track bound leasesTom Gundersen
Make sure we don't hand out the same IP twice. We still don't handle lease expiry.
2014-06-13sd-dhcp-server: add support for clients requesting lease lifetimeTom Gundersen
2014-06-13sd-dhcp-server: add basic NAK supportTom Gundersen
2014-06-13sd-dhcp-server: add basic REQUEST/ACK supportTom Gundersen
2014-06-13sd-dhcp-server: add basic DISCOVER/OFFER supportTom Gundersen
2014-06-13sd-dhcp-server: add support for sending messagesTom Gundersen
2014-06-13sd-dhcp-server: add support for setting the server addressTom Gundersen
2014-06-13sd-dhcp-server: bind to raw socket for sendingTom Gundersen
We would like to use the UDP socket, but we cannot as we need to specify the MAC address manually.
2014-06-13sd-dhcp-server: add basic message parsingTom Gundersen
Parse the maximum message size the client can accept and the client id, falling back to sane defaults if they are not set.
2014-06-13sd-dhcp-server: add basic message handling and verificationTom Gundersen
2014-06-13sd-dhcp-server: bind to a given interfaceTom Gundersen
We will (at least at first), restrict our focus to running the server on at most one interface.
2014-06-13sd-dhcp-server: add basic functionality for starting/stopping serverTom Gundersen
Bind to UDP socket and listen for messages, discarding anything we receive.
2014-06-13sd-dhcp-server: add basic functionality for creating/destroying server instanceTom Gundersen
2014-06-13dhcp-network: allow UDP socket to listen on any addressTom Gundersen
For this to work nicely we need to use REUSEADDR so that more than one socket can be open at the same time. Also, we request the ifindex to be appended to incoming messages, so we know whence it came.
2014-06-13tmpfiles: add minimal tmpfiles snippet to rebuild the most essential stuff ↵Lennart Poettering
from /etc
2014-06-13units: rebuild /etc/passwd, the udev hwdb and the journal catalog files on bootLennart Poettering
Only when necessary of course, nicely guarded with the new ConditionNeedsUpdate= condition we added.
2014-06-13core: add new ConditionNeedsUpdate= unit conditionLennart Poettering
This new condition allows checking whether /etc or /var are out-of-date relative to /usr. This is the counterpart for the update flag managed by systemd-update-done.service. Services that want to be started once after /usr got updated should use: [Unit] ConditionNeedsUpdate=/etc Before=systemd-update-done.service This makes sure that they are only run if /etc is out-of-date relative to /usr. And that it will be executed after systemd-update-done.service which is responsible for marking /etc up-to-date relative to the current /usr. ConditionNeedsUpdate= will also checks whether /etc is actually writable, and not trigger if it isn't, since no update is possible then.
2014-06-13update-done: add minimal tool to manage system updates for /etc and /var, if ↵Lennart Poettering
/usr has changed In order to support offline updates to /usr, we need to be able to run certain tasks on next boot-up to bring /etc and /var in line with the updated /usr. Hence, let's devise a mechanism how we can detect whether /etc or /var are not up-to-date with /usr anymore: we keep "touch files" in /etc/.updated and /var/.updated that are mtime-compared with /usr. This means: Whenever the vendor OS tree in /usr is updated, and any services that shall be executed at next boot shall be triggered, it is sufficient to update the mtime of /usr itself. At next boot, if /etc/.updated and/or /var/.updated is older than than /usr (or missing), we know we have to run the update tools once. After that is completed we need to update the mtime of these files to the one of /usr, to keep track that we made the necessary updates, and won't repeat them on next reboot. A subsequent commit adds a new ConditionNeedsUpdate= condition that allows checking on boot whether /etc or /var are outdated and need updating. This is an early step to allow booting up with an empty /etc, with automatic rebuilding of the necessary cache files or user databases therein, as well as supporting later updates of /usr that then propagate to /etc and /var again.
2014-06-13condition: minor modernizationsLennart Poettering
2014-06-13units: don't conditionalize sysctl serviceLennart Poettering
We install two sysctl snippets ourselves, hence the condition will always trigger, so no point in tryng to optimize things with this, it just will make things slower, if anything.
2014-06-13units: remove conditions from systemd-tmpfiles-setupLennart Poettering
There's no point in conditionalizing systemd-tmpfiles at boot, since we ship tmpfiles snippets ourselves, hence they will always trigger anyway. Also, there's no reason to pull in local-fs.target from the service, hence drop that.
2014-06-13system-update-generator: modernizationsLennart Poettering
2014-06-13sysusers: hide generate .conf fileLennart Poettering
2014-06-13update TODOLennart Poettering
2014-06-13sysusers: move systemd-sysusers to libexec for nowLennart Poettering
2014-06-13tmpfiles: skip mknod() on -EPERM (device cgroup)Kay Sievers
2014-06-13sysusers: do not set todo to create a user when we only need a groupKay Sievers
2014-06-13cryptsetup: check that password is not nullThomas Hindoe Paaboel Andersen
Beef up the assert to protect against passing null to strlen. Found with scan-build.
2014-06-12sysuser: generate default snippet incorporating TTY_GID properlyLennart Poettering
When the user specifies --with-tty-gid= then we should honour that and write it to the snippet, too.
2014-06-12sysusers: add new input group to default snippetLennart Poettering
2014-06-12tmpfiles: minor modernizationsLennart Poettering
2014-06-12machine: minor modernizationsLennart Poettering
2014-06-12sysusers: add minimal tool to reconstruct /etc/passwd and /etc/group from ↵Lennart Poettering
static files systemd-sysusers is a tool to reconstruct /etc/passwd and /etc/group from static definition files that take a lot of inspiration from tmpfiles snippets. These snippets should carry information about system users only. To make sure it is not misused for normal users these snippets only allow configuring UID and gecos field for each user, but do not allow configuration of the home directory or shell, which is necessary for real login users. The purpose of this tool is to enable state-less systems that can populate /etc with the minimal files necessary, solely from static data in /usr. systemd-sysuser is additive only, and will never override existing users. This tool will create these files directly, and not via some user database abtsraction layer. This is appropriate as this tool is supposed to run really early at boot, and is only useful for creating system users, and system users cannot be stored in remote databases anyway. The tool is also useful to be invoked from RPM scriptlets, instead of useradd. This allows moving from imperative user descriptions in RPM to declarative descriptions. The UID/GID for a user/group to be created can either be chosen dynamic, or fixed, or be read from the owner of a file in the file system, in order to support reconstructing the correct IDs for files that shall be owned by them. This also adds a minimal user definition file, that should be sufficient for most basic systems. Distributions are expected to patch these files and augment the contents, for example with fixed UIDs for the users where that's necessary.
2014-06-12debug-shell: add condition for tty device to run onKay Sievers
2014-06-12udev: assign group "input" to all input devicesKay Sievers
2014-06-11NEWS: fix directory nameMantas Mikulėnas
2014-06-11NEWS: add missing comment about the "floppy" groupLennart Poettering
2014-06-11NEWS: mention that resolved's resolv.conf fragment movedsystemd/v214Lennart Poettering
2014-06-11build-sys: update library versionsLennart Poettering