This file is indexed.

/usr/sbin/openchange_provision is in openchangeserver 1:2.0-3.

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
#! /usr/bin/python
# OpenChange provision script
#
# Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2008
#   
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#   
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#   
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

import optparse
import os,sys

# To allow running from the source directory
sys.path.append("python")

import openchange

import samba
import samba.getopt as options
import openchange.provision as openchange

parser = optparse.OptionParser("openchange_provision [options]")

sambaopts = options.SambaOptions(parser)
parser.add_option_group(sambaopts)

credopts = options.CredentialsOptions(parser)
parser.add_option_group(credopts)
parser.add_option("--firstorg", type="string", metavar="FIRSTORG", 
                  help="set OpenChange First Organization (otherwise First Organization)")
parser.add_option("--firstou", type="string", metavar="FIRSTOU", 
                  help="set OpenChange First Organization Unit (otherwise First Organization Unit)")
parser.add_option("--openchangedb", action="store_true", help="Initialize OpenChange dispatcher database")
parser.add_option("--deprovision", action="store_true", help="Uninstall the Exchange schema and objects from AD")
opts,args = parser.parse_args()
if len(args) != 0:
    parser.print_usage()
    sys.exit(1)
    
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp)

_setupdir = os.path.dirname(__file__)
if not os.path.exists(os.path.join(_setupdir, "AD")):
    _setupdir = samba.param.setup_dir()

def setup_path(*args):
    global _setupdir
    return os.path.join(_setupdir, *args)

if not opts.openchangedb:
    if opts.deprovision:
	openchange.deprovision(setup_path, lp, creds, firstorg=opts.firstorg, firstou=opts.firstou)
    else:
	openchange.provision(setup_path, lp, creds, firstorg=opts.firstorg, firstou=opts.firstou)
else:
	openchange.openchangedb_provision(lp, firstorg=opts.firstorg, firstou=opts.firstou)