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

[TACACS+] Add plugin support to bash. #8660

Merged
merged 29 commits into from
Oct 11, 2021

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Sep 2, 2021

This pull request add plugin support library to bash.
And we will create a TACACS+ plugin for bash in an other PR, which will bring per command authorization feature to bash.

Why I did it

To support TACACS per command authorization, we check user command before execute it.

How I did it

Add plugin support to bash.

How to verify it

UT with CUnit under bash project cover all new code in plugin.c.
Also pass all current UT.

Which release branch to backport (provide reason below if selected)

N/A

Description for the changelog

Add plugin support to bash.

A picture of a cute animal (not mandatory but encouraged)

@liuh-80
Copy link
Contributor Author

liuh-80 commented Sep 2, 2021

Just a draft PR, need apply the diff file to bash source code and pass build.
Also CUnit UT need integrate to SONiC UTs.

rules/bash.mk Outdated Show resolved Hide resolved
rules/bash.mk Outdated Show resolved Hide resolved
src/bash/Makefile Outdated Show resolved Hide resolved
From b4962d09ab2d41a5e993bf3d8e4ebe32114999dc Mon Sep 17 00:00:00 2001
From: liuh-80 <58683130+liuh-80@users.noreply.github.com>
Date: Fri, 3 Sep 2021 14:05:36 +0800
Subject: [PATCH] Add plugin support to bash.
Copy link
Collaborator

Choose a reason for hiding this comment

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

bash

Please also submit a PR to upstream.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After check with liuxin about the license issue, will submit PR to bash.

src/bash/plugin.c Outdated Show resolved Hide resolved
src/bash/plugin.c Outdated Show resolved Hide resolved
src/bash/plugin.c Outdated Show resolved Hide resolved
src/bash/plugin.c Outdated Show resolved Hide resolved
src/bash/plugin.c Outdated Show resolved Hide resolved
src/bash/Makefile Outdated Show resolved Hide resolved
@liuh-80 liuh-80 marked this pull request as ready for review September 9, 2021 12:22
rules/bash.mk Outdated
# Bash complete release-number. This image contains all 4.3 fixes up to patch '42'.
BASH_VERSION_FULL = $(BASH_VERSION_MAJOR)-14
# Bash major release-number corresponding to Debian-10 (Buster)
BASH_VERSION_MAJOR = 5.0
Copy link
Collaborator

@qiluo-msft qiluo-msft Sep 18, 2021

Choose a reason for hiding this comment

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

5.0

Bullseye is using even newer version. It is not a good idea to build an old version for it. #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bullseye using 5.1-2+b3 version: https://packages.debian.org/stable/shells/bash
will change to this version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@liuh-80 liuh-80 merged commit 7d40384 into sonic-net:master Oct 11, 2021
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