This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: C11 threads ABI questions - enum values
- From: Christoph Hellwig <hch at lst dot de>
- To: Rich Felker <dalias at libc dot org>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, Roland McGrath <roland at hack dot frob dot com>, libc-alpha at sourceware dot org
- Date: Sun, 5 Oct 2014 18:23:17 +0200
- Subject: Re: C11 threads ABI questions - enum values
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1410031038300 dot 26280 at digraph dot polyomino dot org dot uk> <20141003151917 dot GS23797 at brightrain dot aerifal dot cx> <Pine dot LNX dot 4 dot 64 dot 1410031527460 dot 14538 at digraph dot polyomino dot org dot uk> <20141003153248 dot GT23797 at brightrain dot aerifal dot cx> <20141003183910 dot GA8806 at lst dot de> <20141003194932 dot GU23797 at brightrain dot aerifal dot cx> <20141004175346 dot GA23717 at lst dot de> <20141004225756 dot GV23797 at brightrain dot aerifal dot cx> <20141005094913 dot GA7947 at lst dot de> <20141005161358 dot GW23797 at brightrain dot aerifal dot cx>
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)