summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-07-24journal: when verifying journal files, handle empty ones nicelyLennart Poettering
A journal file that carries no objects should be considered valid.
2015-07-24journal: avoid mapping empty data and field hash tablesLennart Poettering
When a new journal file is created we write the header first, then sync and only then create the data and field hash tables in them. That means to other processes it might appear that the files have a valid header but not data and field hash tables. Our reader code should be able to deal with this. With this change we'll not map the two hash tables right-away after opening a file for reading anymore (because that will of course fail if the objects are missing), but delay this until the first time we access them. On top of that, when we want to look something up in the hash tables and we notice they aren't initialized yet, we consider them empty. This improves handling of some journal files reported in #487.
2015-07-24journal-verify: don't hit SIGFPE when determining progressLennart Poettering
If we determine the progress based on a number of objects available, don't blindly devide by the number of objects, given that it might be 0.
2015-07-23Merge pull request #678 from eworm-de/oracle-kvmLennart Poettering
Oracle kvm
2015-07-23virt: handle Virtualbox 5.0 with kvm hypervisorChristian Hesse
Virtualbox 5.0 now supports kvm hypervisor. In this case cpuid identidies as "kvm", which breaks units depending on ConditionVirtualization=oracle. So return "oracle" even with kvm hypervisor.
2015-07-23Merge pull request #682 from ssahani/bridgeLennart Poettering
networkd: add bridge link properties
2015-07-23networkd: add bridge link propertiesSusant Sahani
new bridge properties br.network [Match] Name=enp0s25 [Network] Bridge=br-test [Bridge] Cost=332 BPDUGuard = true HairPin = true FastLeave = true RootBlock = true UnicastFlood = true
2015-07-23resolve: transaction - stop processing packet when found to be invalidTom Gundersen
We were stopping the transaction, but we need to stop processing the packet alltogether.
2015-07-23resolved: packet - fix segfault in truncate()Tom Gundersen
A size_t was being accessed as a char* due to the order of arguments being inverted.
2015-07-23resolved: rr - ignore pseudo types in NSEC(3) bitmapsTom Gundersen
2015-07-23resolved: rr - fix parsing of NSEC3Tom Gundersen
We were appending rather than reading the bitmap.
2015-07-23resolved: rr - don't read past end of RR when parsing NSEC(3)Tom Gundersen
We can never read past the end of the packet, so this seems impossible to exploit, but let's error out early as reading past the end of the current RR is clearly an error. Found by Lennart, based on patch by Daniel.
2015-07-23resolved: rr - SSHFP contains the fingerprint, not the keyTom Gundersen
Rename the field to make this clearer.
2015-07-23resolved: packet - fail on invalid zero-length dataTom Gundersen
Most blobs (keys, signatures, ...) should have a specific size given by the relevant algorithm. However, as we don't use/verify the algorithms yet, let's just ensure that we don't read out zero-length data in cases where this does not make sense. The only exceptions, where zero-length data is allowed are in the NSEC3 salt field, and the generic data (which we don't know anything about, so better not make any assumptions).
2015-07-23bitmap: various clean-upsLennart Poettering
a) use memcmp() to compare bitmaps efficiently b) use UINT64_C() macro instead of ULL suffixes to get right suffix for uint64_t constants c) add a few assert()s d) when comparing integers with 0 we generally try to make this explicit with "!= 0". e) remove redundant bitmap_isset() if check, as we don't have it in bitmap_isset() either. f) It should be fine to invoke bitmap_unset() on a NULL bitmap
2015-07-23Merge pull request #669 from poettering/dns-rr-memdupTom Gundersen
resolve: unify memdup() code when parsing RRs
2015-07-23sd-netlink: add bridge NL paramsSusant Sahani
2015-07-23Add bridge NL params to missing.hSusant Sahani
2015-07-23Merge pull request #677 from zonque/bitmap2Tom Gundersen
basic: bitmap: use uint64_t instead if long long unsigned
2015-07-23Merge pull request #674 from ssahani/tunnelDaniel Mack
ip6 tunnel: add support for DSCP
2015-07-23Merge pull request #537 from poettering/nss-mymachines-usernsDavid Herrmann
Hook up container userns with nss-mymachines
2015-07-23Merge pull request #663 from poettering/tmpfiles-chattr-enottyDaniel Mack
tmpfiles: downgrade errors when a file system does not support file a…
2015-07-23Merge pull request #673 from poettering/dns-packet-append-type-windowDaniel Mack
resolved: make sure we alway initialize *start in dns_packet_append_t…
2015-07-23basic: bitmap: use uint64_t instead if long long unsignedDaniel Mack
long long unsigned is always 64 bit wide, so use a more readable type.
2015-07-23Merge pull request #672 from poettering/bitmap-isclearDaniel Mack
bitmap: bitmap_clear()
2015-07-23networkd: ip6 tunnel add DSCPSusant Sahani
This patch adds support for setting the DSCP field in the ip6 tunnel. when set it inherits DSCP field between inner and outer header.
2015-07-23resolved: make sure we alway initialize *start in ↵Lennart Poettering
dns_packet_append_type_window()
2015-07-23bitmap: bitmap_clear()Lennart Poettering
No need to actually reset the bitmap, we can just truncate it back zero size. That not only makes bitmap_clear() quicker, but also subsequent bitmap_isclear().
2015-07-23resolve: unify memdup() code when parsing RRsLennart Poettering
Let's make dns_packet_read_public_key() more generic by renaming it to dns_packet_read_memdup() (which more accurately describes what it does...). Then, patch all cases where we memdup() RR data to use this new call. This specifically checks for zero-length objects, and handles them gracefully. It will set zero length payload fields as a result. Special care should be taken to ensure that any code using this call can handle the returned allocated field to be NULL if the size is specified as 0!
2015-07-23Merge pull request #667 from poettering/dns-rr-memleakTom Gundersen
resolve: fix two minor memory leaks
2015-07-23resolve: fix two minor memory leaksLennart Poettering
strv_extend() already strdup()s internally, no need to to this twice. (Also, was missing OOM check...). Use strv_consume() when we already have a string allocated whose ownership we want to pass to the strv. This fixes 50f1e641a93cacfc693b0c3d300bee5df0c8c460.
2015-07-23resolve: drop dns_scope_good_dns_server()Lennart Poettering
It's not used anymore since 29815b6c608b836cada5e349d06a96b63eaa65f3, hence let's remove it from the sources.
2015-07-23Merge pull request #665 from poettering/reword-journal-size-msgDaniel Mack
journal: reword msg about enforced size limits a bit
2015-07-23journal: reword msg about enforced size limits a bitLennart Poettering
http://lists.freedesktop.org/archives/systemd-devel/2015-July/033574.html
2015-07-23Merge pull request #632 from Stebalien/cgls-nspawnDaniel Mack
Machines can also be services
2015-07-22cgls: machines can also be servicesSteven Allen
This makes `systemd-cgls -M <machine name>` work with nspawn containers in systemd 222.
2015-07-22tmpfiles: downgrade errors when a file system does not support file attributesLennart Poettering
This downgrades errors from setting file attributes via tmpfiles to warnings and makes them non-fatal. Also, as a special case, if a file system does not support file attributes at all, then the message is downgraded to debug, so that it is not seen at all. With this change reiserfs should not see any messages at all anymore (since it apparently does not implement file attributes at all), but XFS will still get a warning but no failure. The warning is something the XFS kernel folks should fix though, by adjusting their file attributes behaviour to be identical to ext234's. Fixes #560.
2015-07-22Merge pull request #660 from michich/in-setMichal Schmidt
improve IN_SET macro
2015-07-22basic: more optimizable IN_SET macroMichal Schmidt
Making the array static allows gcc -O2 to generate smaller code: "size systemd" before: text data bss dec hex filename 1377286 128608 2632 1508526 1704ae systemd After: text data bss dec hex filename 1374326 128572 2664 1505562 16f91a systemd (IN_SET still results in worse generated code than using "x == FOO || x == BAR || ...". I don't think we'll be able to match that with the C preprocessor.) This change limits the use of IN_SET to sets with constant elements. All present callers use constants. The compiler would report an "initializer element is not constant" error otherwise.
2015-07-22basic: better readable IN_SET macroMichal Schmidt
Putting the set elements in an array variable and using ELEMENTSOF makes it clearer what's going on. Incidentally, it also makes gcc -O2 generate slightly smaller code: "size systemd", before: text data bss dec hex filename 1378318 128608 2632 1509558 1708b6 systemd After: text data bss dec hex filename 1377286 128608 2632 1508526 1704ae systemd
2015-07-22Merge pull request #654 from ssahani/nlLennart Poettering
network: Add tunnel params
2015-07-22Merge pull request #647 from michich/job-loggingTom Gundersen
Job logging fixes and improvements
2015-07-22sd-netlink: add tunnel paramsSusant Sahani
2015-07-22Tunnel NL params: Add to missing.hSusant Sahani
2015-07-22ata_id: unreverse WWN identifierZbigniew Jędrzejewski-Szmek
An endianness conversion was lost in 6024a6e302bad6bcf073fa84a41a6123305dc845. Restore it. Now ata_id and scsi_id output match. https://bugzilla.redhat.com/show_bug.cgi?id=1227503
2015-07-21udev: unify reporting of invalid cmdline keysMichal Schmidt
This way it does not need distinct string literals and it also preserves the "rd." prefix.
2015-07-21udev: fix crash with invalid udev.log-priorityMichal Schmidt
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1245293
2015-07-21core: adjust job completion message log levelsMichal Schmidt
We do not print all non-OK job completion status messages to the console in red, because not all of them are plain errors. We do however log the same messages as LOG_ERR. Differentiate the log levels by deducing them from the job result in a way that more or less matches the color of the console message.
2015-07-21core: small refactor of job completion loggingMichal Schmidt
Joins three log_struct() calls into one.
2015-07-21core: log completion of remaining job typesMichal Schmidt
JOB_RESTART and failed JOB_VERIFY_ACTIVE completions were printed to console but not to the log.