G Pas
This commit is contained in:
parent
fb70dffbc4
commit
208e04e345
2 changed files with 4 additions and 3 deletions
2
gpas.go
2
gpas.go
|
@ -94,7 +94,7 @@ func passwordFound(user User, config *ConfigFile, ldapConn *ldap.Conn) (string,
|
||||||
l, err := openLdap(config)
|
l, err := openLdap(config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("passwordFound %v", err)
|
log.Printf("passwordFound %v", err)
|
||||||
log.Printf("passwordFound %v", config)
|
log.Printf("passwordFound Config : %v", config)
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
if user.DN == "" && user.UID != "" {
|
if user.DN == "" && user.UID != "" {
|
||||||
|
|
|
@ -57,12 +57,13 @@ type PasswordLostData struct {
|
||||||
func openNewUserLdap(config *ConfigFile) (*ldap.Conn, error) {
|
func openNewUserLdap(config *ConfigFile) (*ldap.Conn, error) {
|
||||||
l, err := openLdap(config)
|
l, err := openLdap(config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf(fmt.Sprintf("openNewUserLdap : %v %v", err, l))
|
log.Printf(fmt.Sprintf("openNewUserLdap 1 : %v %v", err, l))
|
||||||
|
log.Printf(fmt.Sprintf("openNewUserLdap 1 : %v", config))
|
||||||
// data.ErrorMessage = err.Error()
|
// data.ErrorMessage = err.Error()
|
||||||
}
|
}
|
||||||
err = l.Bind(config.NewUserDN, config.NewUserPassword)
|
err = l.Bind(config.NewUserDN, config.NewUserPassword)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf(fmt.Sprintf("openNewUserLdap : %v %v", err, l))
|
log.Printf(fmt.Sprintf("openNewUserLdap 2 : %v %v", err, l))
|
||||||
// data.ErrorMessage = err.Error()
|
// data.ErrorMessage = err.Error()
|
||||||
}
|
}
|
||||||
return l, err
|
return l, err
|
||||||
|
|
Loading…
Reference in a new issue