aboutsummaryrefslogtreecommitdiffstats
path: root/guts/setegid.c
diff options
context:
space:
mode:
Diffstat (limited to 'guts/setegid.c')
-rw-r--r--guts/setegid.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/guts/setegid.c b/guts/setegid.c
new file mode 100644
index 0000000..a24be76
--- /dev/null
+++ b/guts/setegid.c
@@ -0,0 +1,17 @@
+/*
+ * static int
+ * wrap_setegid(gid_t egid) {
+ * int rc = -1;
+ */
+ if (pseudo_euid == 0 || egid == pseudo_egid || egid == pseudo_rgid || egid == pseudo_sgid) {
+ pseudo_egid = egid;
+ pseudo_fgid = egid;
+ pseudo_client_touchgid();
+ rc = 0;
+ } else {
+ rc = -1;
+ errno = EPERM;
+ }
+/* return rc;
+ * }
+ */