Skip to content

Commit

Permalink
Dummy issetugid for Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
tamentis committed May 18, 2019
1 parent 7a47fbe commit 63420be
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@ main() {
}
EOF

test_compile issetugid issetugid.o <<EOF
main() {
int i = issetugid();
}
EOF

test_compile setresgid setresgid.o <<EOF
main() {
int i = setresgid(9999, 9999, 9999);
Expand Down
13 changes: 13 additions & 0 deletions src/issetugid.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* Copyright (c) 2019 Bertrand Janin <[email protected]> */

/*
* XXX: This is not an implementation of issetugid but since this call is made
* to check on how to use pledge() and pledge is not available on any of the
* systems we target, we can safely use a dummy version.
*/

int
issetugid(void)
{
return 0;
}

0 comments on commit 63420be

Please sign in to comment.