summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2013-04-17Report about syntax errors with metadataZbigniew Jędrzejewski-Szmek
The information about the unit for which files are being parsed is passed all the way down. This way messages land in the journal with proper UNIT=... or USER_UNIT=... attribution. 'systemctl status' and 'journalctl -u' not displaying those messages has been a source of confusion for users, since the journal entry for a misspelt setting was often logged quite a bit earlier than the failure to start a unit. Based-on-a-patch-by: Oleksii Shevchuk <alxchk@gmail.com>
2013-04-17core: log a few more things under UNIT=...Zbigniew Jędrzejewski-Szmek
2013-04-17core/main: generate 4 parsing functions from a macroZbigniew Jędrzejewski-Szmek
2013-04-17conf-parser: generate 7 parsing functions from a macroZbigniew Jędrzejewski-Szmek
Those functions were identical, apart from typos. Log message is modified to contain the type of destination var (int, double, ...). I think this might make it easier to understand why a value was rejected (e.g. a minus from an unsigned type).
2013-04-17python-systemd: Reader return special fields and _Reader changesSteven Hiscocks
Changes to _Reader make it match closer to C API, by removing `get_next` and `get_previous`. A `get_all` method added, which returns dictionary of fields using C API SD_JOURNAL_FOREACH_DATA macro, which can be used in conjunction with `next`. _Reader `get`, `next`, `get_{realtime,monotonic,cursor}` and new `previous` methods are made private. This is so the traversal and getting of journal fields can be made transparent in the python interface. Reader now solely implements `get_next` and `get_previous`, returning a standard dictionary (future: other mapping types?) with all standard and special fields through the converters. This makes the output the same as journalctl json/export format output. Iterator methods also moved to Reader, as they do not function as intend with changes to _Reader. These changes also mean that more optimised journal interfaces can be made more easily from _Reader, by avoiding getting of unrequired fields by using the `_get` method, and avoiding field conversions.
2013-04-16systemd-python: export new sd_journal_{process,get_events,get_timeout}Zbigniew Jędrzejewski-Szmek
get_timeout_ms is added as a convenience function, since it is abysmally hard to call clock_gettime() in Python versions lower than 3.3. And even for Python 3.3 users it saves a few lines.
2013-04-16journal: fix off-by-one error in native message iovec countingMichal Schmidt
Thanks to Cristian Ciupitu for a reproducer. https://bugzilla.redhat.com/show_bug.cgi?id=924359
2013-04-16util: make generation of profcs PID paths nicerLennart Poettering
2013-04-16path-util: unify code for detecting OS treesLennart Poettering
This also makes sure we always detect an OS tree the same way, by checking for /etc/os-release.
2013-04-16macro: rework how we define cleanup macrosLennart Poettering
There's now a generic _cleanup_ macro with an argument. The macros for specific types are now defined using this macro, and in the header files where they belong. All cleanup handlers are now inline functions.
2013-04-16util: replace decimal_str_max() by a typesafe macro DECIMAL_STR_WIDTH()Lennart Poettering
DECIMAL_STR_WIDTH() now works on any numeric type, and is easier to distingish from DECIMAL_STR_MAX(). This also replaces another manual implementaiton of ulog10 by this macro.
2013-04-16bus: parse unit/user unit/session from cgroup pathLennart Poettering
2013-04-16nspawn: introduce the new /machine/ tree in the cgroup tree and move ↵Lennart Poettering
containers there Containers will now carry a label (normally derived from the root directory name, but configurable by the user), and the container's root cgroup is /machine/<label>. This label is called "machine name", and can cover both containers and VMs (as soon as libvirt also makes use of /machine/). libsystemd-login can be used to query the machine name from a process. This patch also includes numerous clean-ups for the cgroup code.
2013-04-16util: make sure result of hostname_cleanup() passes hostname_is_valid()Lennart Poettering
2013-04-16logind: filter configured cgroup controller listsLennart Poettering
2013-04-16logind: when looking for cgroup prefixes, allocate from stackLennart Poettering
2013-04-16libudev: remove udev_monitor_new_from_socket() symbolMichael Biebl
This function was removed in v183, so drop it from the symbols versioning file.
2013-04-16bus: copy iteration macro from the kernelKay Sievers
2013-04-16bus: catch up with kernel changesKay Sievers
2013-04-15bootchart: put the bootchart into the journal.Auke Kok
This bit of code is mostly stolen from coredump.c. We construct a simple journal message and append the bootchart file in the journal automatically. You can extract the latest bootchart from the current boot with something like: $ journalctl -b MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518 --field=BOOTCHART which prints it to stdout. None of the other logic is touched. The journal entry is created even if bootchart was run manually, which is probably wrong.
2013-04-15bus: fix missing macro argument renamingKay Sievers
<fdo-vcs> systemd kay master * b1454bf src/libsystemd-bus/ bus-kernel.c kdbus.h <fdo-vcs> systemd bus: catch up with kernel changes <kmacleod> kay: randomly looked at your commit, it looks like in KDBUS_FOREACH_ITEM you missed changing a (d) to an (i) in (uint8_t*) (d) < (uint8_t*) (k) + (k)->size; ? <kay> kmacleod: hah, so there *is* a reason for using _foo in macros :) <kay> kmacleod: thanks!
2013-04-15bus: catch up with kernel changesKay Sievers
2013-04-15audit: since nspawn now sets CAP_AUDIT_CONTROL for containers we cannot user ↵Lennart Poettering
this anymore to skip audit session ID retrieval As audit is still broken in containers we need a reliable way how we can determine whether the audit data we read from 7proc is actually useful. Previously we used CAP_AUDIT_CONTROL for this, since nspawn removed that from the nspawn container. This has changed a while back however, which means we used audit data of host system in the container. This adds an explicit container check to the audit calls, so that all audit data is turned off in containers. This should fix session creation with pam_systemd/logind in nspawn containers.
2013-04-15core: let's make our log messages proper sentences with full stopsLennart Poettering
2013-04-15core: always create /user and /machine top-level cgroup dirsLennart Poettering
This allows clients to put inotify watches on these trees to watch for state changes, without having to wait until these dirs are created. This introduces the new top-level /machine cgroup dir as canonical location where OS containers and VMs shall be located (as discussed with the libvirt folks).
2013-04-15do not change console to non-unicode for LANG=CHarald Hoyer
If systemd-vconsole-setup was started with LANG=C (no locale.conf), then it would set the console to non-unicode, which is not what we want.
2013-04-15Fix spelling errors using 'codespell' toolAnatol Pomozov
2013-04-15sd-login: add a sd_pid_get_user_unit() callLennart Poettering
2013-04-15bus: handle env vars safelyLennart Poettering
Make sure that our library is safe for usage in SUID programs when it comes to env var handling
2013-04-15kdbus: parse cgroup meta data, tooLennart Poettering
2013-04-15localectl: read X11 keymaps from the correct fileLennart Poettering
As reported by Sergey Udaltsov.
2013-04-14udev/ata_id: zero out variable properlyZbigniew Jędrzejewski-Szmek
b8a2b0f76 'use initalization instead of explicit zeroing' introduced a bug where only the first sizeof(uint_t*) bytes would be zeroed out, instead of the whole array.
2013-04-14bus: remove two unused variablesZbigniew Jędrzejewski-Szmek
2013-04-14systemd-python: fix formatting in docstringZbigniew Jędrzejewski-Szmek
2013-04-14readahead-analyze: avoid division-by-0Zbigniew Jędrzejewski-Szmek
Also remove a few casts and use _cleanup_fclose_ to simplify logic.
2013-04-14MurmurHash3: actually inline functionsZbigniew Jędrzejewski-Szmek
"__attribute__((always_inline))" does not replace "inline" and they still need to be used together. This fixes "always_inline function might not be inlinable [-Wattributes]" warning in gcc 4.7 Idea-from-patch-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
2013-04-14kdbus: generare bloom filters properly for messages we sendLennart Poettering
2013-04-14kdbus: update kdbus.h from upstreamLennart Poettering
2013-04-14bus: always explicitly rewind read index before passing message to caller or ↵Lennart Poettering
callback
2013-04-14bus: fix counting of argN= matchesLennart Poettering
2013-04-14util: introduce alloca0() and use it at a number of placesLennart Poettering
2013-04-14bus: zero data structure and catch up with error value changeKay Sievers
2013-04-14kdbus: also parse cmdline message attributeLennart Poettering
2013-04-14kdbus: make name acquirement ioctls valgrind cleanLennart Poettering
2013-04-13Include <fcntl.h> instead of <sys/fcntl.h>Zbigniew Jędrzejewski-Szmek
<fcntl.h> is POSIX. On Linux, <sys/fcntl.h> simply includes <fcntl.h>, so there should be on difference. On Android likewise, except that there is some more stuff. QNX has only <fcntl.h>. https://bugs.freedesktop.org/show_bug.cgi?id=63423
2013-04-13fileio: in envfiles, do not skip lines following empty linesZbigniew Jędrzejewski-Szmek
https://bugs.freedesktop.org/show_bug.cgi?id=63477
2013-04-13Remove a few NULLsZbigniew Jędrzejewski-Szmek
Just {} is used in a lot of places now, and there's nothing special abose those few.
2013-04-13kdbus: parse even more kernel meta data fieldsLennart Poettering
2013-04-13kdbus: update to newest kdbus APILennart Poettering
2013-04-12journal: fix broken tags _SOURCE_REALTIME_TIMESTAMP and _MACHINE_IDMirco Tischler