Lukas Nykryn [Fri, 19 Apr 2013 11:58:58 +0000 (13:58 +0200)]
logind-dbus: initialize result variable
Lukas Nykryn [Fri, 19 Apr 2013 11:58:57 +0000 (13:58 +0200)]
crypt-setup-generator: correctly check return of strdup
Zbigniew Jędrzejewski-Szmek [Wed, 17 Apr 2013 21:19:38 +0000 (17:19 -0400)]
core/killall: use procfs_file_alloca
Harald Hoyer [Fri, 19 Apr 2013 11:44:56 +0000 (13:44 +0200)]
Reintroduce f_type comparison macro
This reverts commit
4826f0b7b5c0aefa08b8cc7ef64d69027f84da2c.
Because statfs.t_type can be int on some architecures, we have to cast
the const magic to the type, otherwise the compiler warns about
signed/unsigned comparison, because the magic can be 32 bit unsigned.
statfs(2) man page is also wrong on some systems, because
f_type is not __SWORD_TYPE on some architecures.
The following program:
int main(int argc, char**argv)
{
struct statfs s;
statfs(argv[1], &s);
printf("sizeof(f_type) = %d\n", sizeof(s.f_type));
printf("sizeof(__SWORD_TYPE) = %d\n", sizeof(__SWORD_TYPE));
printf("sizeof(long) = %d\n", sizeof(long));
printf("sizeof(int) = %d\n", sizeof(int));
if (sizeof(s.f_type) == sizeof(int)) {
printf("f_type = 0x%x\n", s.f_type);
} else {
printf("f_type = 0x%lx\n", s.f_type);
}
return 0;
}
executed on s390x gives for a btrfs:
sizeof(f_type) = 4
sizeof(__SWORD_TYPE) = 8
sizeof(long) = 8
sizeof(int) = 4
f_type = 0x9123683e
Zbigniew Jędrzejewski-Szmek [Thu, 18 Apr 2013 23:59:12 +0000 (19:59 -0400)]
Update NEWS
Zbigniew Jędrzejewski-Szmek [Thu, 18 Apr 2013 23:37:26 +0000 (19:37 -0400)]
systemd-python: wrap sd_journal_add_conjunction
Zbigniew Jędrzejewski-Szmek [Wed, 17 Apr 2013 18:13:09 +0000 (14:13 -0400)]
nspawn: create empty /etc/resolv.conf if necessary
nspawn will overmount resolv.conf if it exists. Since e.g.
default install with yum doesn't create /etc/resolv.conf,
a container created with yum will not have network. This
seems undesirable, and since we overmount the file anyway,
let's create it too.
Also, mounting a read-write /etc/resolv.conf in the container
is treated as a failure, since it makes it possible to
modify hosts /etc/resolv.conf from inside the container.
Lennart Poettering [Thu, 18 Apr 2013 23:11:38 +0000 (01:11 +0200)]
build-sys: run 'make update-man-list'
Lennart Poettering [Thu, 18 Apr 2013 22:41:24 +0000 (00:41 +0200)]
build-sys: prepare release 202
Marius Vollmer [Thu, 18 Apr 2013 20:34:36 +0000 (22:34 +0200)]
journal: when iterating through a file we might lose messages when changing direction.
https://bugs.freedesktop.org/show_bug.cgi?id=63672
Lennart Poettering [Thu, 18 Apr 2013 20:20:56 +0000 (22:20 +0200)]
man: document the new login class 'background'
Lennart Poettering [Thu, 18 Apr 2013 20:19:33 +0000 (22:19 +0200)]
update TODO
Harald Hoyer [Thu, 18 Apr 2013 07:41:23 +0000 (09:41 +0200)]
cryptsetup: ask for password, if key file cannot be accessed
If the key file cannot be accessed, we can at least ask for the
password.
Josh Triplett [Thu, 18 Apr 2013 18:32:26 +0000 (11:32 -0700)]
systemd-logind: Fix linking by reordering libraries in LDADD
libsystemd-audit needs functions from libsystemd-shared, so
libsystemd-audit needs to appear first. Otherwise:
CCLD systemd-logind
./.libs/libsystemd-audit.a(audit.o): In function `audit_session_from_pid':
/home/josh/src/systemd/src/shared/audit.c:50: undefined reference to `detect_container'
Kay Sievers [Thu, 18 Apr 2013 17:05:10 +0000 (19:05 +0200)]
bus: test - add hack to receive messages
Kay Sievers [Thu, 18 Apr 2013 16:54:17 +0000 (18:54 +0200)]
bus: catch up with kernel changes
Henrik Grindal Bakken [Thu, 18 Apr 2013 12:40:24 +0000 (14:40 +0200)]
buildsys: Add --disable-tests to avoid building tests
This patch adds --disable-tests to configure. It is based on a patch
posted by Thierry Reding in 2010. The motivation for adding it is that
some tests fail link-time when cross-compiling.
The patch adds a new Makefile variable -- manual_tests -- and uses
that instead of noinst_PROGRAMS. However, if ENABLE_TESTS is true,
the former is added to the latter. It also renames noinst_tests to
simply tests.
Harald Hoyer [Thu, 18 Apr 2013 12:50:42 +0000 (14:50 +0200)]
Revert f_type fixups
This reverts commit
a858b64dddf79177e12ed30f5e8c47a1471c8bfe.
This reverts commit
aea275c43194b6ac519ef907b62c5c995050fde0.
This reverts commit
fc6e6d245ee3989c222a2a8cc82a33475f9922f3.
This reverts commit
c4073a27c555aeceac87a3b02a83141cde641a1e.
This reverts commit
cddf148028f525be8176e7f1cbbf4f862bd287f6.
This reverts commit
8c68a70170b31f93c287f29fd06c6c17edaf19ad.
The constants are now casted to __SWORD_TYPE, which should resolve the
compiler warnings about signed vs unsigned.
After talking to Kay, we concluded:
This should be fixed in the kernel, not worked around in userspace tools.
Architectures cannot use int and expect magic constants lager than INT_MAX
to work correctly. The kernel header needs to be fixed.
Even coreutils cannot handle it:
#define RAMFS_MAGIC 0x858458f6
# stat -f -c%t /
ffffffff858458f6
#define BTRFS_SUPER_MAGIC 0x9123683E
# stat -f -c%t /mnt
ffffffff9123683e
Although I found the perfect working macro to fix the thing :)
__extension__ ({ \
bool _ret = false; \
switch(f) { case c: _ret=true; }; \
( _ret ); \
})
Harald Hoyer [Thu, 18 Apr 2013 10:05:41 +0000 (12:05 +0200)]
macro.h: let F_TYPE_CMP() macro fail to compile, if second parameter is not const
If the magic parameter is not a const, then the macro does not work, so
better fail to compile, than be surprised afterwards.
Harald Hoyer [Thu, 18 Apr 2013 08:15:25 +0000 (10:15 +0200)]
fileio.c: do not parse comments after non-whitespace chars
systemd does not want to understand comments after the first
non-whitespace char occured.
key=foo #comment will result into key == "foo #comment"
key="foo" #comment will result into key == "foo#comment"
"key= #comment" will result into key == "#comment"
"key #comment" is an invalid line
Harald Hoyer [Thu, 18 Apr 2013 08:16:17 +0000 (10:16 +0200)]
sd-login.c: fixup for
d70964d0
p pointer is not _cleanup_free_
Harald Hoyer [Thu, 18 Apr 2013 07:11:22 +0000 (09:11 +0200)]
move _cleanup_ attribute in front of the type
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
Harald Hoyer [Wed, 17 Apr 2013 12:05:24 +0000 (14:05 +0200)]
login/sd-login.c: make use of _cleanup_free_ and friends
Harald Hoyer [Thu, 18 Apr 2013 06:06:55 +0000 (08:06 +0200)]
rename CMP_F_TYPE to F_TYPE_CMP
Harald Hoyer [Thu, 18 Apr 2013 05:34:25 +0000 (07:34 +0200)]
Add ugly CMP_F_TYPE() macro
On some architectures (like s390x) the kernel has the type int for
f_type, but long in userspace.
Assigning the 32 bit magic constants from linux/magic.h to the 31 bit
signed f_type in the kernel, causes f_type to be negative for some
constants.
glibc extends the int to long for those architecures in 64 bit mode, so
the negative int becomes a negative long, which cannot be simply
compared to the original magic constant, because the compiler would
automatically cast the constant to long.
To workaround this issue, we also compare to the (int)MAGIC value in a
macro. Of course, we could do #ifdef with the architecure, but it has to
be maintained, and the magic constants are 32 bit anyway.
Someday, when the int is unsigned or long for all architectures, we can
remove this macro again. Until then, keep it as simple as it can be.
Harald Hoyer [Thu, 18 Apr 2013 05:15:03 +0000 (07:15 +0200)]
core/execute: only clean the environment, if we have one
Lennart Poettering [Thu, 18 Apr 2013 01:12:06 +0000 (03:12 +0200)]
build-sys: add sd_journal_add_conjunction() to symbol versioning file
Lennart Poettering [Thu, 18 Apr 2013 01:11:44 +0000 (03:11 +0200)]
man: document the new sd_journal_add_conjunction() call
Lennart Poettering [Thu, 18 Apr 2013 00:54:52 +0000 (02:54 +0200)]
update TODO
Simon Peeters [Wed, 10 Apr 2013 22:39:01 +0000 (00:39 +0200)]
Move bus_error to dbus-common and remove bus_error_message_or_strerror
bus_error and bus_error_message_or_strerror dit almost exactly the same,
so use only one of them and place it in dbus-common.
Harald Hoyer [Thu, 11 Apr 2013 13:44:33 +0000 (15:44 +0200)]
cryptsetup-generator: add support for rd.luks.key=
Also clarify rd.luks.uuid and luks.uuid in the manual.
https://bugzilla.redhat.com/show_bug.cgi?id=905683
Lennart Poettering [Thu, 18 Apr 2013 00:21:01 +0000 (02:21 +0200)]
man: document that timeout=0 is the default for entries in crypttab
Harald Hoyer [Fri, 12 Apr 2013 07:45:26 +0000 (09:45 +0200)]
cryptsetup: set the timeout to 0 by default
cryptsetup itself has no timeout as default from the beginning. So the
default timeout has been "0" from the beginning.
https://bugzilla.redhat.com/show_bug.cgi?id=949702
Lennart Poettering [Thu, 18 Apr 2013 00:18:33 +0000 (02:18 +0200)]
execute: always add in EXECUTABLE= field when we log something about execution
Lennart Poettering [Thu, 18 Apr 2013 00:10:44 +0000 (02:10 +0200)]
systemctl: drop usage of "internally loaded modules"
I wouldn't know what "internally" is supposed to mean hear, and we use
this terminology in this context nowhere else, so let's drop this.
Lennart Poettering [Wed, 17 Apr 2013 20:23:21 +0000 (22:23 +0200)]
readahead: let readahead run for a little longer
Especially slower systems need more than 10s for starting the session,
so let's bump this to 30s.
Lennart Poettering [Wed, 17 Apr 2013 20:23:18 +0000 (22:23 +0200)]
update TODO
Harald Hoyer [Wed, 17 Apr 2013 16:58:06 +0000 (18:58 +0200)]
fixup for
cddf148028f52
Instead of making a type up, just use __SWORD_TYPE, after reading
statfs(2).
Too bad, this does not fix s390x because __SWORD_TYPE is (long int) and
the kernel uses (int) to fill in the field!!!!!!
Auke Kok [Wed, 17 Apr 2013 16:49:03 +0000 (09:49 -0700)]
bootchart: Fix errno usage.
Lennart Poettering [Wed, 17 Apr 2013 16:48:23 +0000 (18:48 +0200)]
update TODO
Lennart Poettering [Wed, 17 Apr 2013 16:45:45 +0000 (18:45 +0200)]
bus: replace aligned_alloc() with memalign() everywhere
aligned_alloc() is C11 and not available everywhere. Also it would
require us to align the size value. So let's just invoke memalign()
instead, which is universally available and doesn't have any alignment
restrictions on the size parameter.
Henrik Grindal Bakken [Wed, 17 Apr 2013 16:08:37 +0000 (18:08 +0200)]
core: Remove unnecessary typedef
ExecContext isn't used in this header file, and everything seems to
build just fine without this typedef. The typedef doesn't really belong
here, and at least my gcc-4.4.6 gives an error on type redefined.
Harald Hoyer [Wed, 17 Apr 2013 16:23:17 +0000 (18:23 +0200)]
fixup
8c68a7017 and cast to (unsigned long)
Harald Hoyer [Wed, 17 Apr 2013 16:03:39 +0000 (18:03 +0200)]
fixed statfs.f_type signed vs unsigned comparisons
statfs.f_type is signed but the filesystem magics are unsigned.
Casting the magics to signed will not make the signed.
Problem seen on big-endian 64bit s390x with __fsword_t 8 bytes.
Casting statfs.f_type to unsigned on the other hand will get us what we
need.
https://bugzilla.redhat.com/show_bug.cgi?id=953217
Zbigniew Jędrzejewski-Szmek [Wed, 17 Apr 2013 14:52:46 +0000 (10:52 -0400)]
shell-completion: use -a to see "empty" properties
Lennart Poettering [Wed, 17 Apr 2013 14:19:05 +0000 (16:19 +0200)]
update TODO
Harald Hoyer [Wed, 17 Apr 2013 13:41:18 +0000 (15:41 +0200)]
TODO: add s.th. like "systemctl set-log-level debug"
Harald Hoyer [Wed, 17 Apr 2013 13:25:02 +0000 (15:25 +0200)]
core/execute: report invalid environment variables from files
Because "export key=val" is not supported by systemd, an error is logged
where the invalid assignment is coming from.
Introduce strv_env_clean_log() to log invalid environment assignments,
where logging is possible and allowed.
parse_env_file_internal() is modified to allow WHITESPACE in keys, to
report the issues later on.
Harald Hoyer [Wed, 17 Apr 2013 12:58:08 +0000 (14:58 +0200)]
Revert "man/systemd.xml: change the signal names to kill systemd"
This reverts commit
432c30d25fc2a7b4939d5ea6c29708e1323a2b9c.
Suggestion was to fix bash instead. :-/
Harald Hoyer [Wed, 17 Apr 2013 10:03:20 +0000 (12:03 +0200)]
systemctl:enable_sysv_units() more _cleanup_free_
Harald Hoyer [Wed, 17 Apr 2013 09:02:56 +0000 (11:02 +0200)]
fileio:parse_env_file_internal() fix environment file parsing
parse_env_file_internal() could not parse the following lines correctly:
export key="val"
key="val"#comment
Harald Hoyer [Wed, 10 Apr 2013 09:29:03 +0000 (11:29 +0200)]
core/execute.c: debug log final execve() with argv[]
https://bugzilla.redhat.com/show_bug.cgi?id=772073
Harald Hoyer [Wed, 17 Apr 2013 07:38:02 +0000 (09:38 +0200)]
man/systemd.xml: change the signal names to kill systemd
Using the signal name to put systemd in debug mode with bash results in:
$ kill -s SIGRTMIN+22 1
bash: kill: SIGRTMIN+22: invalid signal specification
whereas this works:
$ kill -s SIGRTMAX-8 1
/usr/bin/kill understands both signal names, so just change them to the
bash names.
Harald Hoyer [Wed, 10 Apr 2013 10:32:27 +0000 (12:32 +0200)]
systemctl: clarify usage of "--all" versus list-unit-files
Novice users might think, that
$ systemctl --all
is equal to
$ systemctl list-unit-files
https://bugzilla.redhat.com/show_bug.cgi?id=748512
Harald Hoyer [Fri, 12 Apr 2013 07:14:43 +0000 (09:14 +0200)]
journalctl: specify "--unit=" and "--user-unit" multiple times
Previously only one "--unit=" or "--user-unit" could be specified.
With this patch, journalcrtl can show multiple units.
$ journalctl -u systemd-udevd.service -u sshd.service -u crond.service -b
-- Logs begin at Sa 2013-03-23 11:08:45 CET, end at Fr 2013-04-12
09:10:22 CEST. --
Apr 12 08:41:37 lenovo systemd[1]: Started udev Kernel Device Manager.
Apr 12 08:41:37 lenovo systemd[1]: Stopped udev Kernel Device Manager.
Apr 12 08:41:38 lenovo systemd[1]: Started udev Kernel Device Manager.
Apr 12 08:41:38 lenovo crond[291]: (CRON) INFO (Syslog will be used
instead of sendmail.)
Apr 12 08:41:38 lenovo crond[291]: (CRON) INFO (running with inotify
support)
Apr 12 08:41:39 lenovo systemd[1]: Starting OpenSSH server daemon...
Apr 12 08:41:39 lenovo systemd[1]: Started OpenSSH server daemon.
Apr 12 08:41:39 lenovo sshd[355]: Server listening on 0.0.0.0 port 22.
Apr 12 08:41:39 lenovo sshd[355]: Server listening on :: port 22.
Apr 12 08:41:39 lenovo mtp-probe[373]: checking bus 1, device 8:
"/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.6/1-1.5.6.2/1-1.5.6.2.1"
Harald Hoyer [Thu, 11 Apr 2013 13:27:55 +0000 (15:27 +0200)]
journal: add one more level on top with AND
When using "-p" and "-b" in combination with "-u", the output is not
what you would expect. The reason is the sd_journal_add_disjunction()
call in add_matches_for_unit() and add_matches_for_user_unit(), which
adds two ORs without taking the other conditions to every OR.
Adding another level on top with AND and sd_journal_add_conjunction()
solves the problem.
Output before:
$ journalctl -o short-monotonic -ab -p 0 -u sshd.service
-- Reboot --
[ 3.216305] lenovo systemd[1]: Starting OpenSSH server daemon...
-- Reboot --
[ 3.168666] lenovo systemd[1]: Starting OpenSSH server daemon...
[ 3.169639] lenovo systemd[1]: Started OpenSSH server daemon.
[36285.635389] lenovo systemd[1]: Stopped OpenSSH server daemon.
-- Reboot --
[ 10.838657] lenovo systemd[1]: Starting OpenSSH server daemon...
[ 10.913698] lenovo systemd[1]: Started OpenSSH server daemon.
[ 6881.035183] lenovo systemd[1]: Stopped OpenSSH server daemon.
-- Reboot --
[ 6.636228] lenovo systemd[1]: Starting OpenSSH server daemon...
[ 6.662573] lenovo systemd[1]: Started OpenSSH server daemon.
[ 6.681148] lenovo sshd[397]: Server listening on 0.0.0.0 port 22.
[ 6.681379] lenovo sshd[397]: Server listening on :: port 22.
As we see, the output is from _every_ boot and priority 0 is not taken
into account.
Output after patch:
$ journalctl -o short-monotonic -ab -p 0 -u sshd.service
-- Logs begin at Sun 2013-02-24 20:54:44 CET, end at Tue 2013-03-19 14:58:21 CET. --
Increasing the priority:
$ journalctl -o short-monotonic -ab -p 6 -u sshd.service
-- Logs begin at Sun 2013-02-24 20:54:44 CET, end at Tue 2013-03-19 14:59:12 CET. --
[ 6.636228] lenovo systemd[1]: Starting OpenSSH server daemon...
[ 6.662573] lenovo systemd[1]: Started OpenSSH server daemon.
[ 6.681148] lenovo sshd[397]: Server listening on 0.0.0.0 port 22.
[ 6.681379] lenovo sshd[397]: Server listening on :: port 22.
Harald Hoyer [Fri, 12 Apr 2013 09:56:27 +0000 (11:56 +0200)]
core/device.c: fix possible segfault
https://bugs.freedesktop.org/show_bug.cgi?id=63189
better fail than segfault
systemd[1]: Failed to load device unit: Invalid argument
systemd[1]: Failed to process udev device event: Invalid argument
Harald Hoyer [Wed, 17 Apr 2013 06:48:07 +0000 (08:48 +0200)]
TODO: remove fixed systemctl property bug
Harald Hoyer [Wed, 17 Apr 2013 06:28:41 +0000 (08:28 +0200)]
timedated: fixed NTP enabled: n/a
Martin Jansa [Tue, 16 Apr 2013 12:26:30 +0000 (14:26 +0200)]
configure: use AC_CHECK_TOOL for objcopy, strings and gperf
* using AC_PATH_TOOL does not allow to override it from shell environment
which is useful when cross-compiling
* with external toolchain I have different HOST_PREFIX and HOST_SYS
AC_PATH_TOOL is using HOST_SYS as prefix and fails to find objcopy
which is available only as ${TARGET_PREFIX}-objcopy then it tries
objcopy without prefix which is found on host, but that objcopy
does not work for !host (e.g. arm when building on x86) libs
Mantas Mikulėnas [Sun, 14 Apr 2013 11:54:09 +0000 (14:54 +0300)]
fileio: also escape $ and ` when writing out env vars
These are also considered special by sh and bash.
Zbigniew Jędrzejewski-Szmek [Wed, 17 Apr 2013 03:38:28 +0000 (23:38 -0400)]
build-sys: make sure kdbus.h is part of tarball
Also fix 'update-man-list' rule and add rules for new man pages.
Zbigniew Jędrzejewski-Szmek [Wed, 17 Apr 2013 03:07:45 +0000 (23:07 -0400)]
journalctl: show fields requested with --field in full
I see little point in silently truncating fields when
they are explictly requested. With this change e.g.
journalctl -b MESSAGE_ID=
9f26aa562cf440c2b16c773d0479b518 --field=BOOTCHART
works as expected.
Zbigniew Jędrzejewski-Szmek [Wed, 17 Apr 2013 00:29:59 +0000 (20:29 -0400)]
systemd: ignore hw timestamps in containers
They are irrelevant and misleading.
E.g. systemd-analyze:
Startup finished in 6d 4h 15min 32.330s (kernel) + 49ms 914us (userspace) = 6d 4h 15min 32.380s
becomes
Startup finished in 53.735ms (userspace) = 53.735ms
which looks much better :)
Zbigniew Jędrzejewski-Szmek [Wed, 17 Apr 2013 00:38:41 +0000 (20:38 -0400)]
bash-completion: --property support
Just bash.
Zbigniew Jędrzejewski-Szmek [Tue, 16 Apr 2013 03:54:56 +0000 (23:54 -0400)]
man: fix syntax in nsenter example
Apparently nsenter doesn't handle options concatenated together.
I'm pretty sure it worked at one point, but it seems like magic,
since each of those options can take arguments.
Zbigniew Jędrzejewski-Szmek [Tue, 16 Apr 2013 02:42:27 +0000 (22:42 -0400)]
sd-messages.h: add new bootchart message id
Zbigniew Jędrzejewski-Szmek [Tue, 16 Apr 2013 01:58:22 +0000 (21:58 -0400)]
core/main: use _cleanup_
Zbigniew Jędrzejewski-Szmek [Tue, 16 Apr 2013 02:25:58 +0000 (22:25 -0400)]
Report about syntax errors with metadata
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>
Zbigniew Jędrzejewski-Szmek [Mon, 15 Apr 2013 05:40:44 +0000 (01:40 -0400)]
core: log a few more things under UNIT=...
Zbigniew Jędrzejewski-Szmek [Tue, 16 Apr 2013 01:33:43 +0000 (21:33 -0400)]
core/main: generate 4 parsing functions from a macro
Zbigniew Jędrzejewski-Szmek [Mon, 15 Apr 2013 02:29:43 +0000 (22:29 -0400)]
conf-parser: generate 7 parsing functions from a macro
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).
Steven Hiscocks [Sun, 14 Apr 2013 19:55:08 +0000 (20:55 +0100)]
python-systemd: Reader return special fields and _Reader changes
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.
Zbigniew Jędrzejewski-Szmek [Sun, 14 Apr 2013 22:37:03 +0000 (18:37 -0400)]
systemd-python: export new sd_journal_{process,get_events,get_timeout}
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.
Michal Schmidt [Tue, 16 Apr 2013 21:07:14 +0000 (23:07 +0200)]
journal: fix off-by-one error in native message iovec counting
Thanks to Cristian Ciupitu for a reproducer.
https://bugzilla.redhat.com/show_bug.cgi?id=924359
Lennart Poettering [Tue, 16 Apr 2013 12:50:05 +0000 (14:50 +0200)]
util: make generation of profcs PID paths nicer
Lennart Poettering [Tue, 16 Apr 2013 03:47:04 +0000 (05:47 +0200)]
path-util: unify code for detecting OS trees
This also makes sure we always detect an OS tree the same way, by
checking for /etc/os-release.
Lennart Poettering [Tue, 16 Apr 2013 03:25:57 +0000 (05:25 +0200)]
macro: rework how we define cleanup macros
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.
Lennart Poettering [Tue, 16 Apr 2013 03:04:53 +0000 (05:04 +0200)]
util: replace decimal_str_max() by a typesafe macro DECIMAL_STR_WIDTH()
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.
Lennart Poettering [Tue, 16 Apr 2013 02:54:46 +0000 (04:54 +0200)]
bus: parse unit/user unit/session from cgroup path
Lennart Poettering [Tue, 16 Apr 2013 02:41:11 +0000 (04:41 +0200)]
update TODO
Lennart Poettering [Tue, 16 Apr 2013 02:36:06 +0000 (04:36 +0200)]
nspawn: introduce the new /machine/ tree in the cgroup tree and move 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.
Lennart Poettering [Tue, 16 Apr 2013 01:57:50 +0000 (03:57 +0200)]
util: make sure result of hostname_cleanup() passes hostname_is_valid()
Lennart Poettering [Tue, 16 Apr 2013 01:54:53 +0000 (03:54 +0200)]
logind: filter configured cgroup controller lists
Lennart Poettering [Tue, 16 Apr 2013 01:52:59 +0000 (03:52 +0200)]
logind: when looking for cgroup prefixes, allocate from stack
Michael Biebl [Tue, 16 Apr 2013 00:14:45 +0000 (02:14 +0200)]
libudev: remove udev_monitor_new_from_socket() symbol
This function was removed in v183, so drop it from the symbols
versioning file.
Kay Sievers [Tue, 16 Apr 2013 00:10:55 +0000 (02:10 +0200)]
bus: copy iteration macro from the kernel
Kay Sievers [Mon, 15 Apr 2013 23:45:44 +0000 (01:45 +0200)]
hwdb: update
Kay Sievers [Mon, 15 Apr 2013 23:44:36 +0000 (01:44 +0200)]
bus: catch up with kernel changes
Auke Kok [Mon, 15 Apr 2013 23:23:42 +0000 (16:23 -0700)]
bootchart: put the bootchart into the journal.
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.
Kay Sievers [Mon, 15 Apr 2013 21:39:42 +0000 (23:39 +0200)]
bus: fix missing macro argument renaming
<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!
Kay Sievers [Mon, 15 Apr 2013 21:32:38 +0000 (23:32 +0200)]
bus: catch up with kernel changes
Lennart Poettering [Mon, 15 Apr 2013 19:55:12 +0000 (21:55 +0200)]
audit: since nspawn now sets CAP_AUDIT_CONTROL for containers we cannot user 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.
Lennart Poettering [Mon, 15 Apr 2013 19:55:07 +0000 (21:55 +0200)]
core: let's make our log messages proper sentences with full stops
Lennart Poettering [Mon, 15 Apr 2013 19:52:56 +0000 (21:52 +0200)]
core: always create /user and /machine top-level cgroup dirs
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).
Lennart Poettering [Mon, 15 Apr 2013 19:52:21 +0000 (21:52 +0200)]
update TODO
Harald Hoyer [Mon, 15 Apr 2013 16:34:53 +0000 (18:34 +0200)]
do not change console to non-unicode for LANG=C
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.
Anatol Pomozov [Mon, 15 Apr 2013 02:37:54 +0000 (19:37 -0700)]
Fix spelling errors using 'codespell' tool
Lennart Poettering [Mon, 15 Apr 2013 12:16:45 +0000 (14:16 +0200)]
sd-login: add a sd_pid_get_user_unit() call
Lennart Poettering [Mon, 15 Apr 2013 12:05:00 +0000 (14:05 +0200)]
bus: handle env vars safely
Make sure that our library is safe for usage in SUID programs when it
comes to env var handling