From 532d4a24e2013262dfa41fd85c06a9715c99abf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 24 Oct 2022 21:03:42 +0200 Subject: New upstream version 4.7 --- include/libHX/proc.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/libHX/proc.h') diff --git a/include/libHX/proc.h b/include/libHX/proc.h index cb682ed..fb17d5e 100644 --- a/include/libHX/proc.h +++ b/include/libHX/proc.h @@ -21,6 +21,16 @@ enum { HXPROC_NULL_STDERR = 1 << 8, }; +enum HXproc_su_status { + HXPROC_INITGROUPS_FAILED = -5, + HXPROC_SETGID_FAILED = -4, + HXPROC_SETUID_FAILED = -3, + HXPROC_GROUP_NOT_FOUND = -2, + HXPROC_USER_NOT_FOUND = -1, + HXPROC_SU_NOOP = 0, + HXPROC_SU_SUCCESS = 1, +}; + struct HXproc_ops { void (*p_prefork)(void *); void (*p_postfork)(void *); @@ -41,6 +51,8 @@ struct HXproc { extern int HXproc_run_async(const char *const *, struct HXproc *); extern int HXproc_run_sync(const char *const *, unsigned int); extern int HXproc_wait(struct HXproc *); +extern enum HXproc_su_status HXproc_switch_user(const char *user, const char *group); +extern int HXproc_top_fd(void); #ifdef __cplusplus } /* extern "C" */ -- cgit v1.2.3