adlin: Pass SharedSecret in env
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e39586338e
commit
e8f58bad8d
4 changed files with 11 additions and 4 deletions
|
|
@ -16,7 +16,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
loginSalt string
|
||||
loginSalt string = "adelina"
|
||||
justLogin bool
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -18,13 +18,17 @@ var tftpDir string
|
|||
func main() {
|
||||
var studentsFile string
|
||||
|
||||
if v, exists := os.LookupEnv("ADLIN_SHARED_SECRET"); exists {
|
||||
loginSalt = v
|
||||
}
|
||||
|
||||
flag.BoolVar(&justLogin, "just-login", justLogin, "Don't perform MAC assignation and remote registration")
|
||||
|
||||
var bind = flag.String("bind", ":8081", "Bind port/socket")
|
||||
flag.StringVar(&studentsFile, "students", "./students.csv", "Path to a CSV file containing students list")
|
||||
flag.StringVar(&ARPTable, "arp", ARPTable, "Path to ARP table")
|
||||
flag.StringVar(&tftpDir, "tftpdir", "/var/tftp/", "Path to TFTPd directory")
|
||||
flag.StringVar(&loginSalt, "loginsalt", "adelina", "secret used in login HMAC")
|
||||
flag.StringVar(&loginSalt, "loginsalt", loginSalt, "secret used in login HMAC")
|
||||
|
||||
var auth = flag.String("auth", "none", "Auth method: none, fwd, ldap, krb5")
|
||||
|
||||
|
|
|
|||
Reference in a new issue