Project

General

Profile

Task #11880

validate_ssh_cmd: update to use conffile

Added by Charles Atkinson 11 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Start date:
16/03/2021
Due date:
% Done:

0%

Close

Description

Base on Aurinoco Systems' git's
  • scripts/Miscellany/|usr|local|bin|validate_ssh_cmd.sh
  • conf/Miscellany/nas.iciti.av|usr|local|etc|validate_ssh_cmd.conf

History

#1 Updated by Charles Atkinson 10 months ago

  • Status changed from New to Closed
On the pilot bung 3.0.0 computer, cw11.iciti.av
  • Replaced /usr/bin/validate_ssh_cmd with a version based on Aurinco's "git/scripts/Miscellany/|usr|local|bin|validate_ssh_cmd.sh" plus logging
  • Created /etc/bung/validate_ssh_cmd.conf based on the regexes in the original usr/bin/validate_ssh_cmd plus support for remote bung 2.x.x clients
    # Conffile for /usr/bin/validate_ssh_cmd
    
    # A shell fragment, must be valid when sourced by bash
    
    readonly regexes=(
        '^df '
        '^echo -n OK$'
        '^rm /tmp/bung\.[[:xdigit:]]{8}\.conf$'
        '^rsync --server '
        '^scp (-p )?-t (-- )?/tmp/bung\.[[:xdigit:]]{8}\.conf$'
        '^/usr/bin/remote_agent '
    
        # For remote bung 2.x.x clients
        '^/opt/bung/remote_agent\.sh '
    )
    
    Test
    root@cw11.iciti.av:~# /etc/cron.daily/sync_from_dns_and_nas &
    
    OK (net1.iciti.av's log OK and no error mail to sysmail)

No git commit because done as part of bung 3.0.0 initialisation

Also available in: Atom PDF