From db0688fd73cd036bcc2e29d967382d5ad1111a47b703a9b193d787869fcd83ac Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Wed, 13 Oct 2010 22:45:58 +0000 Subject: [PATCH] checked in (request 50409) OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=77 --- showconsole-1.12.dif | 51 ---------------------------------------- startpar-0.57.dif | 55 ++++++++++---------------------------------- sysvinit.changes | 5 ---- 3 files changed, 12 insertions(+), 99 deletions(-) diff --git a/showconsole-1.12.dif b/showconsole-1.12.dif index b9e20af..8fc4656 100644 --- a/showconsole-1.12.dif +++ b/showconsole-1.12.dif @@ -56,54 +56,3 @@ close(c->fd); c->fd = -1; } ---- libblogger.c -+++ libblogger.c 2010-10-12 16:12:20.743926028 +0000 -@@ -54,7 +54,7 @@ static int bootlog_init(const int lvl __ - if (!S_ISFIFO(st.st_mode)) - goto out; - -- if ((fdfifo = open(fifo_name, O_WRONLY|O_NONBLOCK)) < 0) -+ if ((fdfifo = open(fifo_name, O_WRONLY|O_NONBLOCK|O_NOCTTY|O_CLOEXEC)) < 0) - goto out; - - ret = 0; ---- libconsole.c -+++ libconsole.c 2010-10-12 16:20:05.187926537 +0000 -@@ -770,7 +770,7 @@ void prepareIO(void (*rfunc)(int), void - (void)mkfifo(fifo_name, 0600); - errno = 0; - if (!stat(fifo_name, &st) && S_ISFIFO(st.st_mode)) { -- if ((fdfifo = open(fifo_name, O_RDWR|O_NOCTTY)) < 0) -+ if ((fdfifo = open(fifo_name, O_RDONLY|O_NOCTTY|O_CLOEXEC)) < 0) - warn("can not open named fifo %s: %s\n", fifo_name, strerror(errno)); - } - } -@@ -788,7 +788,7 @@ static void more_input (struct timeval * - FD_ZERO (&watch); - FD_SET (fdread, &watch); - -- if (fdfifo > 0) { -+ if (fdfifo >= 0) { - FD_SET (fdfifo, &watch); - wfds = (fdread > fdfifo ? fdread : fdfifo) + 1; - } else -@@ -836,7 +836,7 @@ static void more_input (struct timeval * - } - } - -- if (fdfifo > 0 && FD_ISSET(fdfifo, &watch)) { -+ if (fdfifo >= 0 && FD_ISSET(fdfifo, &watch)) { - const ssize_t cnt = safein(fdfifo, (char*)trans, sizeof(trans), noerr); - - if (cnt > 0) { -@@ -1003,6 +1003,10 @@ void closeIO(void) - (void)fclose(flog); - flog = NULL; - xout: -+ if (fdfifo >= 0) { -+ close(fdfifo); -+ fdfifo = -1; -+ } - for (c = cons; c; c = c->next) { - if (c->fd < 0) - continue; diff --git a/startpar-0.57.dif b/startpar-0.57.dif index eba5d85..db2356d 100644 --- a/startpar-0.57.dif +++ b/startpar-0.57.dif @@ -1,15 +1,5 @@ ---- makeboot.c -+++ makeboot.c 2010-10-12 16:42:53.996426160 +0000 -@@ -407,6 +407,7 @@ void check_run_files(const char *action, - */ - #ifndef USE_BLOGD - # define bootlog(arg...) -+# define closeblog() - #endif - - /* --- proc.c -+++ proc.c 2010-09-30 12:19:16.000000000 +0000 ++++ proc.c 2010-09-30 14:19:15.595926333 +0200 @@ -94,3 +94,74 @@ int read_proc(unsigned long int * const return 0; } @@ -86,7 +76,7 @@ + } +} --- proc.h -+++ proc.h 2010-09-30 12:41:35.000000000 +0000 ++++ proc.h 2010-09-30 14:41:35.271926120 +0200 @@ -19,5 +19,3 @@ extern int read_proc(unsigned long int *prcs_run, unsigned long int *prcs_blked); @@ -94,29 +84,8 @@ -extern void unraw_consoles(void); -extern void raw_consoles(void); --- startpar.c -+++ startpar.c 2010-10-12 16:45:32.040429641 +0000 -@@ -52,6 +52,12 @@ - #include - #include - #include -+#ifdef USE_BLOGD -+# include -+#else -+# define bootlog(arg...) -+# define closeblog() -+#endif - #include "makeboot.h" - #include "proc.h" - -@@ -197,6 +203,7 @@ void closeall(void) - for (s = 0; s < par; s++) - if (prgs[s].fd) - close(prgs[s].fd); -+ closeblog(); - } - - void callsplash(int n, const char *path, char *action) -@@ -241,14 +248,7 @@ void callsplash(int n, const char *path, ++++ startpar.c 2010-09-30 15:01:50.787926081 +0200 +@@ -241,14 +241,7 @@ void callsplash(int n, const char *path, return; } @@ -132,7 +101,7 @@ sigprocmask(SIG_UNBLOCK, &nmask, NULL); (void)signal(SIGINT, SIG_DFL); -@@ -258,6 +258,7 @@ void callsplash(int n, const char *path, +@@ -258,6 +251,7 @@ void callsplash(int n, const char *path, (void)signal(SIGTERM, SIG_DFL); (void)signal(SIGCHLD, SIG_DFL); (void)signal(SIGTTIN, SIG_DFL); @@ -140,7 +109,7 @@ TEMP_FAILURE_RETRY(dup2(2, 1)); closeall(); -@@ -456,14 +457,7 @@ void run(struct prg *p) +@@ -456,14 +450,7 @@ void run(struct prg *p) return; } @@ -156,7 +125,7 @@ sigprocmask(SIG_UNBLOCK, &nmask, NULL); (void)signal(SIGINT, SIG_DFL); -@@ -473,6 +467,7 @@ void run(struct prg *p) +@@ -473,6 +460,7 @@ void run(struct prg *p) (void)signal(SIGTERM, SIG_DFL); (void)signal(SIGCHLD, SIG_DFL); (void)signal(SIGTTIN, SIG_DFL); @@ -164,7 +133,7 @@ if (setpgid(0, 0)) perror("setpgid"); -@@ -582,14 +577,7 @@ int run_single(const char *prg, const ch +@@ -582,14 +570,7 @@ int run_single(const char *prg, const ch { sigset_t nmask; @@ -180,7 +149,7 @@ sigprocmask(SIG_UNBLOCK, &nmask, NULL); (void)signal(SIGINT, SIG_DFL); -@@ -599,6 +587,7 @@ int run_single(const char *prg, const ch +@@ -599,6 +580,7 @@ int run_single(const char *prg, const ch (void)signal(SIGTERM, SIG_DFL); (void)signal(SIGCHLD, SIG_DFL); (void)signal(SIGTTIN, SIG_DFL); @@ -188,7 +157,7 @@ TEMP_FAILURE_RETRY(dup2(2, 1)); closeall(); -@@ -632,19 +621,20 @@ void do_forward(void) +@@ -632,19 +614,20 @@ void do_forward(void) { if (errno == EINTR) continue; @@ -211,7 +180,7 @@ rr = r; } r -= rr; -@@ -730,9 +720,23 @@ void detach(struct prg *p, const int sto +@@ -730,9 +713,23 @@ void detach(struct prg *p, const int sto { if ((pid = fork()) == 0) { @@ -235,7 +204,7 @@ execlp(myname, myname, "-f", "--", p->name, NULL); do_forward(); } -@@ -833,6 +837,8 @@ int main(int argc, char **argv) +@@ -833,6 +830,8 @@ int main(int argc, char **argv) char *splashopt = 0; sigset_t nmask, omask, smask; diff --git a/sysvinit.changes b/sysvinit.changes index f42d0af..27f6344 100644 --- a/sysvinit.changes +++ b/sysvinit.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Tue Oct 12 18:21:44 CEST 2010 - werner@suse.de - -- libblogger: set O_CLOEXEC for named FIFO /dev/blog (bnc#645793) - ------------------------------------------------------------------- Mon Oct 4 16:46:53 CEST 2010 - werner@suse.de