This file is indexed.

/usr/share/quota/quotaon.sh is in quota 4.04-2.

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
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#!/bin/sh

# names of binaries
check=/sbin/quotacheck
on=/sbin/quotaon
quotaisoff=/var/lib/quota/off
quotaisnew=/var/lib/quota/new
forcequotacheck=/forcequotacheck

ALLFLAGS=-aug
CHECKALLFLAGS=${ALLFLAGS}m
CHECKUSERFLAGS=-ucm
CHECKGROUPFLAGS=-gcm

set -e

. /lib/lsb/init-functions

# create list of all fs with quota
scan_fstab()
{
	tmplist=`grep "^[ ]*[^#].*$1" /etc/fstab | \
    	      sed -e 's/\(^[[:space:]]*[^[:space:]]*[[:space:]]*[^[:space:]]*[[:space:]]*[^[:space:]]*\).*/\1/g' \
                  -e 's/^[[:space:]]*[^[:space:]]*[[:space:]]*//g'`
	list=${tmplist:=empty}
}

# if fs needs a quotacheck, check it
check_quota()
{
	if [ "$2" != "xfs" ]
	then	
		if [ ! -e $1/quota.user -a ! -e $1/aquota.user ] ; then
			log_warning_msg "Warning: user quota not configured in filesystem \`$1.'"
		elif [ "$4" != "journaled" -a ! -f $quotaisoff ] ; then
			# quota was not shut down correctly, check filesystem
			$check $3 $1
		elif test ! -e $1/aquota.user; then
			# filesystem is new, check it	
			test ! -s $1/quota.user && $check $3 $1
		elif test ! -s $1/aquota.user; then
			# filesystem is new, check it	
			$check $3 $1
		fi
	fi
}

# Check if quota has been enabled already
LC_MESSAGES=C $on -ap|grep -q "is off" || exit 0

# Did we get a quota option on boot?
force="no"
if [ -f $forcequotacheck ]; then
	log_warning_msg "Warning: Please pass 'quotacheck.mode=force' on the kernel command line rather than creating /forcequotacheck on the root file system."
	force="yes"
elif grep "quotacheck.mode=force" /proc/cmdline >/dev/null 2>&1; then
	force="yes"
fi

skip="no"
if grep "quotacheck.mode=skip" /proc/cmdline >/dev/null 2>&1; then
	skip="yes"
fi

if [ -x $check -a $skip = "no" ] ; then
	log_action_begin_msg 'Checking quotas';
	# Check all filesystems if quota is new
	if [ -f $quotaisnew -o $force = "yes" ] ; then
		$check $CHECKALLFLAGS || $check -c $CHECKALLFLAGS
		log_action_end_msg 0
	else
		# check filesystems that seem to need a check
		scan_fstab "usrquota"
		set -- $list

		while [ $# -ge 2 ]
		do
			check_quota "$1" "$2" "$CHECKUSERFLAGS" "normal"
			shift; shift
		done

		scan_fstab "grpquota"
		set -- $list
		
		while [ $# -ge 2 ]
		do
			check_quota "$1" "$2" "$CHECKGROUPFLAGS" "normal"
			shift; shift
		done

		scan_fstab "usrjquota"
		set -- $list

		while [ $# -ge 2 ]
		do
			check_quota "$1" "$2" "$CHECKUSERFLAGS" "journaled"
			shift; shift
		done

		scan_fstab "grpjquota"
		set -- $list
		
		while [ $# -ge 2 ]
		do
			check_quota "$1" "$2" "$CHECKGROUPFLAGS" "journaled"
			shift; shift
		done
		log_action_end_msg 0
	fi
fi

# Remove special files
rm -f $quotaisoff $quotaisnew $forcequotacheck

# Turn quotas on.
if [ -x $on ] ; then
   log_action_begin_msg 'Turning on quotas';
   $on $ALLFLAGS
   log_action_end_msg 0
fi

exit 0