delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / kdesu / kdesud / secure.h
blobd6e833b7be235ae3c4587c7b424df9252e0aaa9e
1 /* vi: ts=8 sts=4 sw=4
3 * This file is part of the KDE project, module kdesu.
4 * Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org>
5 */
7 #ifndef __Secure_h_included__
8 #define __Secure_h_included__
10 #include <sys/types.h>
11 #include <sys/socket.h>
13 /**
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
16 * binary.
19 class SocketSecurity {
20 public:
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; }
32 private:
33 int pid;
34 int gid;
35 int uid;
38 #endif