Age | Commit message (Collapse) | Author |
|
Added types:
nslcd_server: type Limits struct { ...}
nslcd_server: type Conn interface{ ... } // a subset of net.Conn
nslcd_server.HandleRequest() signature change:
-func HandleRequest(backend Backend, in io.Reader, out io.Writer, cred unix.Ucred) (err error) {
+func HandleRequest(backend Backend, limits Limits, conn Conn, cred unix.Ucred) (err error) {
The `limits Limits` argument is added, and `conn Conn` replaces `in io.Reader` and `out io.Writer`.
nslcd_systemd.Main() signature change:
-func Main(backend Backend) uint8 {
+func Main(backend Backend, limits nslcd_server.Limits) uint8 {
The `limits Limits` argument is added.
|
|
Spawn handler goroutines from listener goroutine. This fixes a race
condition where
main | listener
----------+-----------------
| conn = accept()
return |
| sock <- conn
and the connection is *not* handled (despite being accepted).
|
|
|
|
|
|
The logic for backof size is based on the net/http server.
|
|
|
|
|
|
Eh. I'm not really sure how I feel about this change. I feel better about
the syscalls that the program makes. But the code is longer. There's more
boilerplate. I wish syscall.RawConn let our function return an error that
would bubble up.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is just a search/replace s/syscall/unix/g in the broken code.
|
|
|