diff --git a/src/condor_starter.V6.1/jic_shadow.cpp b/src/condor_starter.V6.1/jic_shadow.cpp index 8406f789567..1ce0b1cc805 100644 --- a/src/condor_starter.V6.1/jic_shadow.cpp +++ b/src/condor_starter.V6.1/jic_shadow.cpp @@ -2457,6 +2457,7 @@ JICShadow::beginFileTransfer( void ) ASSERT( filetrans->Init(job_ad, false, PRIV_USER) ); filetrans->setSecuritySession(m_filetrans_sec_session); + filetrans->setSyscallSocket(syscall_sock); filetrans->RegisterCallback( (FileTransferHandlerCpp)&JICShadow::transferCompleted,this ); diff --git a/src/condor_utils/file_transfer.cpp b/src/condor_utils/file_transfer.cpp index dcc8d338d1a..55c2f73552d 100644 --- a/src/condor_utils/file_transfer.cpp +++ b/src/condor_utils/file_transfer.cpp @@ -47,6 +47,7 @@ #include "data_reuse.h" #include "AWSv4-utils.h" #include "condor_random_num.h" +#include "condor_sys.h" #include #include @@ -5408,7 +5409,6 @@ FileTransfer::InvokeFileTransferPlugin(CondorError &e, const char* source, const return TransferPluginResult::Error; } - // detect which plugin to invoke char *URL = NULL; @@ -5548,6 +5548,18 @@ FileTransfer::InvokeMultipleFileTransferPlugin( CondorError &e, const std::string &plugin_path, const std::string &transfer_files_string, const char* proxy_filename, bool do_upload, std::vector> *result_ads ) { + + // MRC test code: Demonstrate a syscall to the condor_shadow + int syscall_code = CONDOR_set_job_attr; + std::string attr_name = "RefreshOAuthCredentials"; + std::string attr_value = "Do it! Do it now!"; + if (m_syscall_socket->is_connected()) { + m_syscall_socket->encode(); + m_syscall_socket->code(syscall_code); + m_syscall_socket->code(attr_value); + m_syscall_socket->code(attr_name); + m_syscall_socket->end_of_message(); + } ArgList plugin_args; CondorClassAdFileIterator adFileIter; diff --git a/src/condor_utils/file_transfer.h b/src/condor_utils/file_transfer.h index 23395517062..183c5c2e5f9 100644 --- a/src/condor_utils/file_transfer.h +++ b/src/condor_utils/file_transfer.h @@ -152,6 +152,9 @@ class FileTransfer final: public Service { */ void setCredsDir(const std::string &cred_dir) {m_cred_dir = cred_dir;} + /** @param socket The socket used to send syscall instructions */ + void setSyscallSocket(ReliSock* socket) {m_syscall_socket = socket;} + /** @param reuse_dir: The DataReuseDirectory object to utilize for data reuse * lookups */ @@ -475,6 +478,7 @@ class FileTransfer final: public Service { bool did_init{false}; bool simple_init{true}; ReliSock *simple_sock{nullptr}; + ReliSock *m_syscall_socket{nullptr}; MyString download_filename_remaps; bool m_use_file_catalog{true}; TransferQueueContactInfo m_xfer_queue_contact_info;