Re: cgit about-filter in chroot (httpd + slowcgi)

2021-03-31 Thread Paul W. Rankin
On 2021-03-28 19:33, Kristaps Dzonsons wrote: Instead of downloading, recompiling, and installing lowdown; then building and installing a program that execs the downloaded lowdown; why don't you cut out the first step and call through to the C API installed with the lowdown port? There's a full

Re: cgit about-filter in chroot (httpd + slowcgi)

2021-03-28 Thread Paul W. Rankin
On 2021-03-28 18:56, Omar Polo wrote: Thanks Omar, I like this approach! I'm pretty green to C so this is what I have (which doesn't work): #include int main(void) { execl("/bin/lowdown", NULL); } There is no HTML render but at least no errors, but cgit

Re: cgit about-filter in chroot (httpd + slowcgi)

2021-03-28 Thread Paul W. Rankin
On 2021-03-28 18:14, Omar Polo wrote: Paul W. Rankin writes: The cgit about-filter doesn't want an executable to do e.g. the Markdown conversation, rather it wants a script that will return the command to perform this, e.g.: #!/bin/sh case "$1" in (*.md) exec /bin/lo

Re: cgit about-filter in chroot (httpd + slowcgi)

2021-03-28 Thread Paul W. Rankin
On 2021-03-28 15:37, Paul W. Rankin wrote: I'm running cgit with httpd + slowcgi and can't seem to get the about-filter to work. Both httpd and slowcgi run in the default chroot of /var/www. I've compiled lowdown with "-static -pie" to /var/www/bin/lowdown (chroot /bin/lowdown) with permissions:

Re: cgit about-filter in chroot (httpd + slowcgi)

2021-03-28 Thread Stuart Henderson
On 2021-03-28, Kristaps Dzonsons wrote: $ cat < my-cgit-filter.c #include int main(void) { execl("/bin/lowdown", "lowdown", NULL); return 1; } EOF So essentially all this is doing is stripping off the command line arguments. $ cc my-

Re: cgit about-filter in chroot (httpd + slowcgi)

2021-03-28 Thread Kristaps Dzonsons
$ cat < my-cgit-filter.c #include int main(void) { execl("/bin/lowdown", "lowdown", NULL); return 1; } EOF $ cc my-cgit-filter.c -o my-cgit-filter.c -static Instead of downloading, recompiling, and installing lowdown; then building and installing a program that execs the downl

Re: cgit about-filter in chroot (httpd + slowcgi)

2021-03-28 Thread Omar Polo
Paul W. Rankin writes: > On 2021-03-28 18:56, Omar Polo wrote: >>> Thanks Omar, I like this approach! I'm pretty green to C so this is >>> what I have (which doesn't work): >>> #include >>> int main(void) { >>> execl("/bin/lowdown", NULL); >>> } >>> There is no HTML ren

Re: cgit about-filter in chroot (httpd + slowcgi)

2021-03-28 Thread Omar Polo
Paul W. Rankin writes: > On 2021-03-28 18:14, Omar Polo wrote: >> Paul W. Rankin writes: >>> The cgit about-filter doesn't want an executable to do e.g. the >>> Markdown conversation, rather it wants a script that will return the >>> command to perform this, e.g.: >>> #!/bin/sh >>> cas