summaryrefslogtreecommitdiff
path: root/doc/process_management.rst
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2023-11-21 09:56:28 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2023-11-21 09:56:28 +0100
commit45e1231149779c363c9abb78cc09e21d047c463f (patch)
tree111b91a23e747bb2c9df60b0170914cbbd74dec3 /doc/process_management.rst
parentd391e80c7378e6604c8f84538f27df8b915ebd2a (diff)
parent987942a206ef0f2342bf81d5de6432c6af42b7e7 (diff)
Update upstream source from tag 'upstream/4.17'
Update to upstream version '4.17' with Debian dir da192eda54f0b421cbc1b9ba383659593db8d3db
Diffstat (limited to 'doc/process_management.rst')
-rw-r--r--doc/process_management.rst15
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/process_management.rst b/doc/process_management.rst
index 8fe282b..d999608 100644
--- a/doc/process_management.rst
+++ b/doc/process_management.rst
@@ -202,7 +202,17 @@ User identity control
#include <libHX/proc.h>
- int HXproc_switch_user(const char *user, const char *group);
+ 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,
+ };
+
+ enum HXproc_su_status HXproc_switch_user(const char *user, const char *group);
``HXproc_switch_user`` is a wrapper for changing process identity to an
unprivileged user. This utilizes ``setuid``, and possibly ``setgid`` plus
@@ -217,6 +227,9 @@ process group(s) will change to the the user's group(s) — both primary and
secondary — provided a user was specified (see above). When ``gruop`` is the
empty string, no change of process group identity occurs.
+The return value is an enum indicating failure with values <0, and success with
+>=0.
+
Process information
===================