From 79229a92c3836ee70f238c3f8906abf91e4e46f6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 8 Sep 2017 22:00:38 -0400 Subject: nslcd_server: Add a request size limit --- nslcd_systemd/misc_test.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nslcd_systemd') 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 } -- cgit v1.2.3