Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
0f0f3204
Commit
0f0f3204
authored
Feb 22, 2007
by
Leigh B. Stoller
Browse files
Additional debugging measure; print all the arguments to the command,
not just the command name.
parent
01285412
Changes
1
Hide whitespace changes
Inline
Side-by-side
security/suexec.c
View file @
0f0f3204
...
...
@@ -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
"
,
target_uname
,
actual_uname
,
target_gname
,
actual_gname
,
cmd
);
{
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
)
break
;
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment