3 * This file is part of the KDE project, module kdesu.
4 * Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org>
7 #ifndef __Secure_h_included__
8 #define __Secure_h_included__
10 #include <sys/types.h>
11 #include <sys/socket.h>
14 * The Socket_security class autheticates the peer for you. It provides
15 * the process-id, user-id and group-id plus the MD5 sum of the connected
19 class SocketSecurity
{
21 explicit SocketSecurity(int fd
);
23 /** Returns the peer's process-id. */
24 int peerPid() const { return pid
; }
26 /** Returns the peer's user-id */
27 int peerUid() const { return uid
; }
29 /** Returns the peer's group-id */
30 int peerGid() const { return gid
; }