Details

    • Type: Incident report
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4.0, 2.4.1
    • Fix Version/s: 2.2.10rc1, 2.4.6rc1, 2.5.0
    • Component/s: Agent (G)
    • Labels:
    • Environment:
      HP-UX 11.31 on IA-64

      Description

      Depending on what preprocessor conditionals are taken in the <sys/utsname.h> OS header, the struct utsname member strings are different lengths. If using the compiler provided by HP, the system.uname item functions normally. If using gcc, the uname function that fills these character arrays runs into some kind of memory issue where only the sysname member gets populated and doesn't seem to get properly terminated with a null character. The agent was reporting HP-UX 11.31 followed by some random values to the server. I read through utsname.h and found a fix that works in my environment. I changed the following line in src/libs/zbxsysinfo/hpux/system.c from:

      struct utsname name;

      to:

      struct utsname_hpux_v1 name;

      This seems to function correctly with the HP C compiler and gcc. I attached my modified source file. Using the utsname_hpux_v1 declaration forces 9 byte member strings rather than the 257 byte strings.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tburns@hrsd.com Tyler Burns
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: