summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/runit/runit/0003-utmpset.c-mixes-int32_t-and-time_t.diff
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-05-27 15:39:44 -0700
committerKhem Raj <raj.khem@gmail.com>2020-06-23 15:26:37 -0700
commit9217ed1446b5c409f68274517b5e0ae5acab4ec5 (patch)
tree00386c336064e6a2015caad435ebe7896684403b /meta/recipes-core/runit/runit/0003-utmpset.c-mixes-int32_t-and-time_t.diff
parent5e61ce4e2f78009accc5e329cf5264698b97e592 (diff)
downloadopenembedded-core-contrib-9217ed1446b5c409f68274517b5e0ae5acab4ec5.tar.gz
runit: Add runit and related recipes
* Another init system, very small in size with application life cycle management * Add runit-services recipe for additional runit services from void linux * socklog is a system/kernel logger * Add socklog-services to provide additional logging services * disable the chkshsgr tests in socklog Running the chkhsgr test during cross compile fails ./chkshsgr || ( cat warn-shsgr; exit 1 ) Oops. Your getgroups() returned 0, and setgroups() failed; this means that I can't reliably do my shsgr test. Please either ``make'' as root or ``make'' while you're in one or more supplementary groups. All OE based targets have working getgroups()/setgroups() implementation, so its a safe assumption and therefore make the test to be a dummy Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta/recipes-core/runit/runit/0003-utmpset.c-mixes-int32_t-and-time_t.diff')
-rw-r--r--meta/recipes-core/runit/runit/0003-utmpset.c-mixes-int32_t-and-time_t.diff57
1 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-core/runit/runit/0003-utmpset.c-mixes-int32_t-and-time_t.diff b/meta/recipes-core/runit/runit/0003-utmpset.c-mixes-int32_t-and-time_t.diff
new file mode 100644
index 0000000000..6b21bbb40e
--- /dev/null
+++ b/meta/recipes-core/runit/runit/0003-utmpset.c-mixes-int32_t-and-time_t.diff
@@ -0,0 +1,57 @@
+From 20a0afcd367666efc17c59cf121a0d991ff1bd09 Mon Sep 17 00:00:00 2001
+From: Gerrit Pape <pape@smarden.org>
+Date: Thu, 31 Jul 2014 12:25:49 +0000
+Subject: [PATCH] utmpset.c: mixes "int32_t *" and "time_t *"
+
+Don't pass int32_t to time(), thx Lorenzo Beretta,
+https://bugs.debian.org/754849
+---
+ runit-2.1.2/src/utmpset.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/runit-2.1.2/src/utmpset.c b/runit-2.1.2/src/utmpset.c
+index eea41a5..2e8a525 100644
+--- a/runit-2.1.2/src/utmpset.c
++++ b/runit-2.1.2/src/utmpset.c
+@@ -24,6 +24,7 @@ void usage(void) { strerr_die4x(1, "usage: ", progname, USAGE, "\n"); }
+ int utmp_logout(const char *line) {
+ int fd;
+ uw_tmp ut;
++ time_t t;
+ int ok =-1;
+
+ if ((fd =open(UW_TMP_UFILE, O_RDWR, 0)) < 0)
+@@ -35,7 +36,8 @@ int utmp_logout(const char *line) {
+ if (!ut.ut_name[0] || (str_diff(ut.ut_line, line) != 0)) continue;
+ memset(ut.ut_name, 0, sizeof ut.ut_name);
+ memset(ut.ut_host, 0, sizeof ut.ut_host);
+- if (time(&ut.ut_time) == -1) break;
++ if (time(&t) == -1) break;
++ ut.ut_time = t;
+ #ifdef DEAD_PROCESS
+ ut.ut_type =DEAD_PROCESS;
+ #endif
+@@ -52,6 +54,7 @@ int wtmp_logout(const char *line) {
+ int len;
+ struct stat st;
+ uw_tmp ut;
++ time_t t;
+
+ if ((fd = open_append(UW_TMP_WFILE)) == -1)
+ strerr_die4sys(111, FATAL, "unable to open ", UW_TMP_WFILE, ": ");
+@@ -65,10 +68,11 @@ int wtmp_logout(const char *line) {
+ memset(&ut, 0, sizeof(uw_tmp));
+ if ((len =str_len(line)) > sizeof ut.ut_line) len =sizeof ut.ut_line -2;
+ byte_copy(ut.ut_line, len, line);
+- if (time(&ut.ut_time) == -1) {
++ if (time(&t) == -1) {
+ close(fd);
+ return(-1);
+ }
++ ut.ut_time = t;
+ #ifdef DEAD_PROCESS
+ ut.ut_type =DEAD_PROCESS;
+ #endif
+--
+2.0.1
+