Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
acl
libacl-fix-sigsegv-of-getfacl-e-on-overly-long-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libacl-fix-sigsegv-of-getfacl-e-on-overly-long-group-name.patch of Package acl
From: Kamil Dudka <kdudka@redhat.com> Date: Thu, 31 Oct 2013 19:24:35 +0100 Subject: libacl: fix SIGSEGV of getfacl -e on overly long group name Git-repo: git://git.savannah.nongnu.org/acl.git Git-commit: fb071c302b8cad8837bc1e57407dc3ffa14d3f99 References: bsc#945899 We simply make sure that at least one tab is used for indentation. Acked-by: Jeff Mahoney <jeffm@suse.com> --- libacl/__acl_to_any_text.c | 5 +++++ test/root/getfacl.test | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/libacl/__acl_to_any_text.c b/libacl/__acl_to_any_text.c index a4f9c34..1d10e81 100644 --- a/libacl/__acl_to_any_text.c +++ b/libacl/__acl_to_any_text.c @@ -247,6 +247,11 @@ acl_entry_to_any_str(const acl_entry_t entry_d, char *text_p, ssize_t size, options & TEXT_ALL_EFFECTIVE) { x = (options & TEXT_SMART_INDENT) ? ((text_p - orig_text_p)/8) : TABS-1; + + /* use at least one tab for indentation */ + if (x > (TABS-1)) + x = (TABS-1); + strncpy(text_p, tabs+x, size); ADVANCE(TABS-x); diff --git a/test/root/getfacl.test b/test/root/getfacl.test new file mode 100644 index 0000000..f84e25d --- /dev/null +++ b/test/root/getfacl.test @@ -0,0 +1,17 @@ +Make sure that getfacl always adds at least one space between the permissions +in an acl entry and the effective permissions comment. + + $ umask 022 + $ mkdir d + $ groupadd loooooooooooooooooooooooonggroup + $ setfacl -dm group:loooooooooooooooooooooooonggroup:rwx d + $ getfacl -cde d + > user::rwx + > group::r-x #effective:r-x + > group:loooooooooooooooooooooooonggroup:rwx #effective:rwx + > mask::rwx + > other::r-x + > + + $ groupdel loooooooooooooooooooooooonggroup + $ rm -r d
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor