mirror of https://gogs.blitter.com/RLabs/xs
Fixed missed authtoken file ref in auth.go
This commit is contained in:
parent
713f44086a
commit
89ad0e0998
6
auth.go
6
auth.go
|
@ -154,7 +154,7 @@ func AuthUserByPasswd(ctx *AuthCtx, username string, auth string, fname string)
|
||||||
// ------------- End xs-local passwd auth routine(s) -----------
|
// ------------- End xs-local passwd auth routine(s) -----------
|
||||||
|
|
||||||
// AuthUserByToken checks user login information against an auth token.
|
// AuthUserByToken checks user login information against an auth token.
|
||||||
// Auth tokens are stored in each user's $HOME/.xs_id and are requested
|
// Auth tokens are stored in each user's $HOME/.config/xs/.xs_id and are requested
|
||||||
// via the -g option.
|
// via the -g option.
|
||||||
// The function also check system /etc/passwd to cross-check the user
|
// The function also check system /etc/passwd to cross-check the user
|
||||||
// actually exists.
|
// actually exists.
|
||||||
|
@ -172,9 +172,9 @@ func AuthUserByToken(ctx *AuthCtx, username string, connhostname string, auth st
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
b, e := ctx.reader(fmt.Sprintf("%s/.xs_id", u.HomeDir))
|
b, e := ctx.reader(fmt.Sprintf("%s/.config/xs/.xs_id", u.HomeDir))
|
||||||
if e != nil {
|
if e != nil {
|
||||||
log.Printf("INFO: Cannot read %s/.xs_id\n", u.HomeDir)
|
log.Printf("INFO: Cannot read %s/.config/xs/.xs_id\n", u.HomeDir)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue