Skip to content

Commit

Permalink
accounts: filter root
Browse files Browse the repository at this point in the history
  • Loading branch information
jouyouyun committed May 30, 2014
1 parent 2a57d7b commit 5c5874c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions accounts/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ func newUserInfo(name, uid, gid, home, shell string) UserInfo {
}

func checkUserIsHuman(info *UserInfo) bool {
if info.Name == "root" {
return false
}

shells := strings.Split(info.Shell, "/")
tmpShell := shells[len(shells)-1]
if SHELL_END_FALSE == tmpShell ||
Expand Down

0 comments on commit 5c5874c

Please sign in to comment.