feat: seed SSH users from env var and authorized_keys file #31
+2
-1
@@ -10,6 +10,7 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -576,7 +577,7 @@ func seedKeysFromEnv(s store.Store) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if path := os.Getenv("UPTOP_KEYS"); path != "" {
|
if path := os.Getenv("UPTOP_KEYS"); path != "" {
|
||||||
f, err := os.Open(path)
|
f, err := os.Open(filepath.Clean(path))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
scanner := bufio.NewScanner(f)
|
scanner := bufio.NewScanner(f)
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
|
|||||||
Reference in New Issue
Block a user