1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-04 21:47:31 +03:00

10944 Commits

Author SHA1 Message Date
Lennart Poettering
335b5240ae unit: never retroactively start requisites
Requesites are not supposed to be auto-started afterall, they are just
checks, so don't try to be smarter here than appropriate.

Based on a patch from Michal Schmidt.
2013-03-23 03:16:17 +01:00
Lennart Poettering
0debd2bf2f Revert "units: ignore systemd-sysctl on shutdown"
This reverts commit faeffa73a81ab5b59acfadeb571431fb0e42af70.

There isn't really much point in dropping the Conflicts= since shutting
down this service is basically free as it doesn't have anything running.

Also, the patch was incomplete, because shutdown.target was still listed
in Before=.
2013-03-23 03:10:41 +01:00
Cristian Rodríguez
4ad61fd180 add --with-telinit=PATH configure option
Distributions that never shipped upstart do not have
"telinit" in /lib/upstart/..

Defaults to /lib/upstart/telinit so there is no change
for systems existing installs.
2013-03-23 01:44:56 +01:00
Lennart Poettering
3ac251b81a journalctl: various fixes to the access check logic
- Reword messages a bit

- Correct check whether EACCES is in the set of errors

- Don't complain if no journal files are found

- allocate Set object for errors lazily since in the best case we don't
  need it at all.

- don't consider it an error if /run/log/journal doesn't exist (because
  that's the usual case actually, if storage is enabled)
2013-03-23 01:12:22 +01:00
Colin Walters
a5a5ade34c dbus: Do send out "replies" to signals
Some parts of systemd (at least the DBus activation codepath) "reply"
to signals, which of course have the no-reply flag set.  We will be
defensive here and still send out a reply if we're passed a signal.

Regression introduced by: c6a818c82035da91e

Reported-by: Mantas Mikulėnas <grawity@gmail.com>
Tested-by: Mantas Mikulėnas <grawity@gmail.com>
2013-03-22 23:37:11 +01:00
Lennart Poettering
356ce9915a update TODO 2013-03-22 23:28:44 +01:00
Lennart Poettering
d91c34f21f exec: Assigning the empty string to CapabilityBoundSet= should drop all caps
Previously, it would set all caps, but it should drop them all, anything
else makes little sense.

Also, document that this works as it does, and what to do in order to
assign all caps to the bounding set.

https://bugzilla.redhat.com/show_bug.cgi?id=914705
2013-03-22 23:28:44 +01:00
Tollef Fog Heen
6af274272a Drop trailing whitespace 2013-03-22 22:51:52 +01:00
Lennart Poettering
86e7b6e3f6 timedated: extra overflow safety check when doing relative time changes
Ensure clients don't overflow usec_t when doing relative time changes.
This is mostly just paranoia and protection against accidents, after all
clients are already authenticated, and they can se the time to any
value they wish anyway, but better be safe than sorry.

https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1152187/comments/14
2013-03-22 21:38:49 +01:00
Lennart Poettering
bfa00bc6c0 update TODO 2013-03-22 21:18:10 +01:00
Lennart Poettering
1a5613266a timedatectl: show CanNTP field 2013-03-22 21:18:10 +01:00
Lennart Poettering
2852ae2134 udev: no need to output OOM, if we call log_oom() anyway 2013-03-22 21:05:42 +01:00
Lennart Poettering
ab4224458b main: minor simplification 2013-03-22 21:04:28 +01:00
Zbigniew Jędrzejewski-Szmek
7d56679902 udev/collect: avoid initalizing memory twice 2013-03-22 15:40:37 -04:00
Zbigniew Jędrzejewski-Szmek
48deb058b6 util: workaround two gcc warnings
gcc does not know that errno cannot be negative, and warns
about unitialized variables later on. Kill the warnings by
returning -errno only after checking that errno is positive.
2013-03-22 15:40:37 -04:00
Zbigniew Jędrzejewski-Szmek
6fe391c56d journalctl: be smarter about journal error checks
There are many ways in which we can get those checks wrong, so it is
better to warn and then error out on a real access failure.

The error messages are wrapped to <80 lines, because their primary
use is to be displayed in the terminal, and it is easier to read them
this way. Reading them in the journal can be a bit trickier, but
this is a bug in logs-show.c.
2013-03-22 15:31:45 -04:00
Zbigniew Jędrzejewski-Szmek
478c82693c build-sys: move acl searching code into libsystemd-acl
This loop over acls is a bit too much to keep inside
of another loop.
2013-03-22 15:31:45 -04:00
Lennart Poettering
737732a41e hostnamed: pretty_string_is_safe() already exists in string_has_cc(), so use that 2013-03-22 18:01:26 +01:00
Lennart Poettering
aa3c5cf8ee util: be more picky when validating hostnames
No longer allow dots at the beginning or end of host names, Or double
dots.

https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1152187/comments/14
2013-03-22 17:59:49 +01:00
Lennart Poettering
4468addca6 journalctl: give a nice hint about group membership based on ACLs of /var/log/journal
If we notice that we unprivileged and not in any of the groups which
have access to /var/log/journal, print a nice message about which groups
do.

This checks and prints all groups that are in the default ACL for
/var/log/journal, which is not necessarily correct for all journal
files, but pretty close.
2013-03-22 17:44:19 +01:00
Lennart Poettering
8e70580bb0 cgroup: minor optimization 2013-03-22 15:46:49 +01:00
Lennart Poettering
a652755d2e bus: implement object handler registry 2013-03-22 15:46:49 +01:00
Lennart Poettering
3cbb76ee34 mount: mount all cgroup controllers in containers, too 2013-03-22 04:43:28 +01:00
Lennart Poettering
db813c2a91 main: use strv_find() where we can 2013-03-22 04:43:28 +01:00
Lennart Poettering
e2b1eb2661 main: don't mount cgroup controller unless PID == 1
This completes c1dae1b3c9729fb8ab749dd4e2dad07e0fad7ed8 in a way.
2013-03-22 04:43:27 +01:00
Jan Alexander Steffens (heftig)
6c142648aa Fix vacuum logic error
The vacuum code used to stop vacuuming after one deletion, even
when max_use was still exceeded.

Also make usage a uint64_t, as the code already pretends it is one.

Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
2013-03-21 23:24:38 -04:00
Zbigniew Jędrzejewski-Szmek
72536eb736 man/shutdown: /etc/nologin is called /run/nologin now 2013-03-21 23:05:09 -04:00
Zbigniew Jędrzejewski-Szmek
811de196b3 systemd-python: allow retrieval of single fields
This can give huge efficiency gains, e.g. if only MESSAGE
is required and all other fields can be ignored.
2013-03-21 23:05:09 -04:00
Zbigniew Jędrzejewski-Szmek
5e8ba1a460 systemd-python: split out realtime and monotonic into separate functions
This matches the C API more closely, and also enables the
user to get just partial information, should she desire to
do so.

Functions names in error messages are modified to not include
the class name, because Python uses just the function name
into functions declared as METH_NOARGS, and error messages
were inconsistent.
2013-03-21 23:05:08 -04:00
Zbigniew Jędrzejewski-Szmek
1cdcd71be0 systemd-python: implement _Reader.test_cursor
Getting the cursor is split out from .get_next() into
.get_cursor(). This mirrors the C API more closely, and
also makes things a bit faster if the cursor is not needed.
2013-03-21 22:39:24 -04:00
Zbigniew Jędrzejewski-Szmek
806bc1cb61 systemd-python: cleanup up usec_t handling
The behaviour wrt. seconds vs. microseconds was inconsistent.
Now _Reader always uses native units (us), while Reader always
uses seconds and accepts both floats and ints. This way the
conversion is always done in the Python layer, and the lower
level API allows access to the journal API without the potentially
lossy conversion between double and uint64_t.
2013-03-21 22:39:24 -04:00
Zbigniew Jędrzejewski-Szmek
50a279f857 systemd-python: export sd_journal_get_usage 2013-03-21 22:39:24 -04:00
Zbigniew Jędrzejewski-Szmek
742af54adc efivars: fix return code
Was returning 1 on read error.
2013-03-21 22:39:24 -04:00
Zbigniew Jędrzejewski-Szmek
7a4b2eab6d shutdownd: shut up bogus gcc warning
This one is fake. But let's kill it, avoiding two condition checks
in the process.

src/shutdownd/shutdownd.c: In function 'when_wall':
src/shutdownd/shutdownd.c:182:44: warning: 'sub' may be used uninitialized in this function [-Wmaybe-uninitialized]
         return elapse > sub ? elapse - sub : 1;
                                            ^
2013-03-21 22:39:23 -04:00
Zbigniew Jędrzejewski-Szmek
40c2cce772 bootchart: fix two unitialized memory frees
The new gcc isn't bad!

In file included from src/bootchart/svg.c:36:0:
src/bootchart/svg.c: In function 'svg_ps_bars':
./src/shared/util.h:524:13: warning: 'enc_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
         free(*(void**) p);
             ^
src/bootchart/svg.c:821:37: note: 'enc_name' was declared here
                 char _cleanup_free_*enc_name;
                                     ^
  CC     src/udev/mtd_probe/mtd_probe-probe_smartmedia.o
  XSLT     man/systemd.unit.5
In file included from src/bootchart/svg.c:36:0:
src/bootchart/svg.c: In function 'svg_pss_graph':
./src/shared/util.h:524:13: warning: 'enc_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
         free(*(void**) p);
             ^
src/bootchart/svg.c:395:37: note: 'enc_name' was declared here
                 char _cleanup_free_*enc_name;
                                     ^
2013-03-21 22:39:23 -04:00
Zbigniew Jędrzejewski-Szmek
3143987f93 initctl: fix return from unitialized memory in error path
src/initctl/initctl.c: In function 'server_init':
src/initctl/initctl.c:282:13: warning: 'r' may be used uninitialized in this function [-Wmaybe-uninitialized]
         int r;
             ^
2013-03-21 22:39:23 -04:00
Zbigniew Jędrzejewski-Szmek
7cb2086695 build-sys: use _FORTIFY_SOURCE with new gcc level -Og 2013-03-21 22:39:23 -04:00
Lennart Poettering
2571ead1a6 bus: implicitly collect ucred/label information 2013-03-22 03:37:10 +01:00
Lennart Poettering
20902f3ec8 bus: also finish connection before returning from sd_bus_get_unique_name() 2013-03-22 03:37:10 +01:00
Lennart Poettering
ed205a6bc5 bus: when parsing enforce maximum container depth 2013-03-22 02:32:34 +01:00
Lennart Poettering
2bf938c191 bus: fix uninitialized variable 2013-03-22 02:20:39 +01:00
Lennart Poettering
dafb75912a bus: validate the hello response properly 2013-03-22 02:20:21 +01:00
Lennart Poettering
813a4f9375 bus: properly verify recursion depth of signatures 2013-03-22 02:19:49 +01:00
Lennart Poettering
d728d708c3 bus: rework synchronization logic
Instead of allowing certain actions fail during authentication and
connection setup, implicitly synchronize on the connection to be set up
completely before returning.
2013-03-22 01:49:56 +01:00
Lennart Poettering
9f26c90cb5 bus: reuse more code 2013-03-22 01:49:13 +01:00
Lennart Poettering
6693860fab bus: validate the entire header more closely 2013-03-22 01:15:20 +01:00
Lennart Poettering
ac89bf1d53 bus: properly validate object path values 2013-03-22 00:42:53 +01:00
Lennart Poettering
b8beb27816 bus: generate a nice error when attempting to add a NULL string 2013-03-22 00:24:21 +01:00
Lennart Poettering
b9bf7e2be9 bus: implicitly handle peer commands Ping() and GetMachineId() 2013-03-22 00:12:37 +01:00
Lennart Poettering
2522023999 bus: enforce limits on all client influenced data objects 2013-03-22 00:12:37 +01:00