Closed william-billaud closed 1 month ago
In branch 2.x the fix may be a simple change of the regex in https://github.com/tclahr/uac/blob/2647c128a55f79cbe83fa9c4186b545b193a7331/lib/get_user_home_list.sh#L87 by
grep -v -E "^:" "${TEMP_DATA_DIR}/.user_home_list.tmp" | grep -v -E ":$" | sort -u
As the project is are under a massive rework, I'm not sure you'll want a PR to correct it.
You are right. The issue applies to old grep versions. I tested the code from the develop branch and it seems to work properly on a centos6.8 container. Can you confirm that?
Also, the plan is to release the new UAC v3 RC1 next week (which fixes this issue), so I see no reasons to fix this in v2.
Thanks!
According to my test this work properly on centos 6.8 (vm not a containers sharing the same kernel as the host).
Another small "bug" I'have found is than the zip binary won't work on really old kernel (eg 2.6.x) because kernel is too old (like statx, but a check is made to ensure than statx can run before use it).
FATAL: kernel too old
Abort trap (core dumped)
Because of this the collection will fail to complete. The workaround is easy (launch with tar.gz output format) but it's would be nice to have an automatic fallback in case of failure (even if it's not a high priority issue).
Thanks for your work
Yes, I noticed this occurring in FreeBSD and NetScaler as well (depending on the system architecture). I pushed a new code to develop that checks whether the zip binary provided by UAC runs properly in the target system before adding its path to PATH. This makes UAC to quit with an error message before the collection starts if zip fails to run.
Let me know if you find any issues.
Thanks for all you support on this.
Everything work, it's even use the machine zip
if available.
I close the issue as it will be resolved in next release. Thanks again for your work.
On some version of grep (eg 2.20, present on centos6 or rhel 6) the regexp used to retrieve user home from
.user_home_list.tmp
fail :even if the bug comes from grep, it would be nice if uac could still retrieve the user_home file as expected.