4099 SMF methods without absolute paths no longer work
authorJerry Jelinek <jerry.jelinek@joyent.com>
Fri, 06 Sep 2013 09:20:56 -0700
changeset 14187 68927c785889
parent 14186 863932c97ce8
child 14188 afe390b9f1e0
4099 SMF methods without absolute paths no longer work Reviewed by: Richard Lowe <[email protected]> Approved by: Dan McDonald <[email protected]>
usr/src/cmd/svc/startd/method.c
--- a/usr/src/cmd/svc/startd/method.c	Wed Sep 04 14:48:51 2013 -0700
+++ b/usr/src/cmd/svc/startd/method.c	Fri Sep 06 09:20:56 2013 -0700
@@ -851,7 +851,8 @@
 		if ((pend = strchr(method, ' ')) != NULL)
 			*pend = '\0';
 
-		if (stat64(method, &sbuf) == -1 && errno == ENOENT) {
+		if (*method == '/' && stat64(method, &sbuf) == -1 &&
+		    errno == ENOENT) {
 			log_instance(inst, B_TRUE, "Missing start method (%s), "
 			    "changing state to maintenance.", method);
 			restarter_free_method_context(mcp);