1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-30 23:21:08 +03:00
Commit Graph

11242 Commits

Author SHA1 Message Date
Lennart Poettering
15d5af8145 bus: fall back to readv/writev if recvmsg/sendmsg don't work 2013-04-01 03:29:29 +02:00
Lennart Poettering
e82c950997 bus: allow two different fds for input/output in sd_bus_set_fd()
This is useful so that we can speak D-Bus over a FIFO pair such as
stdin+stdout.
2013-04-01 03:29:29 +02:00
Zbigniew Jędrzejewski-Szmek
7989e1f2d7 Partially revert e62d8c3944
The ~80 chars per line part wasn't well received.
2013-03-31 19:50:30 -04:00
Zbigniew Jędrzejewski-Szmek
cc1f918dda units/user: default.target must be isolatable
...
Activating default unit: default.target
Default target could not be isolated, starting instead: Operation refused, unit may not be isolated.
2013-03-31 19:43:14 -04:00
Zbigniew Jędrzejewski-Szmek
fff40a51cc activate: do not leak envp on error 2013-03-31 19:01:57 -04:00
Zbigniew Jędrzejewski-Szmek
fb93cf7375 journalctl: reword error message
Sentence seemed to suggest that all three conditions must be true.
2013-03-31 19:01:57 -04:00
Zbigniew Jędrzejewski-Szmek
7f2c1f4dbf tmpfiles: fix obscure leak in error path
The leak was because of the single return in midst of all
'goto finish'es. Using automatic cleanup simplifies things.
2013-03-31 19:01:57 -04:00
Zbigniew Jędrzejewski-Szmek
e62d8c3944 Modernization
Use _cleanup_ and wrap lines to ~80 chars and such.
2013-03-31 14:36:12 -04:00
Zbigniew Jędrzejewski-Szmek
3c8bed4ee0 strbuf: replace quick sort with bubble sort
No need to call the heavy artillery, when the original array
is sorted. Reduces complexity from n² log n to n log n, where
n is the number of items in the array, not very large, but
still.
2013-03-31 14:35:17 -04:00
Zbigniew Jędrzejewski-Szmek
a9c307e5d2 strbuf: fix leak on memory error
Not very likely, but let's fix it for the matter of
principle.
2013-03-31 14:34:24 -04:00
Zbigniew Jędrzejewski-Szmek
522cd7f18b bootchart: fix a potential buffer overrun
If the configured number of samples was close to MAXSAMPLES,
the samples buffer could be overrun:

- by 1, because of off-by-one in the condition (samples > arg_samples_len),
and
- by many in case of an overrun, because the number of samples to
  capture was increased, instead of being decreased.

Simplify things by converting to a normal for-loop.

In store.c: change buffer size from 4095 to 4096. 4095 is a strange
number.
2013-03-31 14:34:08 -04:00
Zbigniew Jędrzejewski-Szmek
4cd5f79d0b bootchart: split out option parsing from main() 2013-03-31 14:33:52 -04:00
Zbigniew Jędrzejewski-Szmek
4b94f3b8f7 journald: check return value of strappend 2013-03-31 14:33:30 -04:00
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