4099 SMF methods without absolute paths no longer work
Reviewed by: Richard Lowe <
[email protected]>
Approved by: Dan McDonald <
[email protected]>
--- 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);