Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[202012] [TACACS+]: Extract tacacs support functions into library and fix memory leak issue. (#8659) #15703

Merged

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Jul 3, 2023

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
  • Microsoft ADO (number only): 24433713

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)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

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.

  • SONiC.202012-15703.306864-1ef589c19

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)

…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.
@@ -1,20 +1,20 @@
From 4ef102dfa137c2c6e3dd63c2d16f2966b6f5add8 Mon Sep 17 00:00:00 2001
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@liuh-80 liuh-80 marked this pull request as ready for review July 3, 2023 07:55
@liuh-80 liuh-80 requested review from qiluo-msft and yxieca and removed request for yxieca July 3, 2023 07:56
@qiluo-msft qiluo-msft merged commit f75794a into sonic-net:202012 Jul 11, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants