1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00
Commit Graph

10871 Commits

Author SHA1 Message Date
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 c1dae1b3c9 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
Lennart Poettering
29f6aadd53 bus: implicitly set no_reply flag on outgoing messages if the serial number is not kept
If nobody keeps the serial number of an outgoing message we know that
nobody expects an answer to it, so set the no_reply flag accordingly.
2013-03-22 00:12:37 +01:00
Kay Sievers
9a8ae49d91 udev: always set selinux label at "add" events
https://bugs.freedesktop.org/show_bug.cgi?id=62615
2013-03-21 23:13:17 +01:00
Lennart Poettering
e3017af973 bus: implement full method call timeout logic 2013-03-21 22:53:29 +01:00
Kay Sievers
43b4c9aaf5 hwdb: update 2013-03-21 22:17:13 +01:00
Kay Sievers
f5944e0fd6 MAkefile.am: whitespace cleanup 2013-03-21 22:16:55 +01:00
Kay Sievers
bff9cfcc5c doc: disable gtk-doc test again - you are a really annoying piece of software
make  check-TESTS
make[5]: Nothing to be done for `/usr/bin/gtkdoc-check.log'.
fatal: making test-suite.log: failed to create /usr/bin/gtkdoc-check.trs
fatal: making test-suite.log: failed to create /usr/bin/gtkdoc-check.log
make[4]: *** [test-suite.log] Error 1
make[3]: *** [check-TESTS] Error 2
make[2]: *** [check-am] Error 2
make[1]: *** [check-recursive] Error 1
make: *** [check] Error 2
2013-03-21 15:07:54 +01:00
Michael Biebl
b588b3c456 build-sys: include missing header in dist tarball 2013-03-21 11:05:43 +01:00
Lennart Poettering
30bdd69525 shared: add simple priority queue implementation 2013-03-21 02:54:47 +01:00
Dave Reisner
11ea5a4a7f bus: compare to negative errno 2013-03-20 19:25:37 -04:00
Zbigniew Jędrzejewski-Szmek
23ea3dab15 activate: avoid warning from -Wshadow
src/activate/activate.c:167:51: warning: declaration shadows a variable in the global scope [-Wshadow]
static int launch(char* name, char **argv, char **environ, int fds) {
                                                  ^
/usr/include/unistd.h:546:15: note: previous declaration is here
extern char **environ;
              ^
2013-03-20 19:16:01 -04:00
Zbigniew Jędrzejewski-Szmek
131c01dbe9 Make two functions static 2013-03-20 19:16:01 -04:00
Zbigniew Jędrzejewski-Szmek
4750fade13 Remove some unused variables 2013-03-20 19:16:01 -04:00
Zbigniew Jędrzejewski-Szmek
fd4a5ec6fa systemd-analyze: do not format timestamp when not printing it
../src/analyze/systemd-analyze.c:530:88: warning: data argument not used by format string [-Wformat-extra-args]
  ...svg_text(false, u->ixt, y, u->time? "%s (%s)" : "%s", u->name, format_timespan(ts, sizeof(ts), u->time));
                                                     ~~~~           ^
2013-03-20 19:16:01 -04:00
Zbigniew Jędrzejewski-Szmek
d5a3f0eac7 core: remove unnecessary goto in setup_namespace 2013-03-20 19:16:01 -04:00
Tom Gundersen
c66a2e0cf9 bus-message: fix typo 2013-03-21 00:01:14 +01:00
Lennart Poettering
09f727eebd update TODO 2013-03-20 23:00:29 +01:00
Lennart Poettering
89ffcd2ad5 bus: hook up client with socket communication 2013-03-20 23:00:10 +01:00
Lennart Poettering
fbfa72b0a1 bus: introduce bus_error_is_dirty() independently of sd_bus_error_is_set() 2013-03-20 23:00:10 +01:00
Lennart Poettering
80a46c7313 bus: demarshal header fields properly 2013-03-20 23:00:10 +01:00
Lennart Poettering
9a17484d98 bus: implement demarshaller 2013-03-20 23:00:09 +01:00
Lennart Poettering
5407f2dea3 bus: suppress reply messages to method calls with no_reply set 2013-03-20 23:00:09 +01:00
Lennart Poettering
de1c301ed1 bus: add basic implementation of a native bus client library 2013-03-20 23:00:09 +01:00
Lennart Poettering
76f0199f2c stdio-bridge: modernization 2013-03-20 23:00:09 +01:00