[systemd-commits] 3 commits - TODO src/core src/journal src/shared

Lennart Poettering lennart at kemper.freedesktop.org
Tue Feb 3 09:17:15 PST 2015


 TODO                          |    3 +++
 src/core/main.c               |   12 ++++++------
 src/journal/journald-kmsg.c   |    2 +-
 src/journal/journald-syslog.c |    2 +-
 src/shared/time-util.h        |    2 +-
 5 files changed, 12 insertions(+), 9 deletions(-)

New commits:
commit 3b97fcbd28f92a1e51887fef5de8844a89bde523
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Feb 3 18:17:00 2015 +0100

    journald: fix some xsprrintf() buffer size fallout

diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
index 0b02eff..c4216c4 100644
--- a/src/journal/journald-kmsg.c
+++ b/src/journal/journald-kmsg.c
@@ -40,7 +40,7 @@ void server_forward_kmsg(
         const struct ucred *ucred) {
 
         struct iovec iovec[5];
-        char header_priority[4],
+        char header_priority[DECIMAL_STR_MAX(priority) + 3],
              header_pid[sizeof("[]: ")-1 + DECIMAL_STR_MAX(pid_t) + 1];
         int n = 0;
         char *ident_buf = NULL;
diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c
index 355f6e6..7d545ca 100644
--- a/src/journal/journald-syslog.c
+++ b/src/journal/journald-syslog.c
@@ -124,7 +124,7 @@ static void forward_syslog_raw(Server *s, int priority, const char *buffer, cons
 
 void server_forward_syslog(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred, const struct timeval *tv) {
         struct iovec iovec[5];
-        char header_priority[4], header_time[64],
+        char header_priority[DECIMAL_STR_MAX(priority) + 3], header_time[64],
              header_pid[sizeof("[]: ")-1 + DECIMAL_STR_MAX(pid_t) + 1];
         int n = 0;
         time_t t;

commit 86caf09519c702f38552ba4f789b55a562fc29c5
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Feb 3 18:16:35 2015 +0100

    core: use some nice macros where appropriate

diff --git a/src/core/main.c b/src/core/main.c
index 02b7c37..0480bc8 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1217,11 +1217,11 @@ int main(int argc, char *argv[]) {
         FDSet *fds = NULL;
         bool reexecute = false;
         const char *shutdown_verb = NULL;
-        dual_timestamp initrd_timestamp = { 0ULL, 0ULL };
-        dual_timestamp userspace_timestamp = { 0ULL, 0ULL };
-        dual_timestamp kernel_timestamp = { 0ULL, 0ULL };
-        dual_timestamp security_start_timestamp = { 0ULL, 0ULL };
-        dual_timestamp security_finish_timestamp = { 0ULL, 0ULL };
+        dual_timestamp initrd_timestamp = DUAL_TIMESTAMP_NULL;
+        dual_timestamp userspace_timestamp = DUAL_TIMESTAMP_NULL;
+        dual_timestamp kernel_timestamp = DUAL_TIMESTAMP_NULL;
+        dual_timestamp security_start_timestamp = DUAL_TIMESTAMP_NULL;
+        dual_timestamp security_finish_timestamp = DUAL_TIMESTAMP_NULL;
         static char systemd[] = "systemd";
         bool skip_setup = false;
         unsigned j;
@@ -1230,7 +1230,7 @@ int main(int argc, char *argv[]) {
         bool queue_default_job = false;
         bool empty_etc = false;
         char *switch_root_dir = NULL, *switch_root_init = NULL;
-        static struct rlimit saved_rlimit_nofile = { 0, 0 };
+        struct rlimit saved_rlimit_nofile = RLIMIT_MAKE_CONST(0);
         const char *error_message = NULL;
 
 #ifdef HAVE_SYSV_COMPAT
diff --git a/src/shared/time-util.h b/src/shared/time-util.h
index fbfbcbf..fca8a4d 100644
--- a/src/shared/time-util.h
+++ b/src/shared/time-util.h
@@ -67,7 +67,7 @@ typedef struct dual_timestamp {
 
 #define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1)
 
-#define DUAL_TIMESTAMP_NULL ((struct dual_timestamp) { 0, 0 })
+#define DUAL_TIMESTAMP_NULL ((struct dual_timestamp) { 0ULL, 0ULL })
 
 usec_t now(clockid_t clock);
 

commit c05482281c32bd408808b14c5fb03e706e65602d
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Feb 3 18:16:17 2015 +0100

    update TODO

diff --git a/TODO b/TODO
index 68727f8..415efee 100644
--- a/TODO
+++ b/TODO
@@ -34,6 +34,9 @@ External:
 
 Features:
 
+* Introduce $LISTEN_NAMES to complement $LISTEN_FDS, containing a
+  colon separated list of identifiers for the fds passed.
+
 * networkd: implement BindCarrier= logic to .network units that binds
   application of the file to the carrier sense on another interface,
   in order to implement uplink/downlink logic.



More information about the systemd-commits mailing list