Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 597978
Collapse All | Expand All

(-)selocal.orig (-6 / +6 lines)
Lines 47-66 Link Here
47
47
48
# Check if a role is known for the current policy
48
# Check if a role is known for the current policy
49
validateRole() {
49
validateRole() {
50
  seinfo -r$1 > /dev/null 2>&1;
50
  seinfo -r$1 | grep -q 'Roles: 0' > /dev/null 2>&1;
51
  return $?;
51
  if [[ $? -eq 0 ]] ; then return 1; else return 0; fi
52
}
52
}
53
53
54
# Check if a type is known for the current policy
54
# Check if a type is known for the current policy
55
validateType() {
55
validateType() {
56
  seinfo -t$1 > /dev/null 2>&1;
56
  seinfo -t$1 | grep -q 'Types: 0' > /dev/null 2>&1;
57
  return $?;
57
  if [[ $? -eq 0 ]] ; then return 1; else return 0; fi
58
}
58
}
59
59
60
# Check if an attribute is known for the current policy
60
# Check if an attribute is known for the current policy
61
validateAttribute() {
61
validateAttribute() {
62
  seinfo -a$1 > /dev/null 2>&1;
62
  seinfo -a$1 | grep -q 'Type Attributes: 0' > /dev/null 2>&1;
63
  return $?;
63
  if [[ $? -eq 0 ]] ; then return 1; else return 0; fi
64
}
64
}
65
65
66
# Update dependencies
66
# Update dependencies

Return to bug 597978