mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
core/exec-credential: make param const where appropriate
This commit is contained in:
@@ -57,16 +57,15 @@ bool exec_context_has_credentials(const ExecContext *c) {
|
||||
!set_isempty(c->import_credentials);
|
||||
}
|
||||
|
||||
bool exec_context_has_encrypted_credentials(ExecContext *c) {
|
||||
ExecLoadCredential *load_cred;
|
||||
ExecSetCredential *set_cred;
|
||||
|
||||
bool exec_context_has_encrypted_credentials(const ExecContext *c) {
|
||||
assert(c);
|
||||
|
||||
const ExecLoadCredential *load_cred;
|
||||
HASHMAP_FOREACH(load_cred, c->load_credentials)
|
||||
if (load_cred->encrypted)
|
||||
return true;
|
||||
|
||||
const ExecSetCredential *set_cred;
|
||||
HASHMAP_FOREACH(set_cred, c->set_credentials)
|
||||
if (set_cred->encrypted)
|
||||
return true;
|
||||
|
||||
@@ -34,8 +34,8 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(ExecLoadCredential*, exec_load_credential_free);
|
||||
extern const struct hash_ops exec_set_credential_hash_ops;
|
||||
extern const struct hash_ops exec_load_credential_hash_ops;
|
||||
|
||||
bool exec_context_has_encrypted_credentials(ExecContext *c);
|
||||
bool exec_context_has_credentials(const ExecContext *c);
|
||||
bool exec_context_has_encrypted_credentials(const ExecContext *c);
|
||||
|
||||
int exec_context_get_credential_directory(
|
||||
const ExecContext *context,
|
||||
|
||||
Reference in New Issue
Block a user