aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--client/keytab.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 49277ad..58f16f5 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,10 @@ wallet 0.6 (unreleased)
type from krb5.conf as well as from compile-time defaults and
command-line options.
+ When getting a keytab with the client with no -f option, correctly
+ write the keytab to standard output rather than dying with a cryptic
+ error.
+
The build system now probes for GSS-API, Kerberos v5 and v4, and AFS
libraries as necessary rather than hard-coding libraries. Building
on systems without strong shared library dependencies and building
diff --git a/client/keytab.c b/client/keytab.c
index 04b34c9..7554f50 100644
--- a/client/keytab.c
+++ b/client/keytab.c
@@ -79,7 +79,12 @@ get_keytab(struct remctl *r, krb5_context ctx, const char *type,
warn("no data returned by wallet server");
return 255;
}
- write_file(file, data, length);
+ if (file != NULL)
+ write_file(file, data, length);
+ else {
+ if (fwrite(data, length, 1, stdout) != 1)
+ sysdie("write to standard output failed");
+ }
if (srvtab != NULL)
write_srvtab(ctx, srvtab, name, file);
return 0;