summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-08-27networkd: port many log messages over to newer logging APILennart Poettering
Let's drop some strerror() invocations, and make use of the easier to use newer logging APIs.
2015-08-27sd-bus: it's not a user error to query the error contained in a bus messageLennart Poettering
It's an OK way to check whether a message contains an erro, let's not consider this a loggable assertion event.
2015-08-27networkd: properly reset transient hostname when we lose a DHCP leaseLennart Poettering
Previously we were setting the transient hostname again, rather than resetting it.
2015-08-27networkd: optionally push dhcp timezone into timedatedLennart Poettering
2015-08-27dhcp: don't underflow in lease time calculationsLennart Poettering
Don't underflow when calculating lease time.
2015-08-27networkd: make DHCP lease timeouts configurableLennart Poettering
2015-08-27networkd: fix indentationLennart Poettering
2015-08-27dhcp: NTP servers should be requested by networkd but not implicitly by sd-dhcpLennart Poettering
The library so far always requested the NTP servers. This might be unnecessary in some uses, hence let's move the request into networkd instead.
2015-08-27dhcp: clean up dhcp4 lease objectLennart Poettering
a) drop handling of obsolete or unused DHCP options time_offset, mtu_aging_timeout, policy filter, mdr, ttl, ip forwarding settings. Should this become useful one day we can readd support for this. b) For subnet mask and broadcast it is not always clear whether 0 or 255.255.255.255 might be valid, hence maintain a boolean indicating validity next to it. c) serialize/deserialize broadcast address, lifetime, T1 and T2 together with the rest of the fields in dhcp_lease_save() and dhcp_lease_load(). d) consistently return ENODATA from getter functions for data that is missing in the lease. e) add missing getter calls for broadcast, lifetime, T1, T2. f) when decoding DHCP options, generate debug messages on parse failures, but try to proceed if possible. g) Similar, when deserializing a lease in dhcp_lease_load(), make sure we deal nicely with unparsable fields, to provide upgrade compat. h) fix some memory allocations
2015-08-26dhcp: rename index to ifindexLennart Poettering
This avoids confusion what this is, in particular as libc knows an index() function.
2015-08-26dhcp: store client id as void*, since we dont know what it isLennart Poettering
2015-08-26dhcp: properly handle error from ioctl()Lennart Poettering
2015-08-26dhcp: generic data should be void*, not uint8_t*Lennart Poettering
If we handly arbitrary data we should use "void*" pointers, not "uint8_t*", how go intended C to be used.
2015-08-26network: s/user_data/userdata/Lennart Poettering
Everywhere else we call the generic user data pointer just "userdata", rather than "user_data". Let's do this here, too.
2015-08-26dhcp: coding style fixesLennart Poettering
We place the opening bracket of a function on the same line as the function name. Let's do so in the DHCP sources too.
2015-08-26dhcp: stop using refcnt.hLennart Poettering
No need to invole atomic ops in single-threaded APIs, let's simplify this.
2015-08-26basic: document that people shouldn't use refcnt.h without reasonLennart Poettering
refcnt.h only exists for cases where objects are simultaneously handled by different threads. Otherwise it should not be used. The only case where this applies is sd_bus, really, and pretty much none of our APIs, since we do not claim thread-safety for them.
2015-08-26dhcp: keep lease save/load functions privateLennart Poettering
When we make sd-dhcp public one day we really should not make sd_dhcp_lease_save() and sd_dhcp_lease_load() public, since it's pretty much only useful as internal utility for networkd itself.
2015-08-26networkd: let's uppercase the first character in log messagesLennart Poettering
Let's try to generate log messages that resemble english language sentences, hence uppercase the first character.
2015-08-26dhcp: normalize DHCP host and domain names from leasesLennart Poettering
Previoulsy, we just checked whether the domain names specified in incoming DHCP leases are valid. Given that validation code actually internally normalizes anyway, it's a good idea to simply do the full normalization and store that in the lease structure. This allows us to remove the manual removal of a trailing dot, if there is one.
2015-08-26dhcp: various simplificationsLennart Poettering
2015-08-26network: turn on DHCP timezone passing between container and hostLennart Poettering
Let's turn on DHCP timezone passing from the host to a container, so that the timezone is always in sync.
2015-08-26dhcp,network: implement RFC 4833 (DHCP Timezone option)Lennart Poettering
This one is simply to add: encode the tzdata timezone in the DHCP options and optionally make use of it.
2015-08-26dhcp: be more careful when parsing strings from DHCP packetsLennart Poettering
Let's make sure there's no embedded 0 byte. Also, let's reset the string if the length is zero.
2015-08-26networkd: don't leak memory of Hostname= is used twice in a .network fileLennart Poettering
Also, we should only accept trailing dots where we have to, but not everywhere, hence be more strict when validating configured hostnames.
2015-08-26time-util: add new get_timezone() call to get local timezoneLennart Poettering
Let's move the timedated-specific code to time-util.h and make it generic.
2015-08-26sd-dhcp6: fix domainname memleakDavid Herrmann
strv_extend() does not consume the passed entry, hence, we must properly free it. Furthermore, we should *not* use strv_consume() as we do greedy allocations on 'ret'; and greedy-allocations should only be used for short lived objects or caches. Fix the domainname parser to properly free temporary storage when done.
2015-08-26sd-dhcp: don't randomly ref objectsDavid Herrmann
In our API design, getter-functions don't ref objects. Calls like foo_get_bar() will not ref 'bar'. We never do that and there is no real reason to do it in single threaded APIs. If you need a ref-count, you better take it yourself *BEFORE* doing anything else on the parent object (as this might invalidate your pointer). Right now, sd_dhcp?_get_lease() refs the lease it returns. A lot of code-paths in systemd do not expect this and thus leak the lease reference. Fix this by changing the API to not ref returned objects.
2015-08-26Merge pull request #1048 from poettering/resolved-manDaniel Mack
man: resolved man page updates (plus one to machinectl)
2015-08-26Merge pull request #1047 from poettering/machinectl-TERMDavid Herrmann
machinectl: pass $TERM into "machinectl shell" sessions
2015-08-26man: minor extension to the machinectl man pageLennart Poettering
s/an/any/, as reported by Vito Caputo. Also mention explicitly that the security properties (i.e. SELinux) are also isolated when "machinectl shell" is used.
2015-08-26man: document nss-resolveLennart Poettering
2015-08-26Merge pull request #1044 from d-hatayama/fix_systemctl_abspathMartin Pitt
selinux: fix regression of systemctl subcommands when absolute unit file paths are specified
2015-08-26man: document resolved's RR synthesizing and query routingLennart Poettering
2015-08-26Merge pull request #998 from vbatts/tar_nosparse_flagLennart Poettering
import: don't create sparse tar archives
2015-08-26machinectl: pass $TERM into "machinectl shell" sessionsLennart Poettering
2015-08-26Merge pull request #1046 from poettering/resolved-dumpTom Gundersen
dump resolved cache/zone info on SIGSUR1, plus one fix
2015-08-26manager: close hostname fd *after* removing it epollLennart Poettering
Otherwise the epoll removal will fail and result in a warning.
2015-08-26resolved: dump cache and zone contents to syslog on SIGUSR1Lennart Poettering
2015-08-26hwdb: Update database of Bluetooth company identifiersMarcel Holtmann
2015-08-26selinux: fix regression of systemctl subcommands when absolute unit file ↵HATAYAMA Daisuke
paths are specified The commit 4938696301a914ec26bcfc60bb99a1e9624e3789 overlooked the fact that unit files can be specified as unit file paths, not unit file names, wrongly passing a unit file path to the 1st argument of manager_load_unit() that handles it as a unit file name. As a result, the following 4 systemctl subcommands: enable disable reenable link mask unmask fail with the following error message: # systemctl enable /usr/lib/systemd/system/kdump.service Failed to execute operation: Unit name /usr/lib/systemd/system/kdump.service is not valid. # systemctl disable /usr/lib/systemd/system/kdump.service Failed to execute operation: Unit name /usr/lib/systemd/system/kdump.service is not valid. # systemctl reenable /usr/lib/systemd/system/kdump.service Failed to execute operation: Unit name /usr/lib/systemd/system/kdump.service is not valid. # cp /usr/lib/systemd/system/kdump.service /tmp/ # systemctl link /tmp/kdump.service Failed to execute operation: Unit name /tmp/kdump.service is not valid. # systemctl mask /usr/lib/systemd/system/kdump.service Failed to execute operation: Unit name /usr/lib/systemd/system/kdump.service is not valid. # systemctl unmask /usr/lib/systemd/system/kdump.service Failed to execute operation: Unit name /usr/lib/systemd/system/kdump.service is not valid. To fix the issue, first check whether a unit file is passed as a unit file name or a unit file path, and then pass the unit file to the appropreate argument of manager_load_unit(). By the way, even with this commit mask and unmask reject unit file paths as follows and this is a correct behavior: # systemctl mask /usr/lib/systemd/system/kdump.service Failed to execute operation: Invalid argument # systemctl unmask /usr/lib/systemd/system/kdump.service Failed to execute operation: Invalid argument
2015-08-26Merge pull request #1043 from phomes/masterDaniel Mack
test-util: fix a memleak
2015-08-25Merge pull request #1039 from poettering/nspawn-machine-templateDaniel Mack
nspawn: make sure --template= and --machine= my be combined
2015-08-25Merge pull request #1038 from poettering/coredumpctl-directoryDaniel Mack
Add --directory= option for reading alternate journal
2015-08-25Merge pull request #1040 from poettering/cgroup-path-fixDaniel Mack
fix "systemctl status idontexist.service" showing the full cgroup tree
2015-08-25test-util: fix a memleakThomas Hindoe Paaboel Andersen
2015-08-25resolve: fix regression in dns-scopeDaniel Mack
Bring back a return statement 106784eb errornously removed. Thanks to @phomes for reporting.
2015-08-25Merge pull request #1041 from phomes/masterDaniel Mack
trivial cleanups
2015-08-25Merge pull request #1034 from poettering/resolved-fixes-2Daniel Mack
various resolved fixes
2015-08-25machinectl: remove unused variableThomas Hindoe Paaboel Andersen