[6.0] 559f75fdc VMOD unix obtains effective uid/gid on solarishy platforms.

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Aug 16 08:52:37 UTC 2018


commit 559f75fdcfb52b0b371ea4c5b420c8f0f9bf221f
Author: Geoff Simmons <geoff at uplex.de>
Date:   Fri Apr 6 14:51:45 2018 +0200

    VMOD unix obtains effective uid/gid on solarishy platforms.
    
    Not real ids; for consistency with the other platforms.

diff --git a/lib/libvmod_unix/cred_compat.h b/lib/libvmod_unix/cred_compat.h
index 3c5ff080e..843793a75 100644
--- a/lib/libvmod_unix/cred_compat.h
+++ b/lib/libvmod_unix/cred_compat.h
@@ -105,8 +105,8 @@ get_ids(int fd, uid_t *uid, gid_t *gid)
 	errno = 0;
 	if (getpeerucred(fd, &ucredp))
 		return (CREDS_FAIL);
-	*uid = ucred_getruid(ucredp);
-	*gid = ucred_getrgid(ucredp);
+	*uid = ucred_geteuid(ucredp);
+	*gid = ucred_getegid(ucredp);
 
 # if defined(HAVE_SETPPRIV)
 	if (priv != NULL)


More information about the varnish-commit mailing list