From b529f046c9a64ac5fcfa60747af940cf972b3ebc Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 6 Nov 2011 15:56:34 -0600 Subject: Actually move the kde files that were renamed in the last commit --- kdesu/kdesud/secure.h | 52 --------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 kdesu/kdesud/secure.h (limited to 'kdesu/kdesud/secure.h') diff --git a/kdesu/kdesud/secure.h b/kdesu/kdesud/secure.h deleted file mode 100644 index edf58d9c6..000000000 --- a/kdesu/kdesud/secure.h +++ /dev/null @@ -1,52 +0,0 @@ -/* vi: ts=8 sts=4 sw=4 - * - * This file is part of the KDE project, module tdesu. - * Copyright (C) 1999,2000 Geert Jansen - */ - -#ifndef __Secure_h_included__ -#define __Secure_h_included__ - -#include "config.h" - -#include -#include - -#ifndef HAVE_STRUCT_UCRED - -// `struct ucred' is not defined in glibc 2.0. - -struct ucred { - pid_t pid; - uid_t uid; - gid_t gid; -}; - -#endif // HAVE_STRUCT_UCRED - - -/** - * The Socket_security class autheticates the peer for you. It provides - * the process-id, user-id and group-id plus the MD5 sum of the connected - * binary. - */ - -class SocketSecurity { -public: - SocketSecurity(int fd); - - /** Returns the peer's process-id. */ - int peerPid() { if (!ok) return -1; return cred.pid; } - - /** Returns the peer's user-id */ - int peerUid() { if (!ok) return -1; return cred.uid; } - - /** Returns the peer's group-id */ - int peerGid() { if (!ok) return -1; return cred.gid; } - -private: - bool ok; - struct ucred cred; -}; - -#endif -- cgit v1.2.3