Skip to content

Commit

Permalink
Optimize code
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
  • Loading branch information
Jianhui Zhao committed Oct 12, 2018
1 parent 60b766a commit 037aaf5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions login_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"errors"
"io/ioutil"
"os"
"strings"
"syscall"

"github.com/GehirnInc/crypt"
_ "github.com/GehirnInc/crypt/apr1_crypt"
Expand Down Expand Up @@ -43,7 +43,7 @@ func getspnam(name string) (*spwd, error) {
}

func checkUser() bool {
return syscall.Getuid() == 0
return os.Getuid() == 0
}

func login(username, password string) bool {
Expand Down

0 comments on commit 037aaf5

Please sign in to comment.