[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] update-bugdoctxt: set SSL_CERT_FILE when calling lynx



lynx doesn't seem able to use the service certificates in
/etc/ssl/certs and the SSL_CERT_DIR environment variable doesn't seem
to work either.

While at it, also run lynx as the dak-unpriv user.
---
 scripts/debian/update-bugdoctxt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/debian/update-bugdoctxt b/scripts/debian/update-bugdoctxt
index d5e6416..b83e266 100755
--- a/scripts/debian/update-bugdoctxt
+++ b/scripts/debian/update-bugdoctxt
@@ -16,7 +16,7 @@ convert () {
 	src=$1; dst=$2
 	rm -f .new-$dst
 	echo Generating $dst from https://www.debian.org/Bugs/$src ...
-	lynx -nolist -dump $urlbase$src | sed -e 's/^ *$//' | perl -00 -ne 'exit if /Back to the Debian Project homepage/; print unless ($.==1 || $.==2 || $.==3 || /^\s*Other BTS pages:$/m)' >.new-$dst
+	sudo -u dak-unpriv SSL_CERT_FILE=/etc/ssl/ca-debian/ca-certificates.crt lynx -nolist -dump $urlbase$src | sed -e 's/^ *$//' | perl -00 -ne 'exit if /Back to the Debian Project homepage/; print unless ($.==1 || $.==2 || $.==3 || /^\s*Other BTS pages:$/m)' >.new-$dst
 	if cmp -s .new-$dst $dst ; then rm -f .new-$dst
 	else mv -f .new-$dst $dst
 	fi
-- 
2.1.4


Reply to: