Skip to content

Commit

Permalink
Fix copy and paste error in the fix for GitHub issue #369
Browse files Browse the repository at this point in the history
Fixes GitHub issue #371
  • Loading branch information
millert committed Apr 28, 2024
1 parent 41978a5 commit e770c85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/sudoers/cvtsudoers_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ print_cmndspec_json(struct json_container *jsonc,
if (cs->runcwd != NULL) {
value.type = JSON_STRING;
value.u.string = cs->runcwd;
if (!sudo_json_add_value_as_object(jsonc, "runchroot", &value))
if (!sudo_json_add_value_as_object(jsonc, "runcwd", &value))
goto oom;
}
if (cs->timeout > 0) {
Expand Down
6 changes: 3 additions & 3 deletions plugins/sudoers/regress/sudoers/test24.json.ok
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{
"Options": [
{ "runchroot": "/var/www" },
{ "runchroot": "/htdocs" }
{ "runcwd": "/htdocs" }
],
"Commands": [
{ "command": "/bin/ksh" }
Expand All @@ -41,15 +41,15 @@
"Cmnd_Specs": [
{
"Options": [
{ "runchroot": "~root" }
{ "runcwd": "~root" }
],
"Commands": [
{ "command": "/usr/bin/id" }
]
},
{
"Options": [
{ "runchroot": "/tmp" }
{ "runcwd": "/tmp" }
],
"Commands": [
{ "command": "/bin/ls" }
Expand Down

0 comments on commit e770c85

Please sign in to comment.