From f21fba65f194ff26bf72e23f0db311314529720b Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 5 Oct 2007 02:15:27 +0000 Subject: Refactor the remctl calls in the wallet client to share a common routine. --- client/internal.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'client/internal.h') diff --git a/client/internal.h b/client/internal.h index 092240e..960554e 100644 --- a/client/internal.h +++ b/client/internal.h @@ -27,6 +27,14 @@ struct remctl; BEGIN_DECLS +/* Given a remctl object, run a remctl command. If data is non-NULL, saves + the standard output from the command into data with the length in length. + Otherwise, prints it to standard output. Either way, prints standard error + output and errors to standard error and returns the exit status or 255 for + a remctl internal error. */ +int run_command(struct remctl *, const char **command, char **data, + size_t *length); + /* Given a remctl object, the type for the wallet interface, the name of a keytab object, and a file name, call the correct wallet commands to download a keytab and write it to that file. */ -- cgit v1.2.3