Skip to content

Commit

Permalink
XrdTls: XrdTlsTempCA - Replaced dup() by XrdSysFD_Dup() in output fil…
Browse files Browse the repository at this point in the history
…e open
  • Loading branch information
ccaffy committed Aug 22, 2023
1 parent 2df0061 commit fca07e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/XrdTls/XrdTlsTempCA.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class CRLSet {
bool
CRLSet::processFile(file_smart_ptr &fp, const std::string &fname)
{
file_smart_ptr outputfp(fdopen(dup(m_output_fd), "w"), &fclose);
file_smart_ptr outputfp(fdopen(XrdSysFD_Dup(m_output_fd), "w"), &fclose);
if (!outputfp.get()) {
m_log.Emsg("CRLSet", "Failed to reopen file for output", fname.c_str());
return false;
Expand Down Expand Up @@ -237,7 +237,7 @@ bool CRLSet::atLeastOneValidCRLFound() const {
bool CRLSet::processCRLWithCriticalExt() {
// Don't open the output file if not necessary
if(!m_crls_critical_extension.empty()) {
file_smart_ptr outputfp(fdopen(dup(m_output_fd), "w"), &fclose);
file_smart_ptr outputfp(fdopen(XrdSysFD_Dup(m_output_fd), "w"), &fclose);
if (!outputfp.get()) {
m_log.Emsg("CRLSet", "Failed to reopen file for output critical CRLs with critical extension");
return false;
Expand Down

0 comments on commit fca07e4

Please sign in to comment.