From patchwork Sun Oct 5 16:23:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 3105 Received: (qmail 12469 invoked by alias); 5 Oct 2014 16:23:24 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 12459 invoked by uid 89); 5 Oct 2014 16:23:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: newverein.lst.de Date: Sun, 5 Oct 2014 18:23:17 +0200 From: Christoph Hellwig To: Rich Felker Cc: "Joseph S. Myers" , Roland McGrath , libc-alpha@sourceware.org Subject: Re: C11 threads ABI questions - enum values Message-ID: <20141005162317.GA12566@lst.de> References: <20141003151917.GS23797@brightrain.aerifal.cx> <20141003153248.GT23797@brightrain.aerifal.cx> <20141003183910.GA8806@lst.de> <20141003194932.GU23797@brightrain.aerifal.cx> <20141004175346.GA23717@lst.de> <20141004225756.GV23797@brightrain.aerifal.cx> <20141005094913.GA7947@lst.de> <20141005161358.GW23797@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20141005161358.GW23797@brightrain.aerifal.cx> User-Agent: Mutt/1.5.17 (2007-11-01) On Sun, Oct 05, 2014 at 12:13:58PM -0400, Rich Felker wrote: > Yes, the lack of support for fchown, fchmod, fstat, fstatfs, fchdir, fstat, fstatfs and fchdir are already support on O_PATH descriptos, and below is an untested patch for fchmod and fchown. diff --git a/fs/open.c b/fs/open.c index d6fd3ac..ee24720 100644 --- a/fs/open.c +++ b/fs/open.c @@ -512,7 +512,7 @@ out_unlock: SYSCALL_DEFINE2(fchmod, unsigned int, fd, umode_t, mode) { - struct fd f = fdget(fd); + struct fd f = fdget_raw(fd); int err = -EBADF; if (f.file) { @@ -633,7 +633,7 @@ SYSCALL_DEFINE3(lchown, const char __user *, filename, uid_t, user, gid_t, group SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group) { - struct fd f = fdget(fd); + struct fd f = fdget_raw(fd); int error = -EBADF; if (!f.file)