]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Fix error message when getpwuid_r fails to find the user
authorPeter Krempa <pkrempa@redhat.com>
Tue, 28 Aug 2012 14:51:05 +0000 (16:51 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 28 Aug 2012 16:36:57 +0000 (18:36 +0200)
commitf2bb32b1d2443b74cdc6d482697332862adfc769
tree3e0e68d6161bd9253bbba621c419a61e509fa1fc
parenta22909d5c2fd9ec6d55c4f57c64f111014d3cfa8
util: Fix error message when getpwuid_r fails to find the user

getpwuid_r returns success but sets the return structure to NULL when it
fails to deliver data about the requested uid. In our helper code this
created following strange error messages:

" ... cannot getpwuid_r(1234): Success"

This patch creates a more helpful message:
" ... getpwuid_r failed to retrieve data for uid '1234'"
src/util/util.c