Lines Matching refs:sDst
497 def _hardenedCopyFile(self, sSrc, sDst, iMode):
501 reporter.log('_hardenedCopyFile: %s -> %s (mode: %o)' % (sSrc, sDst, iMode,));
503 shutil.copyfile(sSrc, sDst);
504 os.chmod(sDst, iMode);
506 fRc = self._sudoExecuteSync(['/bin/cp', sSrc, sDst]);
508 raise Exception('Failed to copy "%s" to "%s".' % (sSrc, sDst,));
509 fRc = self._sudoExecuteSync(['/bin/chmod', '%o' % (iMode,), sDst]);
511 raise Exception('Failed to chmod "%s".' % (sDst,));
566 sDst = os.path.join(sDstDir, os.path.basename(sFullPath));
567 self._hardenedCopyFile(sFullPath, sDst, 0755);
568 asFilesToRemove.append(sDst);
574 sDst = os.path.join(sDstDir, os.path.basename(sSrc));
575 self._hardenedCopyFile(sSrc, sDst, 0644);
576 asFilesToRemove.append(sDst);
584 sDst = os.path.join(sDstDir, os.path.basename(sSrc));
585 self._hardenedCopyFile(sSrc, sDst, 0644);
586 asFilesToRemove.append(sDst);