File: duplicate-module-load

package info (click to toggle)
apache2 2.4.62-1~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 59,516 kB
  • sloc: ansic: 216,122; python: 15,147; perl: 11,308; sh: 6,449; php: 1,315; javascript: 1,314; awk: 749; makefile: 714; lex: 374; yacc: 161; xml: 2
file content (26 lines) | stat: -rw-r--r-- 656 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
set -exu

# Check to make sure that module loads haven't been duplicated.
# Since this is potential minefield that could cause chaos, and a fix is
# currently in the Ubuntu delta, check specifically for it.

# Why is this so bad? See:
#   https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1251939
#   https://issues.apache.org/bugzilla/show_bug.cgi?id=55787

cd $AUTOPKGTEST_TMP

apache2ctl -l -M > unsorted
sort unsorted > sorted
if ! grep core.c sorted ; then
	echo "core.c not found in apach2ctl output. apache2ctl broken?"
	exit 1
fi

uniq < sorted > dedup

if ! diff -u sorted dedup ; then
	echo Duplicate module loads found
	exit 1
fi