summaryrefslogtreecommitdiff
path: root/security/gnome-keyring/files/patch-egg_egg-unix-credentials.c
blob: e54c436a03df8f60ceb52ac478ee7af4d3e048e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- egg/egg-unix-credentials.c.orig	2025-03-18 08:38:44 UTC
+++ egg/egg-unix-credentials.c
@@ -142,7 +142,9 @@ egg_unix_credentials_read (int sock, pid_t *pid, uid_t
 		cred = (struct sockcred *) CMSG_DATA (&cmsg.hdr);
 		*pid = 0;
 		*uid = cred->sc_euid;
+#ifndef __FreeBSD__
 		set_local_creds(sock, 0);
+#endif
 #elif defined(HAVE_GETPEEREID) /* OpenBSD */
 		uid_t euid;
 		gid_t egid;
@@ -230,7 +232,7 @@ egg_unix_credentials_setup (int sock)
 #if defined(LOCAL_CREDS) && !defined(HAVE_CMSGCRED)
 	int val = 1;
 	if (setsockopt (sock, 0, LOCAL_CREDS, &val, sizeof (val)) < 0) {
-		fprintf (stderr, "unable to set LOCAL_CREDS socket option on fd %d\n", fd);
+		fprintf (stderr, "unable to set LOCAL_CREDS socket option\n");
 		retval = -1;
 	}
 #endif