OpenSolaris

Printable Version Enter a New Search
Bug ID 6411807
Synopsis exec_method drops errno when juggling errors
State 10-Fix Delivered (Fix available in build)
Category:Subcategory utility:smf
Keywords oss-bite-size | oss-request | oss-sponsor
Sponsor Antonello Cruz
Submitter chauhan
Responsible Engineer Antonello Cruz
Reported Against snv_36
Duplicate Of
Introduced In
Commit to Fix snv_72
Fixed In snv_72
Release Fixed solaris_nevada(snv_72)
Related Bugs
Submit Date 11-April-2006
Last Update Date 31-August-2007
Description
[dep, 11Apr2006]

  In startd's exec_method, we explicitly store the result of
  restarter_set_method_context() in errno for later processing, but
  immediately call fputs() before getting anywhere:

        /* Set credentials. */
        errno = restarter_set_method_context(mcp, &errf);
        if (errno != 0) {
                (void) fputs("svc.startd could not set context for method: ",
                    stderr);

  As a result, all error processing that follows is broken.

  We should be using a local variable instead of abusing errno.
Work Around
N/A
Comments
N/A