Commit 0f0f3204 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Additional debugging measure; print all the arguments to the command,

not just the command name.
parent 01285412
......@@ -498,10 +498,27 @@ int main(int argc, char *argv[])
* Log the transaction here to be sure we have an open log
* before we setuid().
log_err("info: (target/actual) uid: (%s/%s) gid: (%s/%s) cmd: %s\n",
char argbuf[2*BUFSIZ], *bp = argbuf;
int i, size = sizeof(argbuf) - 1;
*bp = (char) NULL;
for (i = 4; i < argc; i++) {
int count = snprintf(bp, size, "%s ", argv[i]);
if (count >= size)
size -= count;
bp += count;
log_err("info: (target/actual) uid: (%s/%s) gid: (%s/%s) cmd: %s %s\n",
target_uname, actual_uname,
target_gname, actual_gname,
cmd, argbuf);
* Error out if attempt is made to execute as root or as
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment