Signed-off-by: Jan Safranek <jsafr...@redhat.com> --- tests/setuid.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/tests/setuid.c b/tests/setuid.c index c824511..02916e4 100644 --- a/tests/setuid.c +++ b/tests/setuid.c @@ -43,6 +43,12 @@ int main(int argc, char *argv[]) } pwd = getpwnam(argv[1]); + if (!pwd) { + fprintf(stderr, "getpwnam() failed: %s\n", + strerror(errno)); + ret = -errno; + goto finished; + } uid = pwd->pw_uid; fprintf(stdout, "Setting UID to %s (%d).\n", pwd->pw_name, uid); if ((ret = setuid(uid))) { ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel