Skip to content

ssh-refactor - #187

Merged
swissmakers merged 25 commits into
mainfrom
dev
Jul 26, 2026
Merged

ssh-refactor#187
swissmakers merged 25 commits into
mainfrom
dev

Conversation

@swissmakers

Copy link
Copy Markdown
Owner

No description provided.

Michael Reber added 25 commits July 24, 2026 21:51
…ment helper function to rewrite callback on-the-fly
…ther jail causes general fails on enabeling disabeling other jails
…le update is needed, e.g. on jail enabling/disabling
…ement the jail-name validators too & cleanup old now not anymore used functions
…in case someting should race, and call multible renders (should not happen) we are protected. Also we do not fetch all data on jail disable
return
}
sc.masterUp.Store(false)
if _, err := os.Stat(sc.controlPath()); err == nil {
}
sc.masterUp.Store(false)
if _, err := os.Stat(sc.controlPath()); err == nil {
_ = os.Remove(sc.controlPath())
return
}
if sc.masterUp.Load() {
if _, err := os.Stat(sc.controlPath()); err == nil {
}

func (sc *SSHConnector) checkMaster(ctx context.Context) bool {
check := exec.CommandContext(ctx, "ssh", "-O", "check", "-o", "ControlPath="+sc.controlPath(), sc.sshTarget())
}

func (sc *SSHConnector) checkMaster(ctx context.Context) bool {
check := exec.CommandContext(ctx, "ssh", "-O", "check", "-o", "ControlPath="+sc.controlPath(), sc.sshTarget())

// Runs one ssh process, keeping stdout and stderr strictly separate
func (sc *SSHConnector) execSSH(ctx context.Context, args []string, stdin io.Reader) (string, string, error) {
cmd := exec.CommandContext(ctx, "ssh", args...)
base = filepath.Join(cache, "fail2ban-ui", "ssh-ctl")
}
if base != "" {
if err := os.MkdirAll(base, 0o700); err == nil {
return nil, fmt.Errorf("invalid glob pattern: %w", err)
}
if len(matched) == 0 {
if _, statErr := os.ReadDir(filepath.Dir(logpath)); statErr != nil && os.IsPermission(statErr) {
@swissmakers
swissmakers merged commit 2efe53a into main Jul 26, 2026
2 of 3 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