diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-03-24 14:30:16 +0100 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-03-27 14:47:30 +0200 |
commit | 1522077269c7df21b7f9b85e4749b9e32ccd0139 (patch) | |
tree | 102660e538427c5269615922a9529083b9fecd1b /src/core/dynamic-user.h | |
parent | 28135da3cdca53157bd878ae00b15d6e33ca4987 (diff) | |
download | systemd-1522077269c7df21b7f9b85e4749b9e32ccd0139.tar.gz |
core: Move DynamicCreds into ExecRuntime
This is just another piece of runtime data so let's store it in
ExecRuntime alongside the other runtime data.
Diffstat (limited to 'src/core/dynamic-user.h')
-rw-r--r-- | src/core/dynamic-user.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/dynamic-user.h b/src/core/dynamic-user.h index 847ef475ca..6539d17571 100644 --- a/src/core/dynamic-user.h +++ b/src/core/dynamic-user.h @@ -33,8 +33,11 @@ int dynamic_user_current(DynamicUser *d, uid_t *ret); int dynamic_user_lookup_uid(Manager *m, uid_t uid, char **ret); int dynamic_user_lookup_name(Manager *m, const char *name, uid_t *ret); -int dynamic_creds_acquire(DynamicCreds *creds, Manager *m, const char *user, const char *group); +int dynamic_creds_make(Manager *m, const char *user, const char *group, DynamicCreds **ret); int dynamic_creds_realize(DynamicCreds *creds, char **suggested_paths, uid_t *uid, gid_t *gid); -void dynamic_creds_unref(DynamicCreds *creds); -void dynamic_creds_destroy(DynamicCreds *creds); +DynamicCreds *dynamic_creds_unref(DynamicCreds *creds); +DynamicCreds *dynamic_creds_destroy(DynamicCreds *creds); + +DEFINE_TRIVIAL_CLEANUP_FUNC(DynamicCreds*, dynamic_creds_unref); +DEFINE_TRIVIAL_CLEANUP_FUNC(DynamicCreds*, dynamic_creds_destroy); |