Skip to content

Commit

Permalink
security/acme-client: fix #1844
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed May 22, 2020
1 parent 8532906 commit ee799d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Expand Up @@ -1418,14 +1418,14 @@ function run_restart_actions($certlist, $modelObj)
if (empty((string)$action->configd)) {
log_error("AcmeClient: no configd command specified for automation: " . $action->name);
$result = '1';
continue; // Continue with next action.
} else {
$response = $backend->configdRun((string)$action->configd);
}
$response = $backend->configdRun((string)$action->configd);
break;
default:
log_error("AcmeClient: an invalid automation was specified: " . (string)$action->type);
$return = 1;
continue; // Continue with next action.
break;
}
}
}
Expand Down
Expand Up @@ -296,16 +296,17 @@ function uploadCertificatesToHost(array $options): int
Utils::log()->error("Failed on " . json_encode($uploader->current(), JSON_UNESCAPED_SLASHES));

switch ($result) {
case SftpUploader::UPLOAD_ERROR_CHGRP_FAILED:
case SftpUploader::UPLOAD_ERROR_CHMOD_FAILED:
case SftpUploader::UPLOAD_ERROR_NO_OVERWRITE:
continue;

case SftpUploader::UPLOAD_ERROR_NO_PERMISSION:
return EXITCODE_ERROR_NO_PERMISSION;

case SftpUploader::UPLOAD_ERROR:
return EXITCODE_ERROR;

case SftpUploader::UPLOAD_ERROR_CHGRP_FAILED:
case SftpUploader::UPLOAD_ERROR_CHMOD_FAILED:
case SftpUploader::UPLOAD_ERROR_NO_OVERWRITE:
default:
break;
}
} else {
break;
Expand Down

0 comments on commit ee799d8

Please sign in to comment.