View | Details | Raw Unified | Return to bug 135486
Collapse All | Expand All

(-)Users.pm (-2 / +15 lines)
Lines 2778-2784 Link Here
2778
	$plugins	= $data{"plugins"};
2778
	$plugins	= $data{"plugins"};
2779
    }
2779
    }
2780
    my $plugin_error	= "";
2780
    my $plugin_error	= "";
2781
    foreach my $plugin (sort @{$plugins}) {#FIXME sort: default LDAP plugin shoul be first!!! (or Samba plugin must add object classes every time)
2781
    foreach my $plugin (sort @{$plugins}) {
2782
	# sort: default LDAP plugin is now first, so other plugins don't have
2783
	# to check classes every time. New plugins have to do such check.
2782
	if ($plugin_error) { last; }
2784
	if ($plugin_error) { last; }
2783
	my $result = UsersPlugins->Apply ("AddBefore", {
2785
	my $result = UsersPlugins->Apply ("AddBefore", {
2784
	    "what"	=> "user",
2786
	    "what"	=> "user",
Lines 5452-5458 Link Here
5452
5454
5453
##------------------------------------
5455
##------------------------------------
5454
# Helper function, which corects the userlist entry of each group.
5456
# Helper function, which corects the userlist entry of each group.
5455
# During autoinstallation, system groups are loaded from the disk,
5457
# During autoinstallation/config mode, system groups are loaded from the disk
5456
# and the userlists of these groups can contain the local users,
5458
# and the userlists of these groups can contain the local users,
5457
# which we don not want to Import. So they are removed here.
5459
# which we don not want to Import. So they are removed here.
5458
# @param disk_groups the groups loaded from local disk
5460
# @param disk_groups the groups loaded from local disk
Lines 5729-5736 Link Here
5729
    $users_by_uidnumber{"local"}	= {};
5731
    $users_by_uidnumber{"local"}	= {};
5730
5732
5731
    RemoveDiskUsersFromGroups ($groups{"system"});
5733
    RemoveDiskUsersFromGroups ($groups{"system"});
5734
5735
    my %group_users	= %{$groups{"local"}{"users"}};
5732
    $groups{"local"}			= {};
5736
    $groups{"local"}			= {};
5733
    $groups_by_gidnumber{"local"}	= {};
5737
    $groups_by_gidnumber{"local"}	= {};
5738
    if (%group_users) {
5739
	$groups{"local"}{"users"}	= \%group_users;
5740
	my $gid	= $group_users{"gidnumber"};
5741
	$groups_by_gidnumber{"local"}{$gid}	= { "users" => 1 };
5742
	RemoveDiskUsersFromGroups ($groups{"local"});
5743
    }
5734
5744
5735
    @available_usersets		= ( "local", "system", "custom" );
5745
    @available_usersets		= ( "local", "system", "custom" );
5736
    @available_groupsets	= ( "local", "system", "custom" );
5746
    @available_groupsets	= ( "local", "system", "custom" );
Lines 5747-5752 Link Here
5747
    UsersCache->BuildUserItemList ("local", $users{"local"});
5757
    UsersCache->BuildUserItemList ("local", $users{"local"});
5748
    UsersCache->BuildGroupItemList ("local", $groups{"local"});
5758
    UsersCache->BuildGroupItemList ("local", $groups{"local"});
5749
5759
5760
    @user_custom_sets	= ("local", "system");
5761
    @group_custom_sets	= ("local", "system");
5762
        
5750
    UsersCache->SetCurrentUsers (\@user_custom_sets);
5763
    UsersCache->SetCurrentUsers (\@user_custom_sets);
5751
    UsersCache->SetCurrentGroups (\@group_custom_sets);
5764
    UsersCache->SetCurrentGroups (\@group_custom_sets);
5752
5765

Return to bug 135486