chiark / gitweb /
8 years agomacro: add macro for precisely determining length of decimal string formatting of...
Lennart Poettering [Tue, 2 Apr 2013 15:33:19 +0000 (17:33 +0200)]
macro: add macro for precisely determining length of decimal string formatting of a numeric type

8 years agoutil: add a bit of syntactic sugar for saving/restoring errno
Lennart Poettering [Tue, 2 Apr 2013 14:31:55 +0000 (16:31 +0200)]
util: add a bit of syntactic sugar for saving/restoring errno

8 years agoReplace s/Dropin/DropIn/
Zbigniew Jędrzejewski-Szmek [Tue, 2 Apr 2013 14:24:45 +0000 (10:24 -0400)]
Replace s/Dropin/DropIn/

8 years agoIntrospect and monitor dropin configuration
Oleksii Shevchuk [Mon, 1 Apr 2013 10:32:35 +0000 (13:32 +0300)]
Introspect and monitor dropin configuration

8 years agoshared/cgroup-show: fix leak of "pid"
Zbigniew Jędrzejewski-Szmek [Tue, 2 Apr 2013 03:11:54 +0000 (23:11 -0400)]
shared/cgroup-show: fix leak of "pid"

8 years agosystemctl: align all status fields to common column
Zbigniew Jędrzejewski-Szmek [Tue, 2 Apr 2013 03:09:35 +0000 (23:09 -0400)]
systemctl: align all status fields to common column

avahi-daemon.socket - Avahi mDNS/DNS-SD Stack Activation Socket
       Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.socket; enabled)
       Active: active (listening) since Mon 2013-04-01 09:02:44 EDT; 14h ago
 ListenStream: /var/run/avahi-daemon/socket

8 years agoAdd Listen* to dbus properties
Oleksii Shevchuk [Mon, 1 Apr 2013 20:09:45 +0000 (23:09 +0300)]
Add Listen* to dbus properties

sockets.socket - Test
  Loaded: loaded (/home/alxchk/.config/systemd/user/sockets.socket; static)
  Active: inactive (dead)
  Listen: Stream: /tmp/stream1
          Stream: @stream4
          Stream: [::]:9999
          Stream: [::1]:9996
          Datagram: /tmp/stream2
          Datagram: @stream5
          Datagram: [::]:9998
          Datagram: [::1]:9995
          SequentialPacket: @stream6
          SequentialPacket: /tmp/stream3
          FIFO: /tmp/fifo1
          Special: /dev/input/event9
          Netlink: kobject-uevent 0
          MessageQueue: /msgqueue1

[zj: - minor cleanups,
     - free i.listen,
     - remove sorting, because the order or sockets matters.]

8 years agoDo no isolate in case of emergency or severe problems
Dr. Tilmann Bubeck [Fri, 4 May 2012 08:32:47 +0000 (10:32 +0200)]
Do no isolate in case of emergency or severe problems

This patch changes and systemd-fsck to not use
"isolate" when going into emergency.
This fixes

The motivation is, that when something wents wrong, we should
keep everything as it is, to let the user fix the problem. When
isolating we stop a lot of services and therefore change the
system heavily so that it gets harder for the user to fix.

An example is a crypted partition. When the fsck in a crypted
partition fails, it previously used "emergency/start/isolate"
which stops cryptsetup. Therefore if the user tries to fsck
e.g. /dev/mapper/luks-356c20ae-c7a2-4f1c-ae1d-1d290a91b691
as printed by the failing fsck, then it will not find this
device (because it got closed).

So please apply this patch to let the user see the failing


[zj: removed dead isolate param from start_target().]

8 years agoAlways use our own MAX/MIN definitions
Cristian Rodríguez [Mon, 1 Apr 2013 06:08:05 +0000 (03:08 -0300)]
Always use our own MAX/MIN definitions

code in src/shared/macro.h only defined MAX/MIN in case
they were not defined previously. however the MAX/MIN
macros implemented in glibc are not of the "safe" kind but defined

define MIN(a,b) (((a)<(b))?(a):(b))
define MAX(a,b) (((a)>(b))?(a):(b))

Avoid nasty side effects by using our own versions instead.

Also fix the warnings derived from this change.

[zj: - modify MAX3 macro to fix warning about _a shadowing _a,
     - do bootchart/svg.c too,
     - remove unused MIN3.]

8 years agoupdate TODO
Lennart Poettering [Mon, 1 Apr 2013 21:04:11 +0000 (23:04 +0200)]
update TODO

8 years agoshutdown: correctly wait for processes we killed in the killall spree
Lennart Poettering [Mon, 1 Apr 2013 20:48:40 +0000 (22:48 +0200)]
shutdown: correctly wait for processes we killed in the killall spree

Previously we simply counted how many processes we killed and expected
as many waitpid() calls to succeed. That however is incorrect to do.

As we might kill processes that are not our immediate children, and as
there might be left-over processes in the waitpid() queue from earlier
the we might get more ore less waitpid() events that we expect.

Hence: keep precise track of the processes we kill, remove the ones we
get waitpid() for, and after each time we get SIGCHLD check if all
others still exist. We use getpgid() to check if a PID still exists.

This should fix issues with journald not setting journal files offline
correctly on shutdown, because we'd too quickly proceed from SIGTERM to
SIGKILL because some left-over process was in our waitpid() queue.

8 years agocryptsetup: add RequiresMountsFor for keyfile
Thomas Weißschuh [Fri, 29 Mar 2013 22:01:12 +0000 (22:01 +0000)]
cryptsetup: add RequiresMountsFor for keyfile

This ensures that the keyfile is available during the opening of the encrypted

Also dropped the explicit ordering, as the containers
are ordered implicitly by their content.

8 years agocryptsetup: RequiresMountsFor if source is a file
Thomas Weißschuh [Fri, 29 Mar 2013 22:01:11 +0000 (22:01 +0000)]
cryptsetup: RequiresMountsFor if source is a file


8 years agocore/socket: log errors when starting socket for this socket
Zbigniew Jędrzejewski-Szmek [Mon, 1 Apr 2013 02:44:45 +0000 (22:44 -0400)]
core/socket: log errors when starting socket for this socket

When showing an error like 'Socket service not loaded', the
error won't show up in the status for the socket, unless it is
marked as SYSTEMD_UNIT=*.socket. Marking it as SYSTEMD_UNIT=*.service,
when the service is non-existent, is not useful.

8 years agoAdd AllowIsolate=yes to snapshots
Oleksii Shevchuk [Sun, 31 Mar 2013 11:40:04 +0000 (14:40 +0300)]
Add AllowIsolate=yes to snapshots

8 years agostdio-bridge: rework stdio bridge to use libsystemd-bus
Lennart Poettering [Mon, 1 Apr 2013 01:28:42 +0000 (03:28 +0200)]
stdio-bridge: rework stdio bridge to use libsystemd-bus

8 years agobus: always return something in sd_bus_get_timeout()
Lennart Poettering [Mon, 1 Apr 2013 01:26:38 +0000 (03:26 +0200)]
bus: always return something in sd_bus_get_timeout()

8 years agobus: be more careful when determining credential data
Lennart Poettering [Mon, 1 Apr 2013 01:25:31 +0000 (03:25 +0200)]
bus: be more careful when determining credential data

As it turns out SCM_CREDENTIALS is not always supported on socketpair(),
so let's also try SO_PEERCRED then.

8 years agobus: when the first char a server receives isn't the NUL byte immediately fail
Lennart Poettering [Mon, 1 Apr 2013 01:24:43 +0000 (03:24 +0200)]
bus: when the first char a server receives isn't the NUL byte immediately fail

8 years agobus: ignore the passed UID on EXTERNAL auth if ANONYMOUS is allowed
Lennart Poettering [Mon, 1 Apr 2013 01:24:03 +0000 (03:24 +0200)]
bus: ignore the passed UID on EXTERNAL auth if ANONYMOUS is allowed

8 years agobus: when reading a message from the socket, make sure to note down the size
Lennart Poettering [Mon, 1 Apr 2013 01:23:27 +0000 (03:23 +0200)]
bus: when reading a message from the socket, make sure to note down the size

8 years agobus: reuse sd_is_socket() call
Lennart Poettering [Sun, 31 Mar 2013 18:19:44 +0000 (20:19 +0200)]
bus: reuse sd_is_socket() call

8 years agobus: fall back to readv/writev if recvmsg/sendmsg don't work
Lennart Poettering [Sun, 31 Mar 2013 18:19:18 +0000 (20:19 +0200)]
bus: fall back to readv/writev if recvmsg/sendmsg don't work

8 years agobus: allow two different fds for input/output in sd_bus_set_fd()
Lennart Poettering [Sun, 31 Mar 2013 17:10:49 +0000 (19:10 +0200)]
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

8 years agoPartially revert e62d8c394474
Zbigniew Jędrzejewski-Szmek [Sun, 31 Mar 2013 23:50:30 +0000 (19:50 -0400)]
Partially revert e62d8c394474

The ~80 chars per line part wasn't well received.

8 years agounits/user: must be isolatable
Zbigniew Jędrzejewski-Szmek [Sun, 31 Mar 2013 23:27:49 +0000 (19:27 -0400)]
units/user: must be isolatable

Activating default unit:
Default target could not be isolated, starting instead: Operation refused, unit may not be isolated.

8 years agoactivate: do not leak envp on error
Zbigniew Jędrzejewski-Szmek [Sun, 31 Mar 2013 22:18:10 +0000 (18:18 -0400)]
activate: do not leak envp on error

8 years agojournalctl: reword error message
Zbigniew Jędrzejewski-Szmek [Mon, 25 Mar 2013 00:16:00 +0000 (20:16 -0400)]
journalctl: reword error message

Sentence seemed to suggest that all three conditions must be true.

8 years agotmpfiles: fix obscure leak in error path
Zbigniew Jędrzejewski-Szmek [Sun, 31 Mar 2013 20:29:46 +0000 (16:29 -0400)]
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.

8 years agoModernization
Zbigniew Jędrzejewski-Szmek [Sun, 24 Mar 2013 23:45:16 +0000 (19:45 -0400)]

Use _cleanup_ and wrap lines to ~80 chars and such.

8 years agostrbuf: replace quick sort with bubble sort
Zbigniew Jędrzejewski-Szmek [Sun, 31 Mar 2013 02:12:56 +0000 (22:12 -0400)]
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

8 years agostrbuf: fix leak on memory error
Zbigniew Jędrzejewski-Szmek [Sun, 31 Mar 2013 00:32:56 +0000 (20:32 -0400)]
strbuf: fix leak on memory error

Not very likely, but let's fix it for the matter of

8 years agobootchart: fix a potential buffer overrun
Zbigniew Jędrzejewski-Szmek [Sat, 30 Mar 2013 23:34:23 +0000 (19:34 -0400)]
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),
- 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

8 years agobootchart: split out option parsing from main()
Zbigniew Jędrzejewski-Szmek [Sat, 30 Mar 2013 22:43:34 +0000 (18:43 -0400)]
bootchart: split out option parsing from main()

8 years agojournald: check return value of strappend
Zbigniew Jędrzejewski-Szmek [Sat, 30 Mar 2013 21:47:48 +0000 (17:47 -0400)]
journald: check return value of strappend

8 years agobus: check return value from bus_type_get_alignment/size
Zbigniew Jędrzejewski-Szmek [Sat, 30 Mar 2013 21:34:15 +0000 (17:34 -0400)]
bus: check return value from bus_type_get_alignment/size

8 years agonspawn, machine-id-setup: warn if read-only mount call fails
Zbigniew Jędrzejewski-Szmek [Sat, 30 Mar 2013 20:33:55 +0000 (16:33 -0400)]
nspawn, machine-id-setup: warn if read-only mount call fails

They are not crucial, but they shouldn't fail.

8 years agonss-myhostname: use _cleanup_ and split function into two
Zbigniew Jędrzejewski-Szmek [Sat, 30 Mar 2013 14:46:04 +0000 (10:46 -0400)]
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.

8 years agoaccelerometer: remove dead if and modernize
Zbigniew Jędrzejewski-Szmek [Sat, 30 Mar 2013 06:22:15 +0000 (02:22 -0400)]
accelerometer: remove dead if and modernize

Based on a coverity warning.

8 years agoexecute: convert secure bits into mask properly
Zbigniew Jędrzejewski-Szmek [Sat, 30 Mar 2013 05:40:11 +0000 (01:40 -0400)]
execute: convert secure bits into mask properly


8 years agoRemove some dead code
Zbigniew Jędrzejewski-Szmek [Sat, 30 Mar 2013 05:38:36 +0000 (01:38 -0400)]
Remove some dead code

Based on coverity report.

8 years agojournal-gatewayd: query PID 1 for virtalization
Lennart Poettering [Sun, 31 Mar 2013 16:15:59 +0000 (18:15 +0200)]
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

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

8 years agobus: rename sd_bus_get_peer() to sd_bus_get_server_id()
Lennart Poettering [Sun, 31 Mar 2013 14:46:21 +0000 (16:46 +0200)]
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.

8 years agobus: s/sd_message_handler_t/sd_bus_message_handler_t/g
Lennart Poettering [Sun, 31 Mar 2013 14:26:14 +0000 (16:26 +0200)]
bus: s/sd_message_handler_t/sd_bus_message_handler_t/g

8 years agobus: parse matches locally and allow registration of callbacks for them
Lennart Poettering [Sun, 31 Mar 2013 14:16:37 +0000 (16:16 +0200)]
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.

8 years agobus: add missing test-bus-server.c
Lennart Poettering [Sat, 30 Mar 2013 14:30:23 +0000 (15:30 +0100)]
bus: add missing test-bus-server.c

8 years agobus: implement server mode, and anonymous authentication
Lennart Poettering [Sat, 30 Mar 2013 14:21:06 +0000 (15:21 +0100)]
bus: implement server mode, and anonymous authentication

8 years agoprioq: consider a NULL prioq empty
Lennart Poettering [Sat, 30 Mar 2013 14:19:53 +0000 (15:19 +0100)]
prioq: consider a NULL prioq empty

8 years agobus: if we recieve fds but fd passing is off, consider this an error
Lennart Poettering [Sat, 30 Mar 2013 14:19:22 +0000 (15:19 +0100)]
bus: if we recieve fds but fd passing is off, consider this an error

8 years agobus: enable SO_PASSCRED only if we are not connected to a bus
Lennart Poettering [Sat, 30 Mar 2013 14:18:31 +0000 (15:18 +0100)]
bus: enable SO_PASSCRED only if we are not connected to a bus

8 years agobus: properly set up bus connections with sd_bus_set_exec()
Lennart Poettering [Fri, 29 Mar 2013 22:45:00 +0000 (23:45 +0100)]
bus: properly set up bus connections with sd_bus_set_exec()

8 years agobus: consider it an error if the first message we get on the bus is not a reply to...
Lennart Poettering [Fri, 29 Mar 2013 22:44:11 +0000 (23:44 +0100)]
bus: consider it an error if the first message we get on the bus is not a reply to HELLO

8 years agobus: add C++ wrappers to public header files
Lennart Poettering [Fri, 29 Mar 2013 22:20:32 +0000 (23:20 +0100)]
bus: add C++ wrappers to public header files

8 years agodbus: let's make this const array static
Lennart Poettering [Fri, 29 Mar 2013 22:14:58 +0000 (23:14 +0100)]
dbus: let's make this const array static

8 years agoudev: extern on functions is pointless
Lennart Poettering [Fri, 29 Mar 2013 22:10:59 +0000 (23:10 +0100)]
udev: extern on functions is pointless

8 years agounit: no need to export variables if we can avoid it
Lennart Poettering [Fri, 29 Mar 2013 21:59:35 +0000 (22:59 +0100)]
unit: no need to export variables if we can avoid it

8 years agoTODO
Lennart Poettering [Fri, 29 Mar 2013 21:45:57 +0000 (22:45 +0100)]

8 years agogitignore: update
Kay Sievers [Sat, 30 Mar 2013 14:06:51 +0000 (15:06 +0100)]
gitignore: update

8 years agoTODO: update
Kay Sievers [Sat, 30 Mar 2013 14:03:09 +0000 (15:03 +0100)]
TODO: update

8 years agokillall: print notice what we forcefully KILL
Kay Sievers [Thu, 28 Mar 2013 22:00:32 +0000 (23:00 +0100)]
killall: print notice what we forcefully KILL

8 years agobuild-sys: force Python to write UTF-8
Kelly Anderson [Fri, 29 Mar 2013 23:23:35 +0000 (19:23 -0400)]
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.

8 years agobuild-sys,man: use XML entities to substite strings
Zbigniew Jędrzejewski-Szmek [Fri, 29 Mar 2013 18:22:27 +0000 (14:22 -0400)]
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.

8 years agobuild-sys: generate sed substitution from a list
Zbigniew Jędrzejewski-Szmek [Fri, 29 Mar 2013 17:59:51 +0000 (13:59 -0400)]
build-sys: generate sed substitution from a list

I want to use the substitutions in different form for
xml entities.

8 years agoRevert "build-sys: substitute strings in systemd.unit(5)"
Zbigniew Jędrzejewski-Szmek [Fri, 29 Mar 2013 17:09:52 +0000 (13:09 -0400)]
Revert "build-sys: substitute strings in systemd.unit(5)"

This reverts commits c78ab91132aab9193f3c17a9a206f8825ff4be84
and 185c3be03cec26023acc11b49553753aa7330a1d.

It is simpler to just use includes...

8 years agotest-path-util: fix another stupid test failure
Zbigniew Jędrzejewski-Szmek [Sat, 30 Mar 2013 00:26:47 +0000 (20:26 -0400)]
test-path-util: fix another stupid test failure

8 years agounits: fix fields
Lennart Poettering [Fri, 29 Mar 2013 17:28:58 +0000 (18:28 +0100)]
units: fix fields

8 years agoupdate TODO
Lennart Poettering [Fri, 29 Mar 2013 17:28:43 +0000 (18:28 +0100)]
update TODO

8 years agotest-path-util: fix botched test
Zbigniew Jędrzejewski-Szmek [Fri, 29 Mar 2013 14:45:05 +0000 (10:45 -0400)]
test-path-util: fix botched test

8 years agobootctl: fix help text
Koen Kooi [Fri, 29 Mar 2013 08:10:31 +0000 (09:10 +0100)]
bootctl: fix help text

It currently says 'time settings', change that to 'boot settings'.

8 years agoutmp: make gcc shut up, we need to pass an int here, not size_t
Lennart Poettering [Fri, 29 Mar 2013 14:47:18 +0000 (15:47 +0100)]
utmp: make gcc shut up, we need to pass an int here, not size_t

8 years agocgtop --help: default depth is 3 not 2
Maksim Melnikau [Fri, 29 Mar 2013 12:55:50 +0000 (15:55 +0300)]
cgtop --help: default depth is 3 not 2

use default depth from variable for --help

8 years agoAlways use errno > 0 to help gcc
Zbigniew Jędrzejewski-Szmek [Thu, 28 Mar 2013 13:24:15 +0000 (09:24 -0400)]
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.

8 years agojournalctl: fix --update-catalog with not --root arg
Zbigniew Jędrzejewski-Szmek [Fri, 29 Mar 2013 14:09:21 +0000 (10:09 -0400)]
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"

8 years agotests: add some silly tests for path-util.c
Zbigniew Jędrzejewski-Szmek [Fri, 29 Mar 2013 02:03:53 +0000 (22:03 -0400)]
tests: add some silly tests for path-util.c

8 years agojournalctl: support --root for message catalogs
Zbigniew Jędrzejewski-Szmek [Fri, 29 Mar 2013 01:44:00 +0000 (21:44 -0400)]
journalctl: support --root for message catalogs

8 years agocatalog: open up catalog internals
Zbigniew Jędrzejewski-Szmek [Fri, 29 Mar 2013 00:17:24 +0000 (20:17 -0400)]
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

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.

8 years agocatalog: make sure strings are terminated
Zbigniew Jędrzejewski-Szmek [Thu, 28 Mar 2013 03:16:32 +0000 (23:16 -0400)]
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.

8 years agoudev: check return value of uname.
Václav Pavlín [Wed, 27 Mar 2013 14:16:36 +0000 (15:16 +0100)]
udev: check return value of uname.

8 years agobootchart: properly terminate string
Zbigniew Jędrzejewski-Szmek [Fri, 29 Mar 2013 03:41:07 +0000 (23:41 -0400)]
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

...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.

8 years agoutmp-wtmp: don't try to read past end of string
Zbigniew Jędrzejewski-Szmek [Fri, 29 Mar 2013 03:19:19 +0000 (23:19 -0400)]
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

The destination string is unterminated on purpose, but we must
remember that.

8 years agobuild-sys: remove papersize option from sphinx
Zbigniew Jędrzejewski-Szmek [Fri, 29 Mar 2013 02:54:22 +0000 (22:54 -0400)]
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.

8 years agocoredump: do not free twice v200
Zbigniew Jędrzejewski-Szmek [Fri, 29 Mar 2013 02:09:28 +0000 (22:09 -0400)]
coredump: do not free twice

8 years agobuild-sys: prepare release 200
Lennart Poettering [Thu, 28 Mar 2013 20:31:55 +0000 (21:31 +0100)]
build-sys: prepare release 200

8 years agounit: replace by
Lennart Poettering [Thu, 28 Mar 2013 20:18:58 +0000 (21:18 +0100)]
unit: replace by

8 years agohwdb: update
Kay Sievers [Thu, 28 Mar 2013 20:53:30 +0000 (21:53 +0100)]
hwdb: update

8 years agobuild-sys: fix HAVE/ENABLE_FIRMWARE
Kay Sievers [Thu, 28 Mar 2013 14:28:10 +0000 (15:28 +0100)]

8 years agobootctl: ESP --> Partition
Kay Sievers [Thu, 28 Mar 2013 10:42:32 +0000 (11:42 +0100)]
bootctl: ESP --> Partition

8 years agobootctl: Binary: --> File:
Kay Sievers [Thu, 28 Mar 2013 02:42:39 +0000 (03:42 +0100)]
bootctl: Binary: --> File:

8 years agoman/os-release: Add BUILD_ID field
William Douglas [Mon, 25 Mar 2013 21:07:49 +0000 (14:07 -0700)]
man/os-release: Add BUILD_ID field

BUILD_ID is a fairly generic field used to identify the system image
that was used to install the distribution.

8 years agocatalog: fix error codes handling in catalog_list_items
Lukas Nykryn [Wed, 27 Mar 2013 16:35:55 +0000 (17:35 +0100)]
catalog: fix error codes handling in catalog_list_items

Previously r was set to zero and so if(r<0) was never true.

8 years agolog: fix error codes handling in catalog_list_items
Lukas Nykryn [Wed, 27 Mar 2013 09:44:21 +0000 (10:44 +0100)]
log: fix error codes handling in catalog_list_items

It does not make sense to print error code from previous loop.

8 years agosd-bus: check c->path for null instead of path
Lukas Nykryn [Wed, 27 Mar 2013 09:44:20 +0000 (10:44 +0100)]
sd-bus: check c->path for null instead of path

8 years agosystemd-sysctl: Handle missing /etc/sysctl.conf properly
Eelco Dolstra [Wed, 27 Mar 2013 12:41:59 +0000 (13:41 +0100)]
systemd-sysctl: Handle missing /etc/sysctl.conf properly

Since fabe5c0e5fce730aa66e10a9c4f9fdd443d7aeda, systemd-sysctl returns
a non-zero exit code if /etc/sysctl.conf does not exist, due to a
broken ENOENT check.

8 years agoshared: free dt (temporary dir name) on fail
Václav Pavlín [Wed, 27 Mar 2013 14:16:37 +0000 (15:16 +0100)]
shared: free dt (temporary dir name) on fail

[zj: modified to not to try to rmdir() dir we haven't created.]

8 years agocore: check return value of rm_rf_dangerous and warn if it fails
Václav Pavlín [Wed, 27 Mar 2013 14:16:35 +0000 (15:16 +0100)]
core: check return value of rm_rf_dangerous and warn if it fails

8 years agobootctl: rename status output header
Kay Sievers [Wed, 27 Mar 2013 03:26:12 +0000 (04:26 +0100)]
bootctl: rename status output header

8 years agokeymap: Fix Touchpad Toggle on MSI Wind U90/U100
Martin Pitt [Wed, 27 Mar 2013 07:15:12 +0000 (08:15 +0100)]
keymap: Fix Touchpad Toggle on MSI Wind U90/U100

This key is handled by the hardware already, so handling it again in software
nullifies the effect. Newer kernels read the real state and send out a separate
KEY_TOUCHPAD_ON or KEY_TOUCHPAD_OFF event, so in both cases we need to ignore
that key.

8 years agotests: skip bus test if bus cannot be opened
Zbigniew Jędrzejewski-Szmek [Wed, 27 Mar 2013 01:07:46 +0000 (21:07 -0400)]
tests: skip bus test if bus cannot be opened

To make the result more visible, special return value
is used to tell automake that the test was skipped. While
at it, use the same return value in other skipped tests.

8 years agotests: fix size_t in format string
Zbigniew Jędrzejewski-Szmek [Wed, 27 Mar 2013 03:47:25 +0000 (23:47 -0400)]
tests: fix size_t in format string

8 years agoSimplify the meaning of %s
Zbigniew Jędrzejewski-Szmek [Tue, 26 Mar 2013 23:37:14 +0000 (19:37 -0400)]
Simplify the meaning of %s

The rules governing %s where just too complicated. First of
all, looking at $SHELL is dangerous. For systemd --system,
it usually wouldn't be set. But it could be set if the admin
first started a debug shell, let's say /sbin/sash, and then
launched systemd from it. This shouldn't influence how daemons
are started later on, so is better ignored. Similar reasoning
holds for session mode. Some shells set $SHELL, while other
set it only when it wasn't set previously (e.g. zsh). This
results in fragility that is better avoided by ignoring $SHELL

With $SHELL out of the way, simplify things by saying that
%s==/bin/sh for root, and the configured shell otherwise.
get_shell() is the only caller, so it can be inlined.

Fixes one issue seen with 'make check'.