]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HS 2.0 server: Log new username in eventlog for cert reenroll
authorJouni Malinen <jouni@codeaurora.org>
Wed, 9 Jan 2019 22:47:04 +0000 (00:47 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 9 Jan 2019 22:47:04 +0000 (00:47 +0200)
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>
hs20/server/spp_server.c

index 216297fd3ea3bf76bd7ef5b2014c6dd003cafd46..bb833bff13952572af26e625547cba94184cef54 100644 (file)
@@ -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 ||