diff options
author | Russ Allbery <rra@stanford.edu> | 2008-04-24 23:05:14 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2008-04-24 23:05:14 +0000 |
commit | 86bce23e53e6cc89ed5104b21a5fe33fab5a7a9f (patch) | |
tree | c8c352137a41c5e8da8e46dd880252a30132c89e /client/internal.h | |
parent | a93ca104c89859e1022c818579f81f528be204b5 (diff) |
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.
Diffstat (limited to 'client/internal.h')
-rw-r--r-- | client/internal.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 */ |