diff options
Diffstat (limited to 'pinyweb/suid/piny-suid.c')
-rw-r--r-- | pinyweb/suid/piny-suid.c | 6 |
1 files changed, 3 insertions, 3 deletions
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] ); |