summaryrefslogtreecommitdiff
path: root/nslcd_server
diff options
context:
space:
mode:
Diffstat (limited to 'nslcd_server')
-rwxr-xr-xnslcd_server/func_handlerequest.go.gen6
-rwxr-xr-xnslcd_server/interface_backend.go.gen7
-rwxr-xr-xnslcd_server/type_nilbackend.go.gen5
3 files changed, 8 insertions, 10 deletions
diff --git a/nslcd_server/func_handlerequest.go.gen b/nslcd_server/func_handlerequest.go.gen
index 4c58ae0..bef29c0 100755
--- a/nslcd_server/func_handlerequest.go.gen
+++ b/nslcd_server/func_handlerequest.go.gen
@@ -28,15 +28,15 @@ import (
"fmt"
"io"
"os"
- s "syscall"
+ "golang.org/x/sys/unix"
p "lukeshu.com/git/go/libnslcd.git/nslcd_proto"
)
var sensitive = "<omitted-from-log>"
// Handle a request to nslcd
-func HandleRequest(backend Backend, in io.Reader, out io.Writer, cred s.Ucred) (err error) {
+func HandleRequest(backend Backend, in io.Reader, out io.Writer, cred unix.Ucred) (err error) {
err = nil
defer func() {
if r := recover(); r != nil {
@@ -52,7 +52,7 @@ func HandleRequest(backend Backend, in io.Reader, out io.Writer, cred s.Ucred) (
return
}
-func handleRequest(backend Backend, in io.Reader, out io.Writer, cred s.Ucred) {
+func handleRequest(backend Backend, in io.Reader, out io.Writer, cred unix.Ucred) {
var version int32
p.Read(in, &version)
if version != p.NSLCD_VERSION {
diff --git a/nslcd_server/interface_backend.go.gen b/nslcd_server/interface_backend.go.gen
index 94a0433..bca8e17 100755
--- a/nslcd_server/interface_backend.go.gen
+++ b/nslcd_server/interface_backend.go.gen
@@ -24,8 +24,7 @@ cat <<EOF | gofmt
package nslcd_server
import (
- s "syscall"
-
+ "golang.org/x/sys/unix"
p "lukeshu.com/git/go/libnslcd.git/nslcd_proto"
)
@@ -34,7 +33,7 @@ import (
// that the nslcd server may reply to is implemented simply as a
// method that returns a channel of the resulting values.
type Backend interface {
- $(sed -rn 's/([^_]+)(.*)/\1\2(s.Ucred, p.Request_\1\2) <-chan p.\1/p' "$requests" | grep -v PAM)
- $(sed -rn 's/(PAM)(.*)/\1\2(s.Ucred, p.Request_\1\2) <-chan p.\1\2/p' "$requests")
+ $(sed -rn 's/([^_]+)(.*)/\1\2(unix.Ucred, p.Request_\1\2) <-chan p.\1/p' "$requests" | grep -v PAM)
+ $(sed -rn 's/(PAM)(.*)/\1\2(unix.Ucred, p.Request_\1\2) <-chan p.\1\2/p' "$requests")
}
EOF
diff --git a/nslcd_server/type_nilbackend.go.gen b/nslcd_server/type_nilbackend.go.gen
index 0127e51..8a8f1cc 100755
--- a/nslcd_server/type_nilbackend.go.gen
+++ b/nslcd_server/type_nilbackend.go.gen
@@ -24,8 +24,7 @@ cat <<EOF | gofmt
package nslcd_server
import (
- s "syscall"
-
+ "golang.org/x/sys/unix"
p "lukeshu.com/git/go/libnslcd.git/nslcd_proto"
)
@@ -35,7 +34,7 @@ import (
// databases.
type NilBackend struct{}
-$(< "$interface" sed -rn 's/^\t([^(]+)\(s.Ucred, ([^)]+)\) <-chan (\S+)$/func (o NilBackend) \1(s.Ucred, \2) <-chan \3 { r := make(chan \3); close(r); return r }/p')
+$(< "$interface" sed -rn 's/^\t([^(]+)\(unix.Ucred, ([^)]+)\) <-chan (\S+)$/func (o NilBackend) \1(unix.Ucred, \2) <-chan \3 { r := make(chan \3); close(r); return r }/p')
var _ Backend = NilBackend{}
EOF