This file is indexed.

/usr/sbin/crm_ticket is in pacemaker 1.1.6-2ubuntu3.

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
#!/bin/bash

options=""
ticket=""
granted=""
last_granted=""

TEMP=`getopt -o DGQVThU:v:i:t: --long help,version,ticket:,attr-value:,delete-attr,get-value,attr-id:,quiet,time \
     -n 'crm_ticket' -- "$@"`

if [ $? != 0 ] ; then echo "crm_ticket - A convenience wrapper for crm_attribute"; echo ""; crm_attribute -?; exit 1 ; fi

# Note the quotes around `$TEMP': they are essential!
eval set -- "$TEMP"

while true ; do
    case "$1" in
	-v|--attr-value) options="$options $1 $2"; granted=$2; shift; shift;;
	-i|--attr-id) options="$options $1 $2"; shift; shift;;
	-Q|--quiet|-D|--delete-attr|-G|--get-value|-V) options="$options $1"; shift;;
	-t|--ticket-id) ticket=$2; shift; shift;;
	-T|--time) last_granted="time"; shift;;
	--version) crm_attribute --version; exit 0;;
	-h|--help) 
	    echo "crm_ticket - A convenience wrapper for crm_attribute"; 
	    echo "Grant or revoke the specified ticket for the cluster"; 
	    echo ""; 
	    echo "Usage: crm_ticket -t ticket_name command [options]"; 
	    echo "Options:"
	    echo " -h, --help 		This text"
	    echo " --version 		Version information"
	    echo " -V, --verbose 		Increase debug output"
	    echo " -q, --quiet 		Print only the value on stdout"
	    echo ""
	    echo " -t, --ticket-id=value	The ticket to update"
	    echo ""
	    echo "Commands:"
	    echo " -G, --query 		Query if the specified ticket is granted or not"
	    echo " -v, --update=value	Grant/Revoke the specified ticket"
	    echo " -D, --delete		Delete the granting/revoking record"
	    echo " -T, --time		Query the time of last granted the specified ticket"
	    echo ""
	    echo "Additional Options:"
	    echo " -i, --id=value		(Advanced) The ID used to identify the attribute"
	    exit 0;;
	--) shift ; break ;;
	*) echo "Unknown option: $1. See --help for details." exit 1;;
    esac
done

if [ X$last_granted != X ]; then
    options="$options -n last-granted-$ticket -G -d -1"
    crm_attribute $options -t tickets
    rc=$?
    exit $rc
else
    options="$options -n granted-ticket-$ticket"
fi

case "$granted" in
    true|yes|1)
	crm_attribute $options -t tickets >/dev/null 2>&1
	rc=$?
	if [ $rc = 0 ]; then
    	    options="$options -n last-granted-$ticket -v `date +%s`"
	    crm_attribute $options -t tickets >/dev/null 2>&1
	    rc=$?
	    exit $rc
	else
	    echo "Failed to grant ticket $ticket"
	    exit $rc
	fi
	;;
    *)
	crm_attribute $options -t tickets -d false
	rc=$?
	exit $rc
	;;
esac