summaryrefslogtreecommitdiff
path: root/server/client.c
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1987-07-24 11:12:57 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1987-07-24 11:12:57 +0000
commit62f77758f6dd70240600064e36352f9b126d5881 (patch)
tree6bcfc7a684460e9fa22e14d2481b6643504b4665 /server/client.c
parent782e5dc279943edead1f0f9833ca27ec3474c8ae (diff)
We need to save and free the client's kerberos principal
Diffstat (limited to 'server/client.c')
-rw-r--r--server/client.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/server/client.c b/server/client.c
index 2ccd635..d15e48a 100644
--- a/server/client.c
+++ b/server/client.c
@@ -39,6 +39,8 @@ static char rcsid_client_s_c[] = "$Header$";
#include "zserver.h"
#include <sys/socket.h>
+static void clt_free();
+
/*
* register a client: allocate space, find or insert the address in the
* server's list of hosts, initialize and insert the client into
@@ -95,6 +97,8 @@ ZServerDesc_t *server;
(*client)->zct_sin.sin_port = notice->z_port;
(*client)->zct_sin.sin_family = AF_INET;
(*client)->zct_subs = NULLZST;
+ (*client)->zct_subs = NULLZST;
+ (*client)->zct_principal = strsave(notice->z_sender);
/* chain him in to the clients list in the host list*/
@@ -130,7 +134,7 @@ ZHostList_t *host;
clients = clients->q_forw)
if (clients->zclt_client == client) {
xremque(clients);
- xfree(client);
+ clt_free(client);
xfree(clients);
return;
}
@@ -172,3 +176,14 @@ ZNotice_t *notice;
return(NULLZCNT);
}
+/*
+ * Free storage in use by client
+ */
+
+static void
+clt_free(client)
+ZClient_t *client;
+{
+ xfree(client->zct_principal);
+ xfree(client);
+}