// Copyright (C) 2017 Marius Schellenberger

// +build cgo

package godrop

import "os/user"

func lookupUID(username string) (string, error) {
	u, err := user.Lookup(username)
	if err != nil {
		return "", err
	}
	return u.Uid, err
}

func lookupGID(name string) (string, error) {
	g, err := user.LookupGroup(name)
	if err != nil {
		return "", err
	}
	return g.Gid, err
}
