AB#2222 replace unlicensed passwd package with own implementation

This commit is contained in:
Thomas Tendyck 2022-07-25 14:43:02 +02:00 committed by Thomas Tendyck
parent f57a7e3ed0
commit 48d614c959
8 changed files with 75 additions and 32 deletions

View file

@ -162,17 +162,17 @@ func (l *LinuxUserManager) GetLinuxUser(username string) (LinuxUser, error) {
return LinuxUser{}, ErrUserDoesNotExist
}
entry := entries[username]
uid, err := strconv.Atoi(entry.Uid)
uid, err := strconv.Atoi(entry.UID)
if err != nil {
return LinuxUser{}, fmt.Errorf("parsing users uid: %w", err)
}
gid, err := strconv.Atoi(entry.Gid)
gid, err := strconv.Atoi(entry.GID)
if err != nil {
return LinuxUser{}, fmt.Errorf("parsing users gid: %w", err)
}
return LinuxUser{
Username: username,
Home: entry.Home,
Home: entry.Directory,
UID: uid,
GID: gid,
}, nil