Date: Tue, 4 Jun 2019 15:51:28 -0700 From: Gleb Smirnoff <glebius@freebsd.org> To: Dmitry Chagin <dchagin@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348419 - in head: crypto/heimdal/lib/ipc share/man/man4 sys/compat/linux sys/kern sys/sys usr.sbin/mountd Message-ID: <20190604225128.GL21836@FreeBSD.org> In-Reply-To: <201905301424.x4UEORXr098755@repo.freebsd.org> References: <201905301424.x4UEORXr098755@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Dmitry, On Thu, May 30, 2019 at 02:24:27PM +0000, Dmitry Chagin wrote: D> Author: dchagin D> Date: Thu May 30 14:24:26 2019 D> New Revision: 348419 D> URL: https://svnweb.freebsd.org/changeset/base/348419 D> D> Log: D> Complete LOCAL_PEERCRED support. Cache pid of the remote process in the D> struct xucred. Do not bump XUCRED_VERSION as struct layout is not changed. D> D> PR: 215202 D> Reviewed by: tijl D> MFC after: 1 week D> Differential Revision: https://reviews.freebsd.org/D20415 ... D> Modified: head/sys/sys/ucred.h D> ============================================================================== D> --- head/sys/sys/ucred.h Thu May 30 14:21:51 2019 (r348418) D> +++ head/sys/sys/ucred.h Thu May 30 14:24:26 2019 (r348419) D> @@ -87,10 +87,14 @@ struct xucred { D> uid_t cr_uid; /* effective user id */ D> short cr_ngroups; /* number of groups */ D> gid_t cr_groups[XU_NGROUPS]; /* groups */ D> - void *_cr_unused1; /* compatibility with old ucred */ D> + union { D> + void *_cr_unused1; /* compatibility with old ucred */ D> + pid_t _pid; D> + } _cr; D> }; D> #define XUCRED_VERSION 0 D> D> +#define cr_pid _cr._pid Why don't use C99 in 2019 instead of preprocessor define? Should be union { void *_cr_unused1; /* compatibility with old ucred */ pid_t cr_pid; }; -- Gleb Smirnoff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190604225128.GL21836>