diff --git a/.azure-pipelines/azure-pipelines-Official.yml b/.azure-pipelines/azure-pipelines-Official.yml index a5a08167ca..56d88751f6 100644 --- a/.azure-pipelines/azure-pipelines-Official.yml +++ b/.azure-pipelines/azure-pipelines-Official.yml @@ -14,7 +14,7 @@ schedules: - 202012 always: true -pool: sonicbld +pool: sonicbld-1es stages: - stage: Build diff --git a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml index 6800b0c8e0..efae842436 100644 --- a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml +++ b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml @@ -26,7 +26,7 @@ resources: ref: master endpoint: sonic-net -pool: sonicbld +pool: sonicbld-1es parameters: - name: 'jobFilters' diff --git a/.azure-pipelines/build-template.yml b/.azure-pipelines/build-template.yml index 43db5720a3..a32f010abf 100644 --- a/.azure-pipelines/build-template.yml +++ b/.azure-pipelines/build-template.yml @@ -35,9 +35,9 @@ parameters: - name: pool type: string values: - - sonicbld + - sonicbld-1es - sonicbld_8c - default: sonicbld + default: sonicbld-1es - name: dbg_image type: boolean diff --git a/.azure-pipelines/docker-sonic-mgmt.yml b/.azure-pipelines/docker-sonic-mgmt.yml index 34adf9d5d4..0383ac14e4 100644 --- a/.azure-pipelines/docker-sonic-mgmt.yml +++ b/.azure-pipelines/docker-sonic-mgmt.yml @@ -32,7 +32,7 @@ stages: - stage: Build jobs: - job: Build - pool: sonicbld + pool: sonicbld-1es timeoutInMinutes: 360 steps: - template: cleanup.yml diff --git a/.azure-pipelines/docker-sonic-slave-template.yml b/.azure-pipelines/docker-sonic-slave-template.yml index 063f754531..909f1ce0bc 100644 --- a/.azure-pipelines/docker-sonic-slave-template.yml +++ b/.azure-pipelines/docker-sonic-slave-template.yml @@ -28,9 +28,9 @@ parameters: default: sonicdev - name: pool type: string - default: sonicbld + default: sonicbld-1es values: - - sonicbld + - sonicbld-1es - sonicbld-arm64 - sonicbld-armhf diff --git a/.azure-pipelines/docker-sonic-slave.yml b/.azure-pipelines/docker-sonic-slave.yml index 4c679f7f95..332d6c4932 100644 --- a/.azure-pipelines/docker-sonic-slave.yml +++ b/.azure-pipelines/docker-sonic-slave.yml @@ -63,7 +63,7 @@ stages: - ${{ each arch in parameters.arches }}: - template: .azure-pipelines/docker-sonic-slave-template.yml@buildimage parameters: - pool: sonicbld + pool: sonicbld-1es arch: ${{ arch }} dist: ${{ dist }} ${{ if ne(arch, 'amd64') }}: diff --git a/.azure-pipelines/dpkg-cache-cleanup.yml b/.azure-pipelines/dpkg-cache-cleanup.yml index 2789d18188..52b0e866a6 100644 --- a/.azure-pipelines/dpkg-cache-cleanup.yml +++ b/.azure-pipelines/dpkg-cache-cleanup.yml @@ -16,7 +16,7 @@ pr: none jobs: - job: Build - pool: sonicbld + pool: sonicbld-1es timeoutInMinutes: 5 steps: - checkout: none diff --git a/.azure-pipelines/official-build-cache.yml b/.azure-pipelines/official-build-cache.yml index 99b36dbdff..64889299e0 100644 --- a/.azure-pipelines/official-build-cache.yml +++ b/.azure-pipelines/official-build-cache.yml @@ -24,7 +24,7 @@ pr: none stages: - stage: Build - pool: sonicbld + pool: sonicbld-1es variables: - name: CACHE_MODE value: cache diff --git a/.azure-pipelines/official-build.yml b/.azure-pipelines/official-build.yml index 14308292f4..ecc9bd89c6 100644 --- a/.azure-pipelines/official-build.yml +++ b/.azure-pipelines/official-build.yml @@ -34,7 +34,7 @@ variables: stages: - stage: Build - pool: sonicbld + pool: sonicbld-1es variables: - name: CACHE_MODE value: wcache diff --git a/.azure-pipelines/template-commonlib.yml b/.azure-pipelines/template-commonlib.yml index cd7551d838..c821998ae8 100644 --- a/.azure-pipelines/template-commonlib.yml +++ b/.azure-pipelines/template-commonlib.yml @@ -11,7 +11,7 @@ jobs: - job: Build_${{ arch }} timeoutInMinutes: 120 ${{ if eq(arch,'amd64') }}: - pool: sonicbld + pool: sonicbld-1es ${{ else }}: pool: sonicbld-${{ arch }} variables: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 18db1b7693..eb521ba789 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -46,7 +46,7 @@ variables: stages: - stage: BuildVS - pool: sonicbld + pool: sonicbld-1es jobs: - template: .azure-pipelines/azure-pipelines-build.yml parameters: @@ -55,7 +55,7 @@ stages: - name: vs - stage: Build - pool: sonicbld + pool: sonicbld-1es variables: INSTALL_DEBUG_TOOLS: y dependsOn: [] @@ -149,7 +149,7 @@ stages: testRunTitle: vstest - job: t0_elastictest - pool: ubuntu-20.04 + pool: sonic-ubuntu-1c displayName: "kvmtest-t0 by Elastictest" timeoutInMinutes: 240 continueOnError: false @@ -162,7 +162,7 @@ stages: MGMT_BRANCH: "202305" - job: t0_2vlans_elastictest - pool: ubuntu-20.04 + pool: sonic-ubuntu-1c displayName: "kvmtest-t0-2vlans by Elastictest" timeoutInMinutes: 240 continueOnError: false @@ -177,7 +177,7 @@ stages: DEPLOY_MG_EXTRA_PARAMS: "-e vlan_config=two_vlan_a" - job: t1_lag_elastictest - pool: ubuntu-20.04 + pool: sonic-ubuntu-1c displayName: "kvmtest-t1-lag by Elastictest" timeoutInMinutes: 240 continueOnError: false @@ -191,7 +191,7 @@ stages: - job: multi_asic_elastictest displayName: "kvmtest-multi-asic-t1-lag by Elastictest" - pool: ubuntu-20.04 + pool: sonic-ubuntu-1c timeoutInMinutes: 240 continueOnError: false steps: @@ -205,7 +205,7 @@ stages: MGMT_BRANCH: "202305" - job: dualtor_elastictest - pool: ubuntu-20.04 + pool: sonic-ubuntu-1c displayName: "kvmtest-dualtor-t0 by Elastictest" timeoutInMinutes: 240 continueOnError: false @@ -220,7 +220,7 @@ stages: - job: sonic_t0_elastictest displayName: "kvmtest-t0-sonic by Elastictest" - pool: ubuntu-20.04 + pool: sonic-ubuntu-1c timeoutInMinutes: 240 continueOnError: false steps: @@ -236,7 +236,7 @@ stages: # - job: wan_elastictest # displayName: "kvmtest-wan by Elastictest" -# pool: ubuntu-20.04 +# pool: sonic-ubuntu-1c # timeoutInMinutes: 240 # continueOnError: false # steps: diff --git a/src/tacacs/audisp/patches/0002-Remove-user-secret-from-accounting-log.patch b/src/tacacs/audisp/patches/0002-Remove-user-secret-from-accounting-log.patch index 1cacaa8a06..209db49377 100644 --- a/src/tacacs/audisp/patches/0002-Remove-user-secret-from-accounting-log.patch +++ b/src/tacacs/audisp/patches/0002-Remove-user-secret-from-accounting-log.patch @@ -13,7 +13,7 @@ Subject: [PATCH] Remove user secret from accounting log. regex_helper.h | 17 +++ sudoers_helper.c | 250 +++++++++++++++++++++++++++++++++++++++ sudoers_helper.h | 18 +++ - trace.c | 21 ++++ + trace.c | 31 +++++ trace.h | 10 ++ unittest/Makefile | 21 ++++ unittest/mock.h | 17 +++ @@ -21,7 +21,7 @@ Subject: [PATCH] Remove user secret from accounting log. unittest/mock_helper.h | 48 ++++++++ unittest/password_test.c | 199 +++++++++++++++++++++++++++++++ unittest/sudoers | 5 + - 17 files changed, 931 insertions(+), 4 deletions(-) + 17 files changed, 941 insertions(+), 4 deletions(-) create mode 100644 password.c create mode 100644 password.h create mode 100644 regex_helper.c @@ -700,7 +700,7 @@ new file mode 100644 index 0000000..44bbbc7 --- /dev/null +++ b/trace.c -@@ -0,0 +1,21 @@ +@@ -0,0 +1,31 @@ +#include +#include +#include @@ -709,9 +709,19 @@ index 0000000..44bbbc7 + +#include "trace.h" + ++/* Tacacs+ support lib */ ++#include ++ ++/* Tacacs control flag */ ++extern int tacacs_ctrl; ++ +/* Output trace log. */ +void trace(const char *format, ...) +{ ++ if ((tacacs_ctrl & PAM_TAC_DEBUG) == 0) { ++ return; ++ } ++ + // convert log to a string because va args resoursive issue: + // http://www.c-faq.com/varargs/handoff.html + char logBuffer[MAX_LINE_SIZE]; diff --git a/src/tacacs/audisp/patches/0003-Add-local-accounting.patch b/src/tacacs/audisp/patches/0003-Add-local-accounting.patch index 1883f55914..00f7b13495 100644 --- a/src/tacacs/audisp/patches/0003-Add-local-accounting.patch +++ b/src/tacacs/audisp/patches/0003-Add-local-accounting.patch @@ -70,12 +70,12 @@ index 0000000..e23acec +#include "trace.h" + +/* Accounting log format. */ -+#define ACCOUNTING_LOG_FORMAT "Accounting: user: %s, tty: %s, host: %s, command: %s, type: %d, task ID: %d" ++#define ACCOUNTING_LOG_FORMAT "Audisp-tacplus: Accounting: user: %s, tty: %s, host: %s, command: %s, type: %d, task ID: %d" + +/* Write the accounting information to syslog. */ +void accounting_to_syslog(char *user, char *tty, char *host, char *cmdmsg, int type, uint16_t task_id) +{ -+ trace(ACCOUNTING_LOG_FORMAT, user, tty, host, cmdmsg, type, task_id); ++ syslog(LOG_INFO, ACCOUNTING_LOG_FORMAT, user, tty, host, cmdmsg, type, task_id); +} \ No newline at end of file diff --git a/local_accounting.h b/local_accounting.h