Browse Source

#1635 PAM return error bug

tags/v1.21.12.1
Unknwon 10 years ago
parent
commit
d600530c20
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      gogs.go
  2. +1
    -1
      models/login.go
  3. +1
    -1
      templates/.VERSION

+ 1
- 1
gogs.go View File

@@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/modules/setting"
) )


const APP_VER = "0.6.12.0913 Beta"
const APP_VER = "0.6.12.0914 Beta"


func init() { func init() {
runtime.GOMAXPROCS(runtime.NumCPU()) runtime.GOMAXPROCS(runtime.NumCPU())


+ 1
- 1
models/login.go View File

@@ -388,7 +388,7 @@ func LoginUserSMTPSource(u *User, name, passwd string, sourceId int64, cfg *SMTP
func LoginUserPAMSource(u *User, name, passwd string, sourceId int64, cfg *PAMConfig, autoRegister bool) (*User, error) { func LoginUserPAMSource(u *User, name, passwd string, sourceId int64, cfg *PAMConfig, autoRegister bool) (*User, error) {
if err := pam.PAMAuth(cfg.ServiceName, name, passwd); err != nil { if err := pam.PAMAuth(cfg.ServiceName, name, passwd); err != nil {
if strings.Contains(err.Error(), "Authentication failure") { if strings.Contains(err.Error(), "Authentication failure") {
return nil, ErrUserNotExist{u.Id, u.Name}
return nil, ErrUserNotExist{0, name}
} }
return nil, err return nil, err
} }


+ 1
- 1
templates/.VERSION View File

@@ -1 +1 @@
0.6.12.0913 Beta
0.6.12.0914 Beta

Loading…
Cancel
Save