Fail fast if not authenticated
authorMichael Spang <mspang@uwaterloo.ca>
Sat, 24 Oct 2009 16:24:07 +0000 (12:24 -0400)
committerMichael Spang <mspang@uwaterloo.ca>
Sat, 24 Oct 2009 16:24:07 +0000 (12:24 -0400)
src/gss.c

index f1a404b..c963d48 100644 (file)
--- a/src/gss.c
+++ b/src/gss.c
@@ -223,10 +223,14 @@ int initial_client_token(gss_buffer_t outgoing_tok) {
 }
 
 char *client_principal(void) {
+    if (!complete)
+        fatal("authentication checked before finishing");
     return peer_principal;
 }
 
 char *client_username(void) {
+    if (!complete)
+        fatal("authentication checked before finishing");
     return peer_username;
 }