Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170528020421.GE1627@brightrain.aerifal.cx>
Date: Sat, 27 May 2017 22:04:21 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] fix fchown fallback on arches without chown(2)

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.