Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
pacemaker.13547
pacemaker-libcrmcommon-use-tmp-when-creating-te...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-libcrmcommon-use-tmp-when-creating-temporary-XML-file.patch of Package pacemaker.13547
commit e1bcd6066e9892dfeea889e741a11044d97f2497 Author: Ken Gaillot <kgaillot@redhat.com> Date: Tue Feb 13 17:21:37 2018 -0600 Low: libcrmcommon: use /tmp when creating temporary XML file ... instead of CRM_STATE_DIR, which may not be usable from an ordinary user's account, thus generating incorrect CLI regression test output when run from a checkout. Index: pacemaker/lib/common/xml.c =================================================================== --- pacemaker.orig/lib/common/xml.c +++ pacemaker/lib/common/xml.c @@ -5638,9 +5638,13 @@ validate_xml_verbose(xmlNode * xml_blob) xmlDoc *doc = NULL; xmlNode *xml = NULL; gboolean rc = FALSE; - char *filename = strdup(CRM_STATE_DIR "/cib-invalid.XXXXXX"); + const char *tmpdir = getenv("TMPDIR"); + char *filename = NULL; - CRM_CHECK(filename != NULL, return FALSE); + if ((tmpdir == NULL) || (*tmpdir != '/')) { + tmpdir = "/tmp"; + } + filename = crm_strdup_printf("%s/cib-invalid.XXXXXX", tmpdir); umask(S_IWGRP | S_IWOTH | S_IROTH); fd = mkstemp(filename);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor