Use of mktemp may fail on some platforms

Bug #1011766 reported by Baron Schwartz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Monitoring Plugins
Fix Released
Medium
Baron Schwartz

Bug Description

A bug related to mktemp was reported to Percona Toolkit (bug 986151). The reporter found that the mktemp pattern needs six X characters to work on his platform. It is possible that a similar limitation could affect the monitoring plugins.

In addition, we should not hardcode the temp path to /tmp, but respect the TEMP environment variable.

As a result, it's best if we just call 'mktemp' with no arguments.

Revision history for this message
Baron Schwartz (baron-xaprb) wrote :

It seems that $TMPDIR isn't reliably set. We'll keep /tmp hardcoded.

Changed in percona-monitoring-plugins:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Baron Schwartz (baron-xaprb)
milestone: none → 1.0.1
Revision history for this message
Baron Schwartz (baron-xaprb) wrote :

The -t option is available on every platform except perhaps Solaris. We will use that instead of hardcoding the temporary directory. This seems less likely to cause problems than a hardcoded /tmp directory.

Changed in percona-monitoring-plugins:
status: Confirmed → Fix Committed
Changed in percona-monitoring-plugins:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.