From owner-freebsd-current@FreeBSD.ORG Wed Jul 23 23:55:39 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C3ECF37B401 for ; Wed, 23 Jul 2003 23:55:39 -0700 (PDT) Received: from genesis.ridley.unimelb.edu.au (genesis.ridley.unimelb.edu.au [128.250.2.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAB7E43FBD for ; Wed, 23 Jul 2003 23:55:38 -0700 (PDT) (envelope-from grg@ridley.unimelb.edu.au) Received: (from root@localhost) by genesis.ridley.unimelb.edu.au (8.12.3p2/8.11.6) id h6O6tcs8002007 for freebsd-current@freebsd.org; Thu, 24 Jul 2003 16:55:38 +1000 (EST) (envelope-from grg@ridley.unimelb.edu.au) Received: from genesis.ridley.unimelb.edu.au (localhost [127.0.0.1]) h6O6tZn3001998 for ; Thu, 24 Jul 2003 16:55:36 +1000 (EST) (envelope-from grg@ridley.unimelb.edu.au) Received: from localhost (grg@localhost)id h6O6tZOd001995 for ; Thu, 24 Jul 2003 16:55:35 +1000 (EST) (envelope-from grg@ridley.unimelb.edu.au) X-Authentication-Warning: genesis.ridley.unimelb.edu.au: grg owned process doing -bs Date: Thu, 24 Jul 2003 16:55:35 +1000 (EST) From: Glen Gibb To: freebsd-current@freebsd.org Message-ID: <20030724165507.S21826-200000@genesis.ridley.unimelb.edu.au> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1137146798-1059029735=:21826" X-Virus-Scanned: by AMaViS perl-11 Subject: Possible problem with ACL masks and getfacl (fwd) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2003 06:55:40 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-1137146798-1059029735=:21826 Content-Type: TEXT/PLAIN; charset=US-ASCII Whoops - it helps if I attach the patch :) Glen ---------- Forwarded message ---------- Date: Thu, 24 Jul 2003 16:54:55 +1000 (EST) From: Glen Gibb To: freebsd-current@freebsd.org Subject: Possible problem with ACL masks and getfacl Hi all, I'm not sure if this is a real problem or not, but if I set a group ACL on a file, and then set a mask, when running getfacl the group names are not listed. I'm running 5.1 RELEASE. The following sequence commands show the problem (I create a file, display the ACL, set a group ACL, display the ACL, set a mask, and then display the ACL again. The problem is with the final display - the group name is not displayed). # touch testfile # getfacl testfile #file:testfile #owner:0 #group:0 user::rw- group::r-- other::r-- # setfacl -m g:staff:rwx testfile # getfacl testfile #file:testfile #owner:0 #group:0 user::rw- group::r-- group:staff:rwx mask::rwx other::r-- # setfacl -m m::rx testfile # getfacl testfile #file:testfile #owner:0 #group:0 user::rw- group::r-- group::rwx # effective: r-x mask::r-x other::r-- Attached is a proposed patch to lib/libc/posix1e/acl_to_text.c to correct this problem. Please note that this patch has not been tested as the computer I'm testing on won't build world :( (cheap computer with cheap components). The source used is actually CURRENT as of Tuesday July 22nd. I admit that there may be a reason why the user name is not shown which I don't know about :). Feedback is greatly appreciated. Glen Gibb --0-1137146798-1059029735=:21826 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="acl_to_text.c.diff" Content-Transfer-Encoding: BASE64 Content-ID: <20030724165535.U21826@genesis.ridley.unimelb.edu.au> Content-Description: Content-Disposition: attachment; filename="acl_to_text.c.diff" LS0tIC91c3Ivc3JjL2xpYi9saWJjL3Bvc2l4MWUvYWNsX3RvX3RleHQuYy5v cmlnCVRodSBKdWwgMjQgMTY6NDc6NDEgMjAwMw0KKysrIC91c3Ivc3JjL2xp Yi9saWJjL3Bvc2l4MWUvYWNsX3RvX3RleHQuYwlUaHUgSnVsIDI0IDE2OjQ4 OjEyIDIwMDMNCkBAIC0xNzcsOSArMTc3LDEwIEBADQogCQkJCSAgICBlZmZl Y3RpdmVfcGVybV9idWYpOw0KIAkJCQlpZiAoZXJyb3IpDQogCQkJCQlnb3Rv IGVycm9yX2xhYmVsOw0KLQkJCQlsZW4gPSBhc3ByaW50ZigmdG1wYnVmLCAi JXNncm91cDo6JXNcdFx0IyAiDQorCQkJCWxlbiA9IGFzcHJpbnRmKCZ0bXBi dWYsICIlc2dyb3VwOiVzOiVzXHRcdCMgIg0KIAkJCQkgICAgImVmZmVjdGl2 ZTogJXNcbiIsDQotCQkJCSAgICBidWYsIHBlcm1fYnVmLCBlZmZlY3RpdmVf cGVybV9idWYpOw0KKwkJCQkgICAgYnVmLCBuYW1lX2J1ZiwgcGVybV9idWYs IA0KKwkJCQkgICAgZWZmZWN0aXZlX3Blcm1fYnVmKTsNCiAJCQl9IGVsc2Ug ew0KIAkJCQlsZW4gPSBhc3ByaW50ZigmdG1wYnVmLCAiJXNncm91cDolczol c1xuIiwgYnVmLA0KIAkJCQkgICAgbmFtZV9idWYsIHBlcm1fYnVmKTsNCg== --0-1137146798-1059029735=:21826--