1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 06:52:22 +03:00
Commit Graph

11079 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
27f6e5c782 bus: check return value from bus_type_get_alignment/size 2013-03-31 14:33:12 -04:00
Zbigniew Jędrzejewski-Szmek
10d18763ec nspawn, machine-id-setup: warn if read-only mount call fails
They are not crucial, but they shouldn't fail.
2013-03-31 14:32:48 -04:00
Zbigniew Jędrzejewski-Szmek
d73c3269cd nss-myhostname: use _cleanup_ and split function into two
The triply nested loop is just too much. Let's split out the
middle loop's body, so the whole thing is easier to read. Also
modernize the style a bit, using structure initialization to
avoid memset and such.
2013-03-31 14:32:32 -04:00
Zbigniew Jędrzejewski-Szmek
7a22620612 accelerometer: remove dead if and modernize
Based on a coverity warning.
2013-03-31 14:32:17 -04:00
Zbigniew Jędrzejewski-Szmek
cbb21cca09 execute: convert secure bits into mask properly
C.f. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5975c725dfd6f7d36f493ab1453fbdbd35c1f0e3
2013-03-31 14:31:51 -04:00
Zbigniew Jędrzejewski-Szmek
4dd1de72e8 Remove some dead code
Based on coverity report.
2013-03-31 14:28:36 -04:00
Lennart Poettering
a7edaadd78 journal-gatewayd: query PID 1 for virtalization
Since journal-gatewayd is now running unprivileged, and detecting
virtalization requires privileges, query PID1 via D-Bus for the used
virtualization.

This is also the first time we use libsystemd-bus for more than just
testing.

https://bugs.freedesktop.org/show_bug.cgi?id=62173
2013-03-31 18:16:02 +02:00
Lennart Poettering
98178d3947 bus: rename sd_bus_get_peer() to sd_bus_get_server_id()
This function always returns the server side ID. The name suggested it
was actually always the peer's ID, but that's not correct if the call is
called on a server bus context. Hence, let's correct the name a bit.
2013-03-31 16:46:21 +02:00
Lennart Poettering
52f3ba915b bus: s/sd_message_handler_t/sd_bus_message_handler_t/g 2013-03-31 16:26:14 +02:00
Lennart Poettering
392d5b378c bus: parse matches locally and allow registration of callbacks for them
This includes code to parse and split up match strings which will also
be useful to calculate bloom filter masks when the time comes.
2013-03-31 16:16:37 +02:00
Lennart Poettering
11c4c24920 bus: add missing test-bus-server.c 2013-03-30 15:30:23 +01:00
Lennart Poettering
2181a7f558 bus: implement server mode, and anonymous authentication 2013-03-30 15:21:55 +01:00
Lennart Poettering
a3de5ae1d7 prioq: consider a NULL prioq empty 2013-03-30 15:21:55 +01:00
Lennart Poettering
5384d4b3d7 bus: if we recieve fds but fd passing is off, consider this an error 2013-03-30 15:21:55 +01:00
Lennart Poettering
0f4b73c8d3 bus: enable SO_PASSCRED only if we are not connected to a bus 2013-03-30 15:21:55 +01:00
Lennart Poettering
3d339fec29 bus: properly set up bus connections with sd_bus_set_exec() 2013-03-30 15:21:55 +01:00
Lennart Poettering
9d37386224 bus: consider it an error if the first message we get on the bus is not a reply to HELLO 2013-03-30 15:21:54 +01:00
Lennart Poettering
b29b8bc202 bus: add C++ wrappers to public header files 2013-03-30 15:21:54 +01:00
Lennart Poettering
166de4255c dbus: let's make this const array static 2013-03-30 15:21:54 +01:00
Lennart Poettering
bcadcb64ee udev: extern on functions is pointless 2013-03-30 15:21:54 +01:00
Lennart Poettering
830f01f0bc unit: no need to export variables if we can avoid it 2013-03-30 15:21:54 +01:00
Lennart Poettering
5a494eacbb TODO 2013-03-30 15:21:54 +01:00
Kay Sievers
e592143e5a gitignore: update 2013-03-30 15:06:51 +01:00
Kay Sievers
7db293c4a0 TODO: update 2013-03-30 15:03:09 +01:00
Kay Sievers
df758e9875 killall: print notice what we forcefully KILL 2013-03-30 14:19:40 +01:00
Kelly Anderson
95e3faefe2 build-sys: force Python to write UTF-8
Here is a patch that fixes documentation with python 3.x in non utf-8
locales.  Specifically in my locale latin-1 is the default setting for
output going to stdout, which causes it to fail. By writing directly
to file we are able to set the locale to utf-8.
2013-03-29 20:30:22 -04:00
Zbigniew Jędrzejewski-Szmek
1a13e31d27 build-sys,man: use XML entities to substite strings
This makes it easier to add substitutions to man pages,
avoiding the separate transformation step.

mkdir -p's are removed from the rule, because xsltproc will
will create directories on it's own.

All in all, two or three forks per man page are avoided,
which should make things marginally faster.

Unfortunately python parsers must too be tweaked to handle
entities. This isn't particularly easy: with lxml a custom
Resolver can be used, but the stdlib etree doesn't support
external entities *at all*. So when running without lxml,
the entities are just removed. Right now it doesn't matter,
since the entities are not indexed anyway. But I intend to
add indexing of filenames in the near future, and then the
index generated without lxml might be missing a few lines.
Oh well.
2013-03-29 20:30:21 -04:00
Zbigniew Jędrzejewski-Szmek
4e7b3c20e0 build-sys: generate sed substitution from a list
I want to use the substitutions in different form for
xml entities.
2013-03-29 20:30:21 -04:00
Zbigniew Jędrzejewski-Szmek
aa0bb9c2c4 Revert "build-sys: substitute strings in systemd.unit(5)"
This reverts commits c78ab91132
and 185c3be03c.

It is simpler to just use includes...
2013-03-29 20:30:21 -04:00
Zbigniew Jędrzejewski-Szmek
a696dbef34 test-path-util: fix another stupid test failure 2013-03-29 20:30:21 -04:00
Lennart Poettering
1dda524f05 units: fix network-online.target fields 2013-03-29 18:31:07 +01:00
Lennart Poettering
b5c03638d4 update TODO 2013-03-29 18:31:07 +01:00
Zbigniew Jędrzejewski-Szmek
590f50130f test-path-util: fix botched test 2013-03-29 10:49:06 -04:00
Koen Kooi
8b3227c90d bootctl: fix help text
It currently says 'time settings', change that to 'boot settings'.
2013-03-29 15:47:43 +01:00
Lennart Poettering
f04c0bd6ed utmp: make gcc shut up, we need to pass an int here, not size_t 2013-03-29 15:47:18 +01:00
Maksim Melnikau
813ac7d3dd cgtop --help: default depth is 3 not 2
use default depth from variable for --help
2013-03-29 15:42:47 +01:00
Zbigniew Jędrzejewski-Szmek
8333c77edf Always use errno > 0 to help gcc
gcc thinks that errno might be negative, and functions could return
something positive on error (-errno). Should not matter in practice,
but makes an -O4 build much quieter.
2013-03-29 10:12:41 -04:00
Zbigniew Jędrzejewski-Szmek
0db809489f journalctl: fix --update-catalog with not --root arg
grawity> `journalctl --update-catalog` from latest git prints:
         "Recursive mkdir .: Invalid argument" and
         "Failed to write : Invalid argument"
2013-03-29 10:12:41 -04:00
Zbigniew Jędrzejewski-Szmek
76877b46b6 tests: add some silly tests for path-util.c 2013-03-28 23:45:59 -04:00
Zbigniew Jędrzejewski-Szmek
13cbf3a5f0 journalctl: support --root for message catalogs 2013-03-28 23:45:59 -04:00
Zbigniew Jędrzejewski-Szmek
844ec79b3c catalog: open up catalog internals
In order to write tests for the catalog functions, they
are made non-static and start taking a 'database' parameter,
which is the name of a file with the preprocessed catalog
entries.

This makes it possible to make test-catalog part of the
normal test suite, since it now only operates on files
in /tmp.

Some more tests are added.
2013-03-28 23:45:59 -04:00
Zbigniew Jędrzejewski-Szmek
18cd5fe99f catalog: make sure strings are terminated
Coverity complains: systemd-199/src/journal/catalog.c:126:
buffer_size_warning: Calling strncpy with a maximum size argument of
32 bytes on destination array "i->language" of size 32 bytes might
leave the destination string unterminated.

...and unfortunately it was right. The string was defined as a
fixed-size string in some parts of the code, and used a
null-terminated string in others (e.g. in log statements). There's no
point in conserving one byte, so just define the max language tag
length to 31 bytes, and use null terminated strings everywhere.

Also, wrap some lines, zero-fill less bytes, use '\0' instead of just
0 to be more explicit that this is one byte.
2013-03-28 23:45:59 -04:00
Václav Pavlín
f459285212 udev: check return value of uname. 2013-03-28 23:45:58 -04:00
Zbigniew Jędrzejewski-Szmek
c309a7137b bootchart: properly terminate string
systemd-199/src/bootchart/store.c:289: buffer_size_warning: Calling
strncpy with a maximum size argument of 256 bytes on destination array
"ps->name" of size 256 bytes might leave the destination string
unterminated.

...and indeed, the string was used as NULL-terminated later on.

pid_cmdline_strncpy is renamed to pid_cmdline_strscpy to commemorate
the fact that it *does* properly terminate the string.
2013-03-28 23:45:52 -04:00
Zbigniew Jędrzejewski-Szmek
2688887653 utmp-wtmp: don't try to read past end of string
systemd-199/src/shared/utmp-wtmp.c:228: buffer_size_warning: Calling
strncpy with a maximum size argument of 32 bytes on destination array
"store.ut_line" of size 32 bytes might leave the destination string
unterminated.

The destination string is unterminated on purpose, but we must
remember that.
2013-03-28 23:24:55 -04:00
Zbigniew Jędrzejewski-Szmek
c8c9c69f39 build-sys: remove papersize option from sphinx
We don't use it currently for anything (no latex output),
but it was messing up stuff if /etc/papersize had comments.
2013-03-28 22:55:52 -04:00
Zbigniew Jędrzejewski-Szmek
5e75606a41 coredump: do not free twice 2013-03-28 22:27:15 -04:00
Lennart Poettering
9ca3c17f20 build-sys: prepare release 200 2013-03-29 03:07:17 +01:00
Lennart Poettering
0c17fbce55 unit: replace remote-fs-setup.target by network-online.target
https://bugzilla.redhat.com/show_bug.cgi?id=787314
2013-03-29 03:07:17 +01:00
Kay Sievers
78a0460588 hwdb: update 2013-03-28 21:53:30 +01:00