summaryrefslogtreecommitdiff
path: root/nslcd_systemd
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-09-08 22:00:38 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-09-08 22:00:38 -0400
commit79229a92c3836ee70f238c3f8906abf91e4e46f6 (patch)
tree1a7b0718bee989c41f70d1c203a4fc344e4ca659 /nslcd_systemd
parentee701cc53db14144df5321e5861e5bcbde220193 (diff)
nslcd_server: Add a request size limit
Diffstat (limited to 'nslcd_systemd')
-rw-r--r--nslcd_systemd/misc_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/nslcd_systemd/misc_test.go b/nslcd_systemd/misc_test.go
index 0e6f2e9..be6d40c 100644
--- a/nslcd_systemd/misc_test.go
+++ b/nslcd_systemd/misc_test.go
@@ -293,13 +293,16 @@ func TestLargeRequest(t *testing.T) {
defer sdActivatedReset()
t.Run("large-request", func(t *testing.T) {
testWithTimeout(t, 2*time.Second, func(t *testing.T, s chan<- string) {
+ KiB := 1024
GiB := 1024*1024*1024
+
ctx := &testContext{T: t, tmpdir: tmpdir, status: s}
backend := &LockingBackend{}
limits := nslcd_server.Limits{
Timeout: 1 * time.Second,
+ RequestMaxSize: int64(1*KiB),
}
notifyHandler := func(dat []byte, oob []byte) error { return nil }