From 55fdd1884bd9e6470c05ae495907db86b80f9d8c Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Wed, 17 Jul 2024 20:49:37 -0700 Subject: [PATCH] bozo: Make SBOZO_Exec comments more helpful It seems that some early authors had a conversation with each other in the comments (including some typos), but since the RPC semantics are now locked in, we should just describe what's happening and how it could change in the future (which seems unlikely, in any case). Change-Id: Ic959e662609427ac873e554369cb4d2bdb6a2558 Reviewed-on: https://gerrit.openafs.org/15791 Tested-by: BuildBot Reviewed-by: Michael Meffie --- src/bozo/bosoprocs.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/bozo/bosoprocs.c b/src/bozo/bosoprocs.c index 5ada424a11..0e1044527a 100644 --- a/src/bozo/bosoprocs.c +++ b/src/bozo/bosoprocs.c @@ -127,8 +127,16 @@ SBOZO_Exec(struct rx_call *acall, char *acmd) if (DoLogging) ViceLog(0, ("%s is executing the shell command '%s'\n", caller, acmd)); - /* should copy output to acall, but don't yet cause its hard */ - /* hard... NOT! Nnow _at least_ return the exit status */ + /* + * The BOZO_Exec() interface does not include provision for reading + * data and attaching it to stdin of the exec()'d process, or for + * relaying stdout or stderr of the exec()'d process to the Rx reply + * stream, so all we can do is relay the exit status as the RPC return + * code. In theory a new RPC could be defined that has such semantics + * but given the ubiquity of ssh and fleet automation tooling it does + * not seem necessary to incorporate such functionality into the OpenAFS + * tooling directly. + */ code = system(acmd); osi_auditU(acall, BOS_ExecEvent, code, AUD_STR, acmd, AUD_END);