/[smecontribs]/rpms/smeserver-freepbx/contribs7/smeserver-freepbx-0.1-ari_password_from_db.patch
ViewVC logotype

Annotation of /rpms/smeserver-freepbx/contribs7/smeserver-freepbx-0.1-ari_password_from_db.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Thu Jul 15 10:12:03 2010 UTC (13 years, 10 months ago) by vip-ire
Branch: MAIN
CVS Tags: smeserver-freepbx-0_1-27_el4_sme, smeserver-freepbx-0_1-31_el4_sme, smeserver-freepbx-0_1-32_el4_sme, smeserver-freepbx-0_1-28_el4_sme, smeserver-freepbx-0_1-29_el4_sme, smeserver-freepbx-0_1-30_el4_sme, HEAD
* Thu Jul 15 2010 Daniel B. <daniel@firewall-services.com> [0.1-27]
- Read ARI password from the DB (and initialize a random one)

1 vip-ire 1.1 diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/createlinks mezzanine_patched_smeserver-freepbx-0.1/createlinks
2     --- smeserver-freepbx-0.1/createlinks 2010-07-15 11:11:54.000000000 +0200
3     +++ mezzanine_patched_smeserver-freepbx-0.1/createlinks 2010-07-15 11:06:21.000000000 +0200
4     @@ -39,9 +39,7 @@
5    
6     event_link("freepbx-checkinstall", $event, "10");
7     event_link("freepbx-applypatch", $event, "20");
8     -event_link("freepbx-security", $event, "30");
9     event_link("freepbx-clean-crontab", $event, "40");
10     -event_link("freepbx-security", "bootstrap-console-save", "90");
11     event_link("freepbx-dump-astdb", "pre-backup", "30");
12    
13     safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mysql.init");
14     diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/migrate/freepbx mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/migrate/freepbx
15     --- smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/migrate/freepbx 2010-07-15 11:11:54.000000000 +0200
16     +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/migrate/freepbx 2010-07-15 11:05:50.000000000 +0200
17     @@ -7,6 +7,9 @@
18     my $managerpass = $freepbx->prop('ManagerPassword') ||
19     $freepbx->set_prop('ManagerPassword', `/usr/bin/openssl rand -base64 10 | /usr/bin/tr -c -d '[:alnum:]'`);
20    
21     +my $aripass = $freepbx->prop('AriPassword') ||
22     + $freepbx->set_prop('AriPassword', `/usr/bin/openssl rand -base64 10 | /usr/bin/tr -c -d '[:alnum:]'`);
23     +
24     my $fop = $DB->get('fop') || $DB->new_record('fop', {type => 'service'});
25    
26     my $foppass = $fop->prop('Password') || '';
27     diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/events/actions/freepbx-security mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/events/actions/freepbx-security
28     --- smeserver-freepbx-0.1/root/etc/e-smith/events/actions/freepbx-security 2010-07-15 11:11:54.000000000 +0200
29     +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/events/actions/freepbx-security 1970-01-01 01:00:00.000000000 +0100
30     @@ -1,11 +0,0 @@
31     -#!/bin/bash
32     -
33     -# Put a random password for ari admin. This function should be more documented
34     -
35     -PASS=`/usr/bin/openssl rand -base64 40 | /usr/bin/tr -c -d '[:graph:]'`
36     -
37     -if [ -e /opt/freepbx/recordings/includes/main.conf.php ]; then
38     - sed -i -e "s/\$ARI_ADMIN_PASSWORD =\"ari_password\";/\$ARI_ADMIN_PASSWORD = \"$PASS\";/" \
39     - /opt/freepbx/recordings/includes/main.conf.php
40     -fi
41     -
42     diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/amportal.conf/70ari mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/amportal.conf/70ari
43     --- smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/amportal.conf/70ari 1970-01-01 01:00:00.000000000 +0100
44     +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/amportal.conf/70ari 2010-07-15 11:04:47.000000000 +0200
45     @@ -0,0 +1,14 @@
46     +{
47     +my $aripass = ${'freepbx'}{'AriPassword'} || 'azerty';
48     +
49     +$OUT.=<<"HERE";
50     +
51     +# This is the default admin name used to allow an administrator to login to ARI bypassing all security.
52     +ARI_ADMIN_USERNAME=admin
53     +
54     +# This is the default admin password to allow an administrator to login to ARI bypassing all security.
55     +ARI_ADMIN_PASSWORD=$aripass
56     +
57     +HERE
58     +}
59     +

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed