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
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"