This file is indexed.

/usr/share/sadms-2.0.15/conf/config-selinux.sh is in sadms 2.0.15.repack-0ubuntu2.

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
#!/bin/bash
# bbou@ac-toulouse.fr
# 2006-04-13    
# conf/config-elinux.sh

### P A R A M S
# none
module=sadms
packages="checkpolicy setools"

### I N C L U D E S
. ./_include.sh

### M O D I F I E D   F I L E S ...

### S T A R T

function setup()
{
[ "$1" == "-v" ] && echo "+checking tools ${packages}"
for p in ${packages}; do
	if ! ${PACKAGETEST} ${p} > /dev/null ; then
		[ "$1" == "-v" ] && echo "${p} needed"
		yum -y install ${p}
	fi
done
}

function install()
{
echo "+fixing selinux policy to allow joining Active Directory"
echo "compile policy module ${module}"
if ! checkmodule -M -m -o ${module}.mod ${module}.te; then
	echo "${module}.te did not compile"
	return 1
fi

echo "package policy module ${module}"
if ! semodule_package -o ${module}.pp -m ${module}.mod; then
	echo "${module}.mod did not package"
	return 2
fi

echo "loading policy module ${module}"
if ! semodule -i ${module}.pp; then
	echo "${module}.pp did not load"
	return 3
fi
return 0
}

function status()
{
echo "current selinux policy:"
sesearch --allow -s samba_net_t -t ldap_port -c tcp_socket | grep '^allow'
sesearch --allow -s samba_net_t -t samba_var_t -c file | grep '^allow'
}

function remove()
{
echo "+removing ${module} policy module"
if ! semodule -r ${module}; then
	echo "failed to remove ${module} policy module"
	return 1
fi
return 0
}

function sethomes()
{
	setsebool -P samba_enable_home_dirs=1
}

function resethomes()
{
	setsebool -P samba_enable_home_dirs=0
}

function gethomes()
{
	getsebool samba_enable_home_dirs
}

setup
case $1 in
	install)
		status
		install
		status
		;;
	remove)
		remove
		status
		;;
	status)
		status
		;;
	sethomes)
		sethomes
		gethomes
		;;
	resethomes)
		resethomes
		gethomes
		;;
	gethomes)
		gethomes
		;;
	*)
		echo "Usage: $0 install|remove|statusi|sethomes|resethomes|gethomes"
esac