login-validator: Create a file to store username
This commit is contained in:
parent
e65ef22000
commit
882ef1c3f8
@ -47,6 +47,13 @@ func registerUser(tplPath, remoteAddr string, filename string, username string,
|
||||
return err
|
||||
}
|
||||
|
||||
fdlogin, err := os.Create(path.Join(tftpDir, "shadows", initrd, "whois"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer fdlogin.Close()
|
||||
fdlogin.Write([]byte(username + "\n" + remoteAddr + "\n" + ip.String()))
|
||||
|
||||
fd, err := os.Create(path.Join(tftpDir, "shadows", initrd, "challenge-initrd.img"))
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user