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/suid/piny-suid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pinyweb/suid/piny-suid.c') 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