From: Alan T. DeKok Date: Mon, 30 Jan 2023 00:27:49 +0000 (-0500) Subject: it helps to set the value for State X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=beaf1f8cec042cc019c500bdd4b443865d842cc3;p=thirdparty%2Ffreeradius-server.git it helps to set the value for State --- diff --git a/src/process/tacacs/base.c b/src/process/tacacs/base.c index 552e939060d..d2395323eee 100644 --- a/src/process/tacacs/base.c +++ b/src/process/tacacs/base.c @@ -332,6 +332,9 @@ static void CC_HINT(format (printf, 4, 5)) auth_message(process_tacacs_auth_t co talloc_free(msg); } +/* + * Synthesize a State attribute from connection && session information. + */ static int state_create(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *request, bool reply) { uint8_t buffer[12]; @@ -367,6 +370,8 @@ static int state_create(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *request vp = fr_pair_afrom_da(ctx, attr_tacacs_state); if (!vp) return -1; + (void) fr_pair_value_memdup(vp, buffer, 12, false); + fr_pair_append(out, vp); return 0;