[Rt-commit] rt branch, 4.4.1/externalauth-initdb, created. rt-4.4.1rc1-2-ga32c581
Shawn Moore
shawn at bestpractical.com
Mon Jun 20 16:26:14 EDT 2016
The branch, 4.4.1/externalauth-initdb has been created
at a32c5813bddccbb8b15bf1debba947766fe595d3 (commit)
- Log -----------------------------------------------------------------
commit 86b45ac4e262ecf38ea896b08b938a590741b100
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Mon Jun 20 20:22:09 2016 +0000
Avoid trying to canonicalize system users through ExternalAuth
This fixes creation of RT_System and Nobody during `make initdb`
while ExternalAuth is enabled.
Fixes: I#32009
diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index a7107a0..02e337c 100644
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -678,6 +678,10 @@ sub InsertInitialData {
my @warns;
+ # avoid trying to canonicalize system users through ExternalAuth
+ no warnings 'redefine';
+ local *RT::User::CanonicalizeUserInfo = sub { 1 };
+
# create RT_System user and grant him rights
{
require RT::CurrentUser;
commit a32c5813bddccbb8b15bf1debba947766fe595d3
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Mon Jun 20 20:24:44 2016 +0000
Allow SkipCanonicalize for users in initialdata
This fixes creation of the root user during `make initdb`
while ExternalAuth is enabled.
Fixes: I#32009
diff --git a/etc/initialdata b/etc/initialdata
index 1ed204c..e81f82d 100644
--- a/etc/initialdata
+++ b/etc/initialdata
@@ -1,13 +1,14 @@
# Initial data for a fresh RT installation.
@Users = (
- { Name => 'root',
- Gecos => 'root',
- RealName => 'Enoch Root',
- Password => 'password',
- EmailAddress => "root\@localhost",
- Comments => 'SuperUser',
- Privileged => '1',
+ { Name => 'root',
+ Gecos => 'root',
+ RealName => 'Enoch Root',
+ Password => 'password',
+ EmailAddress => "root\@localhost",
+ Comments => 'SuperUser',
+ Privileged => '1',
+ SkipCanonicalize => '1',
},
);
diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index 02e337c..81747ad 100644
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -936,6 +936,11 @@ sub InsertData {
$item->{'Password'} = $root_password;
}
my $attributes = delete $item->{ Attributes };
+
+ no warnings 'redefine';
+ local *RT::User::CanonicalizeUserInfo = sub { 1 }
+ if delete $item->{ SkipCanonicalize };
+
my $new_entry = RT::User->new( RT->SystemUser );
my ( $return, $msg ) = $new_entry->Create(%$item);
unless ( $return ) {
-----------------------------------------------------------------------
More information about the rt-commit
mailing list