From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11362 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] fix fchown fallback on arches without chown(2) Date: Sat, 27 May 2017 22:04:21 -0400 Message-ID: <20170528020421.GE1627@brightrain.aerifal.cx> References: <20170527202001.27170-1-samuel@sholland.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1495937073 11403 195.159.176.226 (28 May 2017 02:04:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 28 May 2017 02:04:33 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-11377-gllmg-musl=m.gmane.org@lists.openwall.com Sun May 28 04:04:30 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1dEnZG-0002tY-2L for gllmg-musl@m.gmane.org; Sun, 28 May 2017 04:04:30 +0200 Original-Received: (qmail 21667 invoked by uid 550); 28 May 2017 02:04:33 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 21649 invoked from network); 28 May 2017 02:04:33 -0000 Content-Disposition: inline In-Reply-To: <20170527202001.27170-1-samuel@sholland.org> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:11362 Archived-At: On Sat, May 27, 2017 at 03:20:01PM -0500, Samuel Holland wrote: > The flags argument was missing, causing uninitalized data to be passed > to fchownat(2). The correct value of flags should match the fallback for > chown(3). > --- > src/unistd/fchown.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/unistd/fchown.c b/src/unistd/fchown.c > index 03459849..75075eec 100644 > --- a/src/unistd/fchown.c > +++ b/src/unistd/fchown.c > @@ -16,7 +16,7 @@ int fchown(int fd, uid_t uid, gid_t gid) > #ifdef SYS_chown > return syscall(SYS_chown, buf, uid, gid); > #else > - return syscall(SYS_fchownat, AT_FDCWD, buf, uid, gid); > + return syscall(SYS_fchownat, AT_FDCWD, buf, uid, gid, 0); > #endif > > } > -- > 2.13.0 Thanks. Applying. Rich