Date: Sun, 13 Jul 2008 16:54:40 GMT From: rwatson@FreeBSD.org To: iusty@k1024.org, rwatson@FreeBSD.org, freebsd-bugs@FreeBSD.org, rwatson@FreeBSD.org Subject: Re: misc/125575: acl_valid() has wrong checks Message-ID: <200807131654.m6DGseI7082101@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
Synopsis: acl_valid() has wrong checks State-Changed-From-To: open->analyzed State-Changed-By: rwatson State-Changed-When: Sun Jul 13 16:53:23 UTC 2008 State-Changed-Why: I've reproduced this bug using libc on FreeBSD 7.0 and 8.x using Iustin's test program: #include <sys/types.h> #include <sys/acl.h> #include <stdio.h> #include <unistd.h> #include <sys/types.h> int main() { acl_t ma; acl_entry_t e; uid_t user=getuid(); ma = acl_from_text("u::rw,g::r,o::-"); if(ma==NULL) perror("acl_from_text"); if(acl_valid(ma)==-1) perror("initial acl is not valid"); if(acl_create_entry(&ma, &e)==-1) perror("acl_create_entry"); if(acl_set_tag_type(e, ACL_USER)==-1) perror("acl_set_tag_type"); if(acl_set_qualifier(e, &user)==-1) perror("acl_set_qualifier"); if(acl_calc_mask(&ma)==-1) perror("acl_calc_mask"); if(acl_valid(ma)==-1) perror("modified acl is not valid"); } Responsible-Changed-From-To: freebsd-bugs->rwatson Responsible-Changed-By: rwatson Responsible-Changed-When: Sun Jul 13 16:53:23 UTC 2008 Responsible-Changed-Why: Grab ownership of this PR since I wrote the code in question. http://www.freebsd.org/cgi/query-pr.cgi?pr=125575
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807131654.m6DGseI7082101>