Skip to content

Commit d00b272

Browse files
committed
Even though SO_PEERCRED is probably totally unportable, might as well
declare the getsockopt parameter as ACCEPT_TYPE_ARG3 to be consistent with our other uses of getsockopt.
1 parent 49435fb commit d00b272

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/backend/libpq/hba.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.60 2001/08/02 14:27:40 tgl Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.61 2001/08/02 14:39:35 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -863,11 +863,10 @@ ident_unix(int sock, char *ident_user)
863863
#ifdef SO_PEERCRED
864864
/* Linux style: use getsockopt(SO_PEERCRED) */
865865
struct ucred peercred;
866-
socklen_t so_len;
866+
ACCEPT_TYPE_ARG3 so_len = sizeof(peercred);
867867
struct passwd *pass;
868868

869869
errno = 0;
870-
so_len = sizeof(peercred);
871870
if (getsockopt(sock, SOL_SOCKET, SO_PEERCRED, &peercred, &so_len) != 0 ||
872871
so_len != sizeof(peercred))
873872
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy