From 4276959dc2e79ca0f683ff4808068432675db9a2 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 25 Jul 2017 14:55:47 -0400 Subject: [PATCH] Add runas to the actual list of privilege escalations (added in 2.3). Migration added by hand from the 3.1 migration. --- awx/main/constants.py | 2 +- awx/main/migrations/0006_v320_release.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/awx/main/constants.py b/awx/main/constants.py index 20cad97538..bd00147415 100644 --- a/awx/main/constants.py +++ b/awx/main/constants.py @@ -5,4 +5,4 @@ from django.utils.translation import ugettext_lazy as _ CLOUD_PROVIDERS = ('azure', 'azure_rm', 'ec2', 'gce', 'rax', 'vmware', 'openstack', 'satellite6', 'cloudforms') SCHEDULEABLE_PROVIDERS = CLOUD_PROVIDERS + ('custom', 'scm',) -PRIVILEGE_ESCALATION_METHODS = [ ('sudo', _('Sudo')), ('su', _('Su')), ('pbrun', _('Pbrun')), ('pfexec', _('Pfexec')), ('dzdo', _('DZDO')), ('pmrun', _('Pmrun'))] +PRIVILEGE_ESCALATION_METHODS = [ ('sudo', _('Sudo')), ('su', _('Su')), ('pbrun', _('Pbrun')), ('pfexec', _('Pfexec')), ('dzdo', _('DZDO')), ('pmrun', _('Pmrun')), ('runas', _('Runas'))] diff --git a/awx/main/migrations/0006_v320_release.py b/awx/main/migrations/0006_v320_release.py index 102b3accf2..32fc871bd2 100644 --- a/awx/main/migrations/0006_v320_release.py +++ b/awx/main/migrations/0006_v320_release.py @@ -414,6 +414,12 @@ class Migration(migrations.Migration): unique_together=set([('organization', 'name', 'credential_type')]), ), + migrations.AlterField( + model_name='credential', + name='become_method', + field=models.CharField(default=b'', help_text='Privilege escalation method.', max_length=32, blank=True, choices=[(b'', 'None'), (b'sudo', 'Sudo'), (b'su', 'Su'), (b'pbrun', 'Pbrun'), (b'pfexec', 'Pfexec'), (b'dzdo', 'DZDO'), (b'pmrun', 'Pmrun'), (b'runas', 'Runas')]), + ), + # Connecting activity stream migrations.AddField( model_name='activitystream',