Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsemanage: Always set errno to 0 before calling getpwent()
The manpage explicitly states that: The getpwent() function returns a pointer to a passwd structure, or NULL if there are no more entries or an error occurred. If an error occurs, errno is set appropriately. If one wants to check errno after the call, it should be set to zero before the call. Without this, genhomedircon can wrongly return the following: libsemanage.get_home_dirs: Error while fetching users. Returning list so far. SELinuxProject#121 Signed-off-by: Laurent Bigonville <bigon@bigon.be>
- Loading branch information