HomeClusterLabs Projects

Log: libcib: Drop crm_perror() in get_shadow_file()

Description

Log: libcib: Drop crm_perror() in get_shadow_file()

  • Set errno to 0 before calling getpwuid(), as the man page instructs.
  • Improve error message, noting that errno might not get set.
  • Use correct format specifier for uid_t.
  • Drop from error level to warning level.

The only thing we lose here is writing the message to stderr for CLI
tools. However, CLI tools have verbose options. This should be a pretty
rare condition anyway.

Ref T172

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Wed, Aug 6, 8:45 PM
Parents
rP76b1ba7708ba: Log: libcrmcommon: Drop crm_perror() in io.c
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task