From 86bce23e53e6cc89ed5104b21a5fe33fab5a7a9f Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 24 Apr 2008 23:05:14 +0000 Subject: The wallet command-line client now reads the data for store from a file (using -f) or from standard input (if -f wasn't given) when the data isn't specified on the command line. The data still must not contain nul characters. --- 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 64fad04..e55f2b8 100644 --- a/client/internal.h +++ b/client/internal.h @@ -90,6 +90,14 @@ void write_file(const char *name, const void *data, size_t length); void write_srvtab(krb5_context, const char *srvtab, const char *principal, const char *keytab); +/* + * Read all of a file into memory and return the contents as a newly allocated + * string. Handles a file name of "-" to mean standard input. Dies on any + * failure. This will need modification later when we want to handle nul + * characters. + */ +char *read_file(const char *); + END_DECLS #endif /* !CLIENT_INTERNAL_H */ -- cgit v1.2.3