From 8d15af786d96bb70aceca116a588c2a4b7c45d63 Mon Sep 17 00:00:00 2001 From: Branden Robinson Date: Fri, 17 Jul 2009 22:42:40 -0700 Subject: Use xdm's _SysErrorMsg() function instead of merely printing errno --- greeter/verify.c | 2 +- session.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/greeter/verify.c b/greeter/verify.c index b4fb850..73493ca 100644 --- a/greeter/verify.c +++ b/greeter/verify.c @@ -444,7 +444,7 @@ Verify (struct display *d, struct greet_info *greet, struct verify_info *verify) errno = 0; sp = getspnam(greet->name); if (sp == NULL) { - Debug ("getspnam() failed, errno=%d. Are you root?\n", errno); + Debug ("getspnam() failed: %s\n", _SysErrorMsg (errno)); } else { user_pass = sp->sp_pwdp; } diff --git a/session.c b/session.c index 7aabed3..b2c9294 100644 --- a/session.c +++ b/session.c @@ -677,7 +677,8 @@ StartClient ( * audit classes, user limits, and umask. */ if (setpcred(name, NULL) == -1) { - LogError ("setpcred for \"%s\" failed, errno=%d\n", name, errno); + LogError ("setpcred for \"%s\" failed: %s\n", name, + _SysErrorMsg (errno)); return (0); } #endif /* AIXV3 */ @@ -801,8 +802,8 @@ StartClient ( if (passwd != NULL) bzero(passwd, strlen(passwd)); Debug ("StartSession, fork failed\n"); - LogError ("can't start session on \"%s\", fork failed, errno=%d\n", - d->name, errno); + LogError ("can't start session on \"%s\", fork failed: %s\n", + d->name, _SysErrorMsg (errno)); return 0; default: if (passwd != NULL) -- cgit v1.2.3