This file is indexed.

/usr/share/nrn/lib/auditscripts/hocaudit.sh is in neuron 7.5-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/sh

auditprogpath=`dirname $0`
pid=$1
auditdir=$2
tmpdir=$auditdir/$pid
tardir=$auditdir/TAR

if [ ! -d $tmpdir ] ; then
	echo "$0: tmpdir:$tmpdir does not exist"
	exit 1
fi

datefile=$tmpdir/datefile
date > $tmpdir/datefile
commandfile=$tmpdir/commands
xopenlist=$tmpdir/xopens
diffile=$tmpdir/diffile
savefile=$tmpdir/savefile
auditlist=$auditdir/auditlist

export datefile commandfile xopenlist savefile

n=0
while read typ str
do
	echo "$str" >> temp
	case $typ in
	0)
		# just a command to save
		echo "$str" >> $commandfile
		;;
	1)
		# manage an xopen
		rcsdiff -e $str > $diffile 2> /dev/null
		case $? in
		0)
			# identical with most recent rcs version
			rev=`rlog -h $str | sed -n '/^head:/s/head://p'`
			echo "0 $str x $rev" >> $xopenlist
			;;
		1)	
			# differs from rcs version so save the diff
			rev=`rlog -h $str | sed -n '/^head:/s/head://p'`
			echo "1 $str f$n $rev" >> $xopenlist
			mv $diffile $tmpdir/f$n
			n=`expr $n + 1`
			;;
		2)
			# no rcs version so save the file
			echo "2 $str f$n x" >> $xopenlist
			cp $str $tmpdir/f$n
			n=`expr $n + 1`
			;;
		esac
		;;
	2)
		# manage execution of an emacs buffer
		echo "3 $str" >> $xopenlist
		;;
	3)
		# save audit
		echo "$str `date`" >> $savefile
		echo "-1 $str x x" >> $xopenlist
		$auditprogpath/saveaudit
		;;
	esac
done


if [ -f $savefile ] ; then
	# save everything
	tarfile=`$auditprogpath/gettarname $tardir`
	cat $tarfile $savefile >> $auditlist
	(cd $tmpdir ; tar cf ../$pid.tar *)
	mv $tmpdir/../$pid.tar $tarfile
	chmod 444 $tarfile
	compress $tarfile
fi

if true ; then
	# clean up
	echo "Removing $tmpdir";
	rm -r $tmpdir
fi