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