From owner-freebsd-amd64@freebsd.org Sun Oct 23 03:48:33 2016 Return-Path: Delivered-To: freebsd-amd64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD268C13A91 for ; Sun, 23 Oct 2016 03:48:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82BBD146 for ; Sun, 23 Oct 2016 03:48:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u9N3mXZb032013 for ; Sun, 23 Oct 2016 03:48:33 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-amd64@FreeBSD.org Subject: [Bug 213714] getcwd(3) returns EACCES on ZFS when normalization is not none and any parent dir does not have read permission Date: Sun, 23 Oct 2016 03:48:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: cynix@me.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2016 03:48:33 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213714 Bug ID: 213714 Summary: getcwd(3) returns EACCES on ZFS when normalization is not none and any parent dir does not have read permission Product: Base System Version: 11.0-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Many People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: cynix@me.com CC: freebsd-amd64@FreeBSD.org CC: freebsd-amd64@FreeBSD.org On 11.0-RELEASE-p1, getcwd(3) returns EACCES under the following conditions: * Current directory is under a ZFS filesystem (seems to also affect other filesystems mounted under ZFS root). * The ZFS dataset's "normalization" property is not "none" (can be any of formC/formD/formKC/formKD). * Any parent directory in the path does not have read permission for the us= er. Whereas on 10.3 (I have tested 10.3-RELEASE-p5 and earlier) it would succeed and populate the correct full path. For example: # zfs create -o normalization=3DformD z/test1 # mkdir -m711 /test1/foo # mkdir /test1/foo/bar # chown nobody /test1/foo/bar # cd /test1/foo/bar # su -m nobody % /bin/pwd pwd: .: Permission denied The problem does not occur if normoalization is none: # zfs create -o normalization=3Dnone z/test2 # mkdir -m711 /test2/foo # mkdir /test2/foo/bar # chown nobody /test2/foo/bar # cd /test2/foo/bar # su -m nobody % /bin/pwd /test2/foo/bar It seems that zfs_acl_next_ace() for the parent dir returns an access_mask = of 0x1200af when normalization is none, and 0x1200a8 otherwise, all else being equal. --=20 You are receiving this mail because: You are on the CC list for the bug.=