summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-08-24Merge branch 'release' into release.tmpHEADv0.6.0releaseLuke Shumaker
2021-08-24Generate artifactsLuke Shumaker
2021-08-24empty commitLuke Shumaker
2021-08-24Add meta-files to work with Go modulesmasterLuke Shumaker
2018-04-25Improve godocLuke Shumaker
This had apparently been sitting here uncommitted since Jan 1.
2017-12-19nslcd_{systemd,server}: log more thingsLuke Shumaker
2017-12-18nslcd_systemd: make the connection a param in the handler closureLuke Shumaker
This isn't the source of a problem, since conn is declared inside the loop, so instances of it aren't shared. But, make that clearer.
2017-12-18nslcd_systemd: give each connection a unique ID prefix for loggingLuke Shumaker
2017-12-18use contexts for loggingLuke Shumaker
2017-12-18nslcd_{server,systemd}: BREAKING CHANGE: use contextsLuke Shumaker
2017-12-18gofmt nslcd_systemd/misc_test.goLuke Shumaker
2017-12-18nslcd_systemd: return EXIT_NETWORK for network errorsLuke Shumaker
2017-12-18nslcd_systemd: don't call err.Error() unnecessarilyLuke Shumaker
2017-12-18type_nilbackend.go.gen: use variables to shorten crazy-long lineLuke Shumaker
2017-12-18nslcd_server: respect all values if limits.Timeout < limits.ReadTimeout + ↵Luke Shumaker
limits.WriteTimeout If Timeout : 3s ReadTimeout : 2s WriteTimeout : 2s Then before the effective total Timeout was 2s+2s=4s. That is wrong. It should only be that the Write phase gets to use the full 2s if the Read phase uses <= 1s.
2017-09-08nslcd_systemd: add `import "os"` to the example in the docsLuke Shumaker
2017-09-08nslcd_server: Add a request size limitLuke Shumaker
2017-09-08add a test for tricking the server into allocating huge buffersLuke Shumaker
2017-09-08test: clean up, create a parameterized testDriver()Luke Shumaker
2017-09-08nslcd_{server,systemd}: FIX, BREAKING CHANGE: add limitsLuke Shumaker
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.
2017-09-08nslcd_systemd: FIX: avoid a race conditionLuke Shumaker
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).
2017-09-08nslcd_server: FIX: HandleRequest(): error handlingLuke Shumaker
Instead of having a separate channel+goroutine for the backend, just call .Write() right where we get results from the backend, but don't let an error cause us to stop reading from the backend, an error should just cause us to stop writing. This ensures that the backend now always has its output chan drained; before if there were a write error, the backend chan wouldn't get drained, and the resources never released.
2017-09-08add testsLuke Shumaker
2017-09-08nslcd_proto: BREAKING CHANGE: Rethink the panic strategyLuke Shumaker
nslcd_proto.Read() and .Write() panic() with any errors that they may need to emit. This made composition really simple, I was OK with it being against the normal Go style. But, I'm not happy with it anymore; have them return errors now. This leads us in to nslcd_server.HandleRequest() using those panics for control flow. Add a maybePanic(error) function to wrap all of the proto.Read() and proto.Write() calls to restore the panicing behavior.
2017-09-08nslcd_systemd: say "temporary error" when logging a temporary net errorLuke Shumaker
2017-09-08nslcd_systemd: backoff on temporary net errorsLuke Shumaker
The logic for backof size is based on the net/http server.
2017-09-08nslcd_systemd: Don't spew errors about "closed network socket" while stoppingLuke Shumaker
2017-09-08nslcd_systemd: Allow permanent network errors to make us exitLuke Shumaker
2017-09-08nslcd_systemd: Use go 1.9 syscall.RawConn to implement getpeercred()Luke Shumaker
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.
2017-09-08nslcd_systemd: log a notice when reloadingLuke Shumaker
2017-09-08nslcd_proto: Add some doc commentsLuke Shumaker
2017-09-04add canonical import pathsLuke Shumaker
2017-09-03nslcd_proto: fix typo in package descriptionLuke Shumaker
2017-09-03nslcd_systemd: whoops, missed one of the dead assignmentsLuke Shumaker
2017-05-14remove dead assignmentsLuke Shumaker
2017-05-12Have the Makefile be AutoThing friendly.Luke Shumaker
While it mostly played nice with autothing before, by having autothing treat `go generate` as an opaque step, it didn't populate `files.src.gen`.
2017-01-18Update for change in sd_notify.Luke Shumaker
2017-01-14Rename packages: lukeshu.com/git/go/*.git -> git.lukeshu.com/go/*Luke Shumaker
2017-01-02Tidy: make a private var const instead of varLuke Shumaker
2017-01-01tidy MakefilesLuke Shumaker
2017-01-01Update for new libsystemd.Luke Shumaker
2016-12-19Use x/sys/unix instead of the deprecated syscall. BREAKING CHANGE.Luke Shumaker
This is just a search/replace s/syscall/unix/g in the broken code.
2016-12-18Rename packages to make goimports happy. BREAKING CHANGE.Luke Shumaker
2016-12-18Adjust to the new libsystemd.git/sd_daemon interface.Luke Shumaker
2016-12-18Add BUG comments about unchecked lengths.Luke Shumaker
Related to https://labs.parabola.nu/issues/1068
2016-10-15simplify Makefiles for go generateLuke Shumaker
2016-06-18go back to using plain stringsLuke Shumaker
2016-06-18revert the last commitLuke Shumaker
2016-06-18Use a pool of byte arrays to reduce GC pressure.Luke Shumaker
2016-06-18Shoot, I needed to use ReadFull, not Read. Amature mistake.Luke Shumaker