public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/openrc:0.21.x commit in: src/rc/
@ 2016-07-31 19:06 William Hubbs
  0 siblings, 0 replies; 2+ messages in thread
From: William Hubbs @ 2016-07-31 19:06 UTC (permalink / raw
  To: gentoo-commits

commit:     fa39271d7a979ec8c1cf9c694d256456528baaf8
Author:     Doug Freed <dwfreed <AT> mtu <DOT> edu>
AuthorDate: Sun Jul 24 02:27:53 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Jul 31 18:50:05 2016 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=fa39271d

rc-logger: refuse to cat TMPLOG into itself

This prevents an infinite loop in case somebody decides to set
rc_log_path to match TMPLOG.

 src/rc/rc-logger.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/rc/rc-logger.c b/src/rc/rc-logger.c
index 06f3398..b4bd0ea 100644
--- a/src/rc/rc-logger.c
+++ b/src/rc/rc-logger.c
@@ -247,6 +247,10 @@ rc_logger_open(const char *level)
 		logfile = rc_conf_value("rc_log_path");
 		if (logfile == NULL)
 			logfile = DEFAULTLOG;
+		if (!strcmp(logfile, TMPLOG)) {
+			eerror("Cowardly refusing to concatenate a logfile into itself.");
+			eerrorx("Please change rc_log_path to something other than %s to get rid of this message", TMPLOG);
+		}
 
 		if ((plog = fopen(logfile, "ae"))) {
 			if ((log = fopen(TMPLOG, "re"))) {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/openrc:0.21.x commit in: src/rc/
@ 2016-08-25 16:52 William Hubbs
  0 siblings, 0 replies; 2+ messages in thread
From: William Hubbs @ 2016-08-25 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     6e0bd2deb1efb49fd1f1db54f7d57b2a462ccf82
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Thu Aug 25 16:04:48 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Aug 25 16:51:26 2016 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=6e0bd2de

openrc-run: make runscript warning respect quiet option

X-Gentoo-Bug: 591414
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=591414

 src/rc/openrc-run.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/rc/openrc-run.c b/src/rc/openrc-run.c
index 275cb32..1fecee6 100644
--- a/src/rc/openrc-run.c
+++ b/src/rc/openrc-run.c
@@ -1173,9 +1173,6 @@ int main(int argc, char **argv)
 	if (argc < 3)
 		usage(EXIT_FAILURE);
 
-	if (runscript)
-		ewarn("%s uses runscript, please convert to openrc-run.", service);
-
 	/* Change dir to / to ensure all init scripts don't use stuff in pwd */
 	if (chdir("/") == -1)
 		eerror("chdir: %s", strerror(errno));
@@ -1295,6 +1292,9 @@ int main(int argc, char **argv)
 	applet_list = rc_stringlist_new();
 	rc_stringlist_add(applet_list, applet);
 
+	if (runscript)
+		ewarn("%s uses runscript, please convert to openrc-run.", service);
+
 	/* Now run each option */
 	retval = EXIT_SUCCESS;
 	while (optind < argc) {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-25 16:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-31 19:06 [gentoo-commits] proj/openrc:0.21.x commit in: src/rc/ William Hubbs
  -- strict thread matches above, loose matches on Subject: below --
2016-08-25 16:52 William Hubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox