From a10ccbdec38c0e012eb86ceaa73422baabe12843 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Tue, 28 Dec 2010 02:52:21 -0800 Subject: Error message idiocy. --- pinyweb/debian/changelog | 6 ++++++ pinyweb/suid/piny-suid.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pinyweb/debian/changelog b/pinyweb/debian/changelog index 8ea9181..958418b 100644 --- a/pinyweb/debian/changelog +++ b/pinyweb/debian/changelog @@ -1,3 +1,9 @@ +pinyweb (0.4) unstable; urgency=low + + * Fix some stupid error messages. + + -- Julian Blake Kongslie Tue, 28 Dec 2010 02:52:08 -0800 + pinyweb (0.3) unstable; urgency=low * Actually do the suid thing. diff --git a/pinyweb/suid/piny-suid.c b/pinyweb/suid/piny-suid.c index 251e3e1..6c63089 100644 --- a/pinyweb/suid/piny-suid.c +++ b/pinyweb/suid/piny-suid.c @@ -91,14 +91,14 @@ int main( int argc, char *argv[] ) { if ( setregid( pwd->pw_gid, pwd->pw_gid ) != 0 ) { err = errno; - syslog( LOG_ERR, "Unable to change GID: %s, %s", argv[2], strerror( err ) ); + syslog( LOG_ERR, "Unable to change GID: %s, %s", argv[1], strerror( err ) ); fprintf( stderr, "Unable to change GID: %s\n", strerror( err ) ); return 1; }; if ( setreuid( pwd->pw_uid, pwd->pw_uid ) != 0 ) { err = errno; - syslog( LOG_ERR, "Unable to change UID: %s, %s", argv[2], strerror( err ) ); + syslog( LOG_ERR, "Unable to change UID: %s, %s", argv[1], strerror( err ) ); fprintf( stderr, "Unable to change UID: %s\n", strerror( err ) ); return 1; }; @@ -111,7 +111,7 @@ int main( int argc, char *argv[] ) { { NULL }; - syslog( LOG_NOTICE, "Going to exec '%s' as '%s'", argv[2], argv[1] ); + syslog( LOG_NOTICE, "Going to exec '%s' as '%s'", buf, argv[1] ); execve( buf, argv + 2, env ); syslog( LOG_ERR, "Invalid command '%s' (fell past exec)", argv[2] ); -- cgit v1.2.3