diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2014-07-26 12:46:26 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-10-10 13:55:54 +0200 |
commit | 9df7cddb68c61ef4e0397c196604999c68f4be0d (patch) | |
tree | 0ef6135e302370a8a604fc8a1120d5459a96b27e /src/util/util.h | |
parent | 5ecc36322d9ccc9a9266263fcea8598ca89f4426 (diff) | |
download | sssd-9df7cddb68c61ef4e0397c196604999c68f4be0d.tar.gz sssd-9df7cddb68c61ef4e0397c196604999c68f4be0d.tar.xz sssd-9df7cddb68c61ef4e0397c196604999c68f4be0d.zip |
UTIL: Move become_user outside krb5 tree
In order for several other SSSD processes to run as a non-root user, we
need to move the functions to become another user to a shared space in
our source tree.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/util/util.h')
-rw-r--r-- | src/util/util.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/util.h b/src/util/util.h index 482a660e7..c497f605b 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -580,4 +580,13 @@ char * sss_reverse_replace_space(TALLOC_CTX *mem_ctx, const char *orig_name, const char replace_char); +/* from become_user.c */ +errno_t become_user(uid_t uid, gid_t gid); +struct sss_creds; +errno_t switch_creds(TALLOC_CTX *mem_ctx, + uid_t uid, gid_t gid, + int num_gids, gid_t *gids, + struct sss_creds **saved_creds); +errno_t restore_creds(struct sss_creds *saved_creds); + #endif /* __SSSD_UTIL_H__ */ |