aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-01-09 22:47:04 (GMT)
committerJouni Malinen <j@w1.fi>2019-01-09 22:47:04 (GMT)
commit8c70c304720ee882806ba6f70225635d3a20b0b7 (patch)
tree80a3702ab25143c865785f62bc4bdee0850cb512
parent11ce7a1bc3e2f5d38e8d34f2f0f031808acc0c2a (diff)
downloadhostap-8c70c304720ee882806ba6f70225635d3a20b0b7.zip
hostap-8c70c304720ee882806ba6f70225635d3a20b0b7.tar.gz
hostap-8c70c304720ee882806ba6f70225635d3a20b0b7.tar.bz2
HS 2.0 server: Log new username in eventlog for cert reenroll
Make it easier to find the new username (and the new serial number from it) when a user entry is renamed at the conclusion of client certificate re-enrollment sequence. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--hs20/server/spp_server.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hs20/server/spp_server.c b/hs20/server/spp_server.c
index 216297f..bb833bf 100644
--- a/hs20/server/spp_server.c
+++ b/hs20/server/spp_server.c
@@ -2658,6 +2658,7 @@ static xml_node_t * hs20_spp_update_response(struct hs20_svc *ctx,
dmacc);
if (oper == CERT_REENROLL) {
char *new_user;
+ char event[200];
new_user = db_get_session_val(ctx, NULL, NULL,
session_id, "user");
@@ -2678,6 +2679,10 @@ static xml_node_t * hs20_spp_update_response(struct hs20_svc *ctx,
debug_print(ctx, 1,
"Update certificate user entry to use the new serial number (old=%s new=%s)",
user, new_user);
+ os_snprintf(event, sizeof(event), "renamed user to: %s",
+ new_user);
+ hs20_eventlog(ctx, user, realm, session_id, event,
+ NULL);
if (db_update_val(ctx, user, realm, "identity",
new_user, 0) < 0 ||