commit 3cb20d616db20a105f3f1744eb680e108c9521dc from: Stefan Sperling via: Thomas Adam date: Fri Apr 12 13:39:40 2024 UTC remove outdated TOOD item and tweak test accordingly The default deny policy is working as expected according to newly added regression test. Tweak this test to use an implicit read-only rule, rather than an explicit one, as stated in the TODO item. commit - a9c0a12c5e9658f3f46a39a74dfc22a8ca23b16e commit + 3cb20d616db20a105f3f1744eb680e108c9521dc blob - 28123e8a3872376578886c1396ef31644eb17100 blob + 1e2fc4206056c5f5e7bdd1a216c5bb2862c17ba0 --- TODO +++ TODO @@ -79,8 +79,6 @@ gotd: - keep track of available repository disk space and fail gracefully when uploaded pack files would fill up the disk too much, keeping a reserve - reuse packed non-delta objects directly (without re-deltification) for speed -- if no permit statement is given in gotd.conf it is possible to send a branch - into an empty repository regardless; this should return EPERM instead gotadmin: - add support for generating git-fast-export streams from a repository blob - 0167d899f41c288d28cb4fec97714f37f9b48bc9 blob + 0dee7475233829d5d5fc2cc3f028cfc7789ce428 --- regress/gotd/Makefile +++ regress/gotd/Makefile @@ -79,6 +79,15 @@ start_gotd_ro: ensure_root @$(GOTD_TRAP); $(GOTD_START_CMD) @$(GOTD_TRAP); sleep .5 +start_gotd_implicit_ro: ensure_root + @echo 'listen on "$(GOTD_SOCK)"' > $(PWD)/gotd.conf + @echo "user $(GOTD_USER)" >> $(PWD)/gotd.conf + @echo 'repository "test-repo" {' >> $(PWD)/gotd.conf + @echo ' path "$(GOTD_TEST_REPO)"' >> $(PWD)/gotd.conf + @echo "}" >> $(PWD)/gotd.conf + @$(GOTD_TRAP); $(GOTD_START_CMD) + @$(GOTD_TRAP); sleep .5 + start_gotd_ro_group: ensure_root @echo 'listen on "$(GOTD_SOCK)"' > $(PWD)/gotd.conf @echo "user $(GOTD_USER)" >> $(PWD)/gotd.conf @@ -247,7 +256,7 @@ test_repo_write_protected: prepare_test_repo start_got @$(GOTD_STOP_CMD) 2>/dev/null @su -m ${GOTD_USER} -c 'env $(GOTD_TEST_ENV) sh ./check_test_repo.sh' -test_repo_write_readonly: prepare_test_repo_empty start_gotd_ro +test_repo_write_readonly: prepare_test_repo_empty start_gotd_implicit_ro @-$(GOTD_TRAP); su ${GOTD_TEST_USER} -c \ 'env $(GOTD_TEST_ENV) sh ./repo_write_readonly.sh' @$(GOTD_STOP_CMD) 2>/dev/null