First cut at session logging for sudo. Still need to write get_pty()
for Unix 98 and old-style BSD ptys. Also needs documentation and general cleanup.
This commit is contained in:
9
parse.c
9
parse.c
@@ -254,6 +254,8 @@ sudo_file_lookup(nss, validated, pwflag)
|
||||
def_noexec = tags->noexec;
|
||||
if (tags->setenv != UNSPEC)
|
||||
def_setenv = tags->setenv;
|
||||
if (tags->script != UNSPEC)
|
||||
def_script = tags->script;
|
||||
}
|
||||
} else if (match == DENY) {
|
||||
SET(validated, VALIDATE_NOT_OK);
|
||||
@@ -295,6 +297,11 @@ sudo_file_append_cmnd(cs, tags, lbuf)
|
||||
"PASSWD: ", NULL);
|
||||
tags->nopasswd = cs->tags.nopasswd;
|
||||
}
|
||||
if (TAG_CHANGED(script)) {
|
||||
lbuf_append(lbuf, cs->tags.script ? "SCRIPT: " :
|
||||
"NOSCRIPT: ", NULL);
|
||||
tags->script = cs->tags.script;
|
||||
}
|
||||
m = cs->cmnd;
|
||||
print_member(lbuf, m->name, m->type, m->negated,
|
||||
CMNDALIAS);
|
||||
@@ -316,6 +323,7 @@ sudo_file_display_priv_short(pw, us, lbuf)
|
||||
tags.noexec = UNSPEC;
|
||||
tags.setenv = UNSPEC;
|
||||
tags.nopasswd = UNSPEC;
|
||||
tags.script = UNSPEC;
|
||||
lbuf_append(lbuf, " ", NULL);
|
||||
tq_foreach_fwd(&priv->cmndlist, cs) {
|
||||
if (cs != tq_first(&priv->cmndlist))
|
||||
@@ -367,6 +375,7 @@ sudo_file_display_priv_long(pw, us, lbuf)
|
||||
tags.noexec = UNSPEC;
|
||||
tags.setenv = UNSPEC;
|
||||
tags.nopasswd = UNSPEC;
|
||||
tags.script = UNSPEC;
|
||||
lbuf_print(lbuf); /* force a newline */
|
||||
lbuf_append(lbuf, "Sudoers entry:", NULL);
|
||||
lbuf_print(lbuf);
|
||||
|
Reference in New Issue
Block a user