about-filter in chroot on OpenBSD (httpd + slowcgi)

Paul W. Rankin pwr at bydasein.com
Sun Mar 28 09:05:51 UTC 2021

On 2021-03-28 18:09, Oscar Najera wrote:
> Paths are absolute on. Try
> about-filter=/var/www/bin/lowdown

Thanks Oscar, but cgit is running in chroot at /var/www so this path 
would become /var/www/var/www/bin/lowdown.

This is now solved. I was making two mistakes; the first is that 
about-filter doesn't want an executable to do the conversion, it wants a 
the command to pass to do the conversion. The second is that my script 
was #!/bin/sh but sh wasn't in the chroot, so I needed to copy the sh 
binary into /var/www/bin.

But with some help from the OpenBSD list I was able to make a little 
static C program that works:

	#include <unistd.h>

	int main(void) {
		execl("/bin/lowdown", "lowdown", NULL);
		return 1;

More information about the CGit mailing list