Package: acl / 2.3.2-3

Metadata

Package Version Patches format
acl 2.3.2-3 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
upstream/0001 libmisc __acl_get_uid fix memory wasting loop if use.patch | (download)

libmisc/uid_gid_lookup.c | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 [patch acl] libmisc: __acl_get_uid(): fix memory wasting loop if user
 does not exist

I noticed that `acl_from_text()` unexpectedly returns ENOMEM for invalid
user names. The reason for this is a missing break statement in the for
loop in `__acl_get_uid()`, which causes the loop to act as if ERANGE was
returned from `getpwnam_r()`, thereby exponentially increasing the
buffer size to (in my case) multiple gigabytes, until `grow_buffer()`
reports ENOMEM, which terminates the `__acl_get_uid()` function.

This is a pretty costly "no such user" lookup that can disturb a
process's heap memory management, but can also cause a process to fail
e.g. if it is multithreaded and other threads encounter an ENOMEM,
before `__acl_get_uid()` frees the gigantic heap buffer and returns.
The allocated memory isn't actually used. Therefore on Linux it should
not affect other processes by default, due to its overcommit memory
and lazy memory allocation strategy.

Fix this by properly terminating the for loop on any conditions except
an ERANGE error being reported. The same break statement correctly
exists in `__acl_get_gid()` already.

upstream/0001 Fix reference to renamed Makefile.examples.patch | (download)

examples/README | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch acl] fix reference to renamed `makefile.examples`

It was renamed to `Makefile` in c8f23c92177c5a82ab3699b1b0d4acbee9afb770.

local/0001 build Use LDLIBS instead of LDFLAGS for example Make.patch | (download)

examples/Makefile | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch acl] build: use ldlibs instead of ldflags for example makefile

Signed-off-by: Guillem Jover <guillem@hadrons.org>

local/getfacl fix uninitialized variable.patch | (download)

tools/getfacl.c | 2 2 + 0 - 0 !
1 file changed, 2 insertions(+)

 fix usage of uninitialized variable.