summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-12-14bus: when connecting to a container's kdbus instance, enter namespace firstLennart Poettering
Previously we'd open the connection in the originating namespace, which meant most peers of the bus would not be able to make sense of the PID/UID/... identity of us since we didn't exist in the namespace they run in. However they require this identity for privilege decisions, hence disallowing access to anything from the host. Instead, when connecting to a container, create a temporary subprocess, make it join the container's namespace and then connect from there to the kdbus instance. This is similar to how we do it for socket conections already. THis also unifies the namespacing code used by machinectl and the bus APIs.
2013-12-13getty-generator: fix stripping /dev/Thomas Hindoe Paaboel Andersen
2013-12-13bus: install systemd-bus-proxyd unit files for compatibility with dbus1Lennart Poettering
2013-12-13getty-generator: fix segfault when $container_ttys is not setLennart Poettering
2013-12-13event: make gcc shut upLennart Poettering
2013-12-13journal: downgrade comments about sd_journal_print_with_location()Lennart Poettering
Effectviely these calls are ABI anyway, so downgrade the comments a bit, since it might actually be useful for language bindings to make use of them.
2013-12-13update TODOLennart Poettering
2013-12-13man: document that systemd-getty-generator can start additional container ↵Lennart Poettering
gettys on ptys
2013-12-13getty-generator: look add an environment variable $container_ttys set for ↵Lennart Poettering
PID 1 and start gettys on all ttys listed therein
2013-12-13nspawn: add new --setenv= switch to set an environment variable for the ↵Lennart Poettering
container to spawn
2013-12-13man: document more error codes for sd_bus_request_name()Lennart Poettering
2013-12-13libsystemd-bus: the same error codes for sd_bus_release_name() (for kdbus ↵Lukasz Skalski
and dbus1) Due to this patch, sd_bus_release_name() function returns the same code errors for kdbus and dbus1 if we try release non-existing name or foreign name.
2013-12-13build-sys: fix help text for --enable-kdbusLukasz Skalski
2013-12-13update TODOLennart Poettering
2013-12-13bus: when a connection terminated use ECONNRESET as errorLennart Poettering
2013-12-13bus: rework how we attach fds to event loopsLennart Poettering
When trying a couple of addresses one after the other, make sure to reattach the fds to the event loop.
2013-12-13event: add ability to change fd of an active event sourceLennart Poettering
2013-12-13event: allow to query userdata and watchdog stateLennart Poettering
2013-12-12man: add another nspawn exampleZbigniew Jędrzejewski-Szmek
Taken from https://bugs.freedesktop.org/show_bug.cgi?id=68369.
2013-12-13event: when unreffing an event source from its own handler, detach fd from epollLennart Poettering
The pattern of unreffing an IO event source and then closing its fd is frequently seen in even source callbacks. Previously this likely resultet in us removing the fd from the epoll after it was closed which is problematic, since while we were dispatching we always kept an extra reference to event source objects because we might still need it later.
2013-12-13event: be more conservative when returning errors from event handler callbacksLennart Poettering
We really should return errors from event handlers if we have a continous problem and don't know any other solution.
2013-12-13git: update .gitignoreLennart Poettering
2013-12-13namespace: include boot id in private tmp directoriesLennart Poettering
This way it is easy to only exclude directories from the current boot from automatic clean up in /var/tmp. Also, pick a longer name for the directories so that are globs in tmp.conf can be simpler yet equally accurate.
2013-12-13event: rework sd-event exit logicLennart Poettering
With this change a failing event source handler will not cause the entire event loop to fail. Instead, we just disable the specific event source, log a message at debug level and go on. This also introduces a new concept of "exit code" which can be stored in the event loop and is returned by sd_event_loop(). We also rename "quit" to "exit" everywhere else. Altogether this should make things more robus and keep errors local while still providing a way to return event loop errors in a clear way.
2013-12-13bus: fix make checkLennart Poettering
2013-12-13bus: properly parse NameOwnerChanged messages when caller explicitly wants ↵Lennart Poettering
to match against names coming/going
2013-12-13man: update sd_bus_request_name() man pageLennart Poettering
2013-12-13bus: make sure exit-on-idle logic works on kdbus systems that do not ↵Lennart Poettering
generate NameLost
2013-12-13bus: fix parsing of matches against empty stringsLennart Poettering
2013-12-12scan-build: silence some warningsThomas Hindoe Paaboel Andersen
test-fileio/test-strv: Use the streq_ptr to make build-scan not worry about passing in a null to a nonnull function. test-dhcp-option: Prevent a theoretical null pointer dereference
2013-12-12bus: fix rewind logicLennart Poettering
2013-12-12service: process watchdog timeouts with lowest priorityLennart Poettering
2013-12-12bus: remove explicit activator-specific flags, the kdbus supports it nowKay Sievers
2013-12-12bus: update kdbus.hKay Sievers
2013-12-12bus: always pass valid timeout to kdbusLennart Poettering
2013-12-12bus: enforce endianess and marshalling for messages we sendLennart Poettering
2013-12-12timedatectl: work with old timedatedShawn Landden
Which does have TimeUSec. Should we specifically check for this method instead of assuming time=0 means it doesn't exist? Before: shawn@debian-T61:~/git/systemd$ ./timedatectl Local time: Wed 1969-12-31 16:00:00 PST Universal time: Thu 1970-01-01 00:00:00 UTC RTC time: n/a Timezone: America/Los_Angeles (PST, -0800) NTP enabled: n/a NTP synchronized: no RTC in local TZ: no DST active: no Last DST change: DST ended at Sun 1969-10-26 01:59:59 PDT Sun 1969-10-26 01:00:00 PST Next DST change: DST begins (the clock jumps one hour forward) at Sun 1970-04-26 01:59:59 PST Sun 1970-04-26 03:00:00 PDT After: shawn@debian-T61:~/git/systemd$ ./timedatectl Local time: Wed 2013-12-11 14:03:21 PST Universal time: Wed 2013-12-11 22:03:21 UTC RTC time: n/a Timezone: America/Los_Angeles (PST, -0800) NTP enabled: n/a NTP synchronized: no RTC in local TZ: no DST active: no Last DST change: DST ended at Sun 2013-11-03 01:59:59 PDT Sun 2013-11-03 01:00:00 PST Next DST change: DST begins (the clock jumps one hour forward) at Sun 2014-03-09 01:59:59 PST Sun 2014-03-09 03:00:00 PDT
2013-12-12build-sys: use internal library for dhcp client testsZbigniew Jędrzejewski-Szmek
Also clean up AM_CFLAGS in a few places.
2013-12-12dhcp: Add function to free DHCP client dataPatrik Flykt
2013-12-12dhcp: Add notification callbackPatrik Flykt
Define a notification callback and events for stopping and client lease expiry. Add functions to fetch IP parameters from a lease.
2013-12-12dhcp: Compute expire, T1 and T2 timersPatrik Flykt
Compute the default T1 and T2 timer values if they were not set by the DHCP server. Verify that the values are reasonable.
2013-12-12dhcp: Process DHCP Ack/Nak messagePatrik Flykt
Process a DHCP Ack/Nak in much the same way as an DHCP Offer. Factor out header verification and process options sent. Add notification functionality with discrete values for the outcome of the DHCP Ack/ Nak processing.
2013-12-12dhcp: Add maximum message size optionPatrik Flykt
Add maximum message size option to keep some DHCP server implementations from sending too big messages. See ConnMan commit 0c5c862749c05193cf4c513628328c6db02b5222.
2013-12-12dhcp: Send DHCP Request to acquire an IP addressPatrik Flykt
Create and send a DHCP Request message reusing already existing parts of the code. This causes factoring out IP and UDP header creation and moving next timeout calculation to be done every time in the timer callback function independent of DHCP state. Also add an exponential part to the timer calculation, bail out if there are errors while resending the DHCP message for the sixth or more times.
2013-12-12dhcp: Handle received DHCP Offer messagePatrik Flykt
Create a function for handling the full IP, UDP and DHCP packet and tie it to the main loop. Verify IP and UDP headers and checksum. Creat a new lease structure with using the values supplied in the DHCP message. Free the lease structure when client is stopped. Split out socket handling into a creation and a sending part. As a result modify the test code.
2013-12-12dhcp: Add timeout and main loop supportPatrik Flykt
Require a main loop to be set when creating a DHCP client. Set up a timer to resend DHCP Discover messages and add a 0-2 second delay to the timeout value. Move to state Selecting after successful sending of a Discover message.
2013-12-12build: Add dependency on libsystemd-bus needed for main loopPatrik Flykt
2013-12-12dhcp: Add function to stop the DHCP clientPatrik Flykt
The client is stopped and brought back to its initial state.
2013-12-12dhcp: Support seconds elapsed since start of DHCP negotiationPatrik Flykt
It was noticed by Grant Erickson in ConnMan commit 95e15c09350acf58d4707056ae2614570883ef66 that: "Certain DHCP servers, such as that implemented in Mac OS X (< 10.7) for its "Internet Sharing" feature, refuse to issue a DHCP lease to clients that have not set a non-zero value in their DISCOVER or REQUEST packets."
2013-12-12dhcp: Add test for discover DHCP packet creationPatrik Flykt
Set a fake MAC address and emulate raw packet sending. When the buffer containing the Discover message is received, check selected IP and UDP headers and compute IP header and UDP message checksums. Also send the DHCP message for option parsing and expect a successful outcome.