summaryrefslogtreecommitdiff
path: root/go/parabola_hackers/users.go.in
diff options
context:
space:
mode:
Diffstat (limited to 'go/parabola_hackers/users.go.in')
-rw-r--r--go/parabola_hackers/users.go.in16
1 files changed, 8 insertions, 8 deletions
diff --git a/go/parabola_hackers/users.go.in b/go/parabola_hackers/users.go.in
index aeda069..edd8a59 100644
--- a/go/parabola_hackers/users.go.in
+++ b/go/parabola_hackers/users.go.in
@@ -21,7 +21,7 @@ import (
"os/exec"
yaml "gopkg.in/yaml.v2"
- nslcd_proto "lukeshu.com/git/go/libnslcd.git/proto"
+ p "lukeshu.com/git/go/libnslcd.git/proto"
"lukeshu.com/git/go/libsystemd.git/sd_daemon/logger"
)
@@ -33,7 +33,7 @@ import (
other - encrypted password, in crypt(3) format */
type User struct {
- Passwd nslcd_proto.Passwd
+ Passwd p.Passwd
Groups []string
}
@@ -89,8 +89,8 @@ func parseUser(_data interface{}) (ret User, err error) {
} else if str, isTyp := iface.(string); !isTyp {
errs = append(errs, "\"username\" is not a string")
} else {
- ret.Passwd.Name = str
- ret.Passwd.HomeDir = "/home/" + str
+ ret.Passwd.Name = p.String(str)
+ ret.Passwd.HomeDir = p.String("/home/" + str)
}
if iface, isSet := data["fullname"]; !isSet {
@@ -98,7 +98,7 @@ func parseUser(_data interface{}) (ret User, err error) {
} else if str, isTyp := iface.(string); !isTyp {
errs = append(errs, "\"fullname\" is not a string")
} else {
- ret.Passwd.GECOS = str
+ ret.Passwd.GECOS = p.String(str)
}
if iface, isSet := data["shell"]; !isSet {
@@ -106,7 +106,7 @@ func parseUser(_data interface{}) (ret User, err error) {
} else if str, isTyp := iface.(string); !isTyp {
errs = append(errs, "\"shell\" is not a string")
} else {
- ret.Passwd.Shell = str
+ ret.Passwd.Shell = p.String(str)
}
if iface, isSet := data["groups"]; !isSet {
@@ -126,7 +126,7 @@ func parseUser(_data interface{}) (ret User, err error) {
}
}
if !e {
- ret.Groups = Set2list(groups)
+ ret.Groups = set2list(groups)
}
}
}
@@ -134,7 +134,7 @@ func parseUser(_data interface{}) (ret User, err error) {
err = &yaml.TypeError{Errors: errs}
}
- ret.Passwd.PwHash = "x" // look in shadow for the password hash
+ ret.Passwd.PwHash = p.String("x") // look in shadow for the password hash
ret.Passwd.GID = -1
return