From owner-svn-src-all@freebsd.org Tue Jun 4 22:51:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19D1915BF336; Tue, 4 Jun 2019 22:51:38 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E20189164; Tue, 4 Jun 2019 22:51:37 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id x54MpSfA062383 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 4 Jun 2019 15:51:28 -0700 (PDT) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id x54MpSCR062382; Tue, 4 Jun 2019 15:51:28 -0700 (PDT) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Tue, 4 Jun 2019 15:51:28 -0700 From: Gleb Smirnoff To: Dmitry Chagin 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> References: <201905301424.x4UEORXr098755@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201905301424.x4UEORXr098755@repo.freebsd.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 4E20189164 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jun 2019 22:51:38 -0000 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