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

@ -0,0 +1,20 @@
/* cygwin/_ucred.h
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#ifndef _CYGWIN__UCRED_H
#define _CYGWIN__UCRED_H
#include <sys/types.h>
struct ucred {
pid_t pid;
uid_t uid;
gid_t gid;
};
#endif /* _CYGWIN__UCRED_H */

View File

@ -47,12 +47,7 @@ struct sockaddr_storage {
#include <asm/socket.h> /* arch-dependent defines */
#include <cygwin/sockios.h> /* the SIOCxxx I/O controls */
#include <sys/uio.h> /* iovec support */
struct ucred {
pid_t pid;
uid_t uid;
gid_t gid;
};
#include <cygwin/_ucred.h> /* struct ucred */
struct linger {
unsigned short l_onoff; /* Linger active */