summaryrefslogtreecommitdiff
path: root/src/libstddjb/prot.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-08-01 20:26:05 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-08-01 20:26:05 +0000
commit7bf3e29007350897cb708da01df845f4d58b4173 (patch)
tree7f6ecb1b4706d955d9bf52f2b3aa7aff11419109 /src/libstddjb/prot.c
parente8fe8ed8117bb1a58cd588b295352875d3c08c1a (diff)
downloadskalibs-7bf3e29007350897cb708da01df845f4d58b4173.tar.xz
Remove prot
Diffstat (limited to 'src/libstddjb/prot.c')
-rw-r--r--src/libstddjb/prot.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/libstddjb/prot.c b/src/libstddjb/prot.c
deleted file mode 100644
index 6714cfb..0000000
--- a/src/libstddjb/prot.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* ISC license. */
-
-/* MT-unsafe */
-
-#include <unistd.h>
-#include <pwd.h>
-#include <errno.h>
-#include <skalibs/djbunix.h>
-
-int prot_setuidgid (char const *name)
-{
- struct passwd *pw = getpwnam(name) ;
- if (!pw)
- {
- if (!errno) errno = ESRCH ;
- return 0 ;
- }
- return !prot_grps(name) && !setgid(pw->pw_gid) && !setuid(pw->pw_uid) ;
-}