summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@sudo.ws>2022-06-30 13:35:07 -0600
committerTodd C. Miller <Todd.Miller@sudo.ws>2022-06-30 13:35:07 -0600
commit8d6b9fab1a4198dd68a8eea8ac622ce92143bf6d (patch)
tree186806462d3a3bec07e303fef76b3f7b7aff5e3f /include
parent0193ff5d0503a258151f124a35b190314ca80c40 (diff)
downloadsudo-8d6b9fab1a4198dd68a8eea8ac622ce92143bf6d.tar.gz
Stop sending an InterceptResponse to a PolicyCheckRequest for log_subcmds.
There's no real reason for the command to wait for sudo send back a response that will always be a PolicyAcceptMessage.
Diffstat (limited to 'include')
-rw-r--r--include/intercept.pb-c.h4
-rw-r--r--include/sudo_event.h3
2 files changed, 6 insertions, 1 deletions
diff --git a/include/intercept.pb-c.h b/include/intercept.pb-c.h
index 9d6390b8b..2ea168329 100644
--- a/include/intercept.pb-c.h
+++ b/include/intercept.pb-c.h
@@ -72,6 +72,7 @@ struct InterceptHello
/*
* Sudo response to an InterceptHello from sudo_intercept.so.
* The client uses the port number and token to connect back to sudo.
+ * If log_only is set there is no InterceptResponse to a PolicyCheckRequest.
*/
struct HelloResponse
{
@@ -79,10 +80,11 @@ struct HelloResponse
uint64_t token_lo;
uint64_t token_hi;
int32_t portno;
+ protobuf_c_boolean log_only;
};
#define HELLO_RESPONSE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&hello_response__descriptor) \
- , 0, 0, 0 }
+ , 0, 0, 0, 0 }
/*
diff --git a/include/sudo_event.h b/include/sudo_event.h
index 12bb89478..67dfb20bd 100644
--- a/include/sudo_event.h
+++ b/include/sudo_event.h
@@ -192,6 +192,9 @@ sudo_dso_public bool sudo_ev_got_break_v1(struct sudo_event_base *base);
/* Return the base an event is associated with or NULL. */
#define sudo_ev_get_base(_ev) ((_ev) ? (_ev)->base : NULL)
+/* Set the base an event is associated with. */
+#define sudo_ev_set_base(_ev, _b) ((_ev)->base = (_b))
+
/* Magic pointer value to use self pointer as callback arg. */
#define sudo_ev_self_cbarg() ((void *)-1)