[202012] [TACACS+]: Extract tacacs support functions into library and fix memory leak issue. (#8659)#15703
Merged
qiluo-msft merged 1 commit intosonic-net:202012from Jul 11, 2023
Conversation
…ry leak issue. (sonic-net#8659) This pull request extract tacacs support functions into library to share TACACS config file parse code with other project. Also fix memory leak issue in parse config code. Why I did it To support TACACS per command authorization, we need reuse the TACACS config file parse code in bash plugin project. How I did it Add libtacsupport.pc.in to extract tacacs support functions into library. Fix memory leak issue in TACACS config parse code by convert the dynamic memory allocation memory to static memory allocation. How to verify it Pass all current UT. Check shared library generated manually. Which release branch to backport (provide reason below if selected) N/A Description for the changelog Extract tacacs support functions into library, this will share TACACS config file parse code with other project. Also fix memory leak issue in parse config code.
liuh-80
commented
Jul 3, 2023
| @@ -1,20 +1,20 @@ | |||
| From 4ef102dfa137c2c6e3dd63c2d16f2966b6f5add8 Mon Sep 17 00:00:00 2001 | |||
Contributor
Author
There was a problem hiding this comment.
The reason for rename and change this file is:
This file been backport from master to 202012 by PR #10032
Because in master branch, this file been add after PR #8659, so when backport some code changed because #8659 not backport to 202012.
So, when backport PR #8659 to 202012 by current PR, we need change back this file. what I do is copy the file from master branch.
qiluo-msft
approved these changes
Jul 7, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request extract tacacs support functions into library to share TACACS config file parse code with other project. Also fix memory leak issue in parse config code.
Why I did it
To support TACACS per command authorization, we need reuse the TACACS config file parse code in bash plugin project.
Work item tracking
How I did it
Add libtacsupport.pc.in to extract tacacs support functions into library.
Fix memory leak issue in TACACS config parse code by convert the dynamic memory allocation memory to static memory allocation.
How to verify it
Pass all current UT.
Check shared library generated manually.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Extract tacacs support functions into library, this will share TACACS config file parse code with other project.
Also fix memory leak issue in parse config code.
Description for the changelog
Extract tacacs support functions into library, this will share TACACS config file parse code with other project.
Also fix memory leak issue in parse config code.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)