summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/samba_util.h2
-rw-r--r--lib/util/system.c29
2 files changed, 0 insertions, 31 deletions
diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h
index 0c3fd1aeaf..f989231102 100644
--- a/lib/util/samba_util.h
+++ b/lib/util/samba_util.h
@@ -123,8 +123,6 @@ _PUBLIC_ pid_t sys_fork(void);
**/
_PUBLIC_ pid_t sys_getpid(void);
-_PUBLIC_ int sys_getpeereid( int s, uid_t *uid);
-
struct sockaddr;
_PUBLIC_ int sys_getnameinfo(const struct sockaddr *psa,
diff --git a/lib/util/system.c b/lib/util/system.c
index a7141bf9b0..f34fabd292 100644
--- a/lib/util/system.c
+++ b/lib/util/system.c
@@ -71,35 +71,6 @@ _PUBLIC_ pid_t sys_getpid(void)
}
-_PUBLIC_ int sys_getpeereid( int s, uid_t *uid)
-{
-#if defined(HAVE_PEERCRED)
- struct ucred cred;
- socklen_t cred_len = sizeof(struct ucred);
- int ret;
-
- ret = getsockopt(s, SOL_SOCKET, SO_PEERCRED, (void *)&cred, &cred_len);
- if (ret != 0) {
- return -1;
- }
-
- if (cred_len != sizeof(struct ucred)) {
- errno = EINVAL;
- return -1;
- }
-
- *uid = cred.uid;
- return 0;
-#else
-#if defined(HAVE_GETPEEREID)
- gid_t gid;
- return getpeereid(s, uid, &gid);
-#endif
- errno = ENOSYS;
- return -1;
-#endif
-}
-
_PUBLIC_ int sys_getnameinfo(const struct sockaddr *psa,
int salen,
char *host,