Cygwin: fhandler_socket_unix: store peer credentials in ucred member

* Split out cygwin/_ucred.h file
* drop local credentials

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2018-02-28 19:01:29 +01:00
parent 25ea6af172
commit 892efccb25
4 changed files with 30 additions and 22 deletions

View File

@ -11,6 +11,7 @@ details. */
#include "tty.h"
#include <cygwin/_socketflags.h>
#include <cygwin/_ucred.h>
/* fcntl flags used only internaly. */
#define O_NOSYMLINK 0x080000
@ -824,15 +825,10 @@ class fhandler_socket_unix : public fhandler_socket
char *get_sun_path () {return sun_path;}
void set_peer_sun_path (const char *path);
char *get_peer_sun_path () {return peer_sun_path;}
void set_cred ();
protected:
pid_t sec_pid;
uid_t sec_uid;
gid_t sec_gid;
pid_t sec_peer_pid;
uid_t sec_peer_uid;
gid_t sec_peer_gid;
struct ucred peer_cred;
void set_cred ();
public:
fhandler_socket_unix ();