summaryrefslogtreecommitdiff
path: root/include/libHX/proc.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2022-10-24 21:03:42 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2022-10-24 21:03:42 +0200
commit532d4a24e2013262dfa41fd85c06a9715c99abf7 (patch)
tree3b7f4fac1e983ead408c20a2f330b41aa2399ab1 /include/libHX/proc.h
parenta1bdcfa3ca8af4ddb69ee57d716aa943cf3fe94a (diff)
New upstream version 4.7upstream/4.7
Diffstat (limited to 'include/libHX/proc.h')
-rw-r--r--include/libHX/proc.h12
1 files changed, 12 insertions, 0 deletions
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" */