Skip to content

Commit

Permalink
- enable using no secondary groups as a default (bnc#789635)
Browse files Browse the repository at this point in the history
- 2.17.53
  • Loading branch information
jsuchome committed Jan 17, 2013
1 parent 7d58c46 commit 21bc122
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.17.52
2.17.53
6 changes: 6 additions & 0 deletions package/yast2-users.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Dec 20 13:45:32 CET 2012 - jsuchome@suse.cz

- enable using no secondary groups as a default (bnc#789635)
- 2.17.53

-------------------------------------------------------------------
Wed Oct 24 15:41:57 CEST 2012 - jsuchome@suse.cz

Expand Down
12 changes: 11 additions & 1 deletion src/Users.pm
Expand Up @@ -1351,7 +1351,8 @@ sub ReadLoginDefaults {
my $self = shift;
foreach my $key (sort keys %useradd_defaults) {
my $entry = SCR->Read (".etc.default.useradd.\"\Q$key\E\"");
next if (!$entry); # use the defatuls set in this file
# use the defaults set in this file if $entry not defined
next if (!$entry && $entry ne "");
$entry =~ s/\"//g;
$useradd_defaults{$key} = $entry;
}
Expand Down Expand Up @@ -6050,6 +6051,11 @@ sub Import {
}
else {
%useradd_defaults = %{$settings{"user_defaults"}};
# if no_groups key is specifed, use no secondary groups
if ($useradd_defaults{"no_groups"} || 0) {
delete $useradd_defaults{"no_groups"};
$useradd_defaults{"groups"} = "";
}
$defaults_modified = 1;
}
if (defined $settings{"login_settings"} &&
Expand Down Expand Up @@ -6492,6 +6498,10 @@ sub Export {
"groups" => \@exported_groups,
"user_defaults" => \%useradd_defaults
);
# special key for special case of no secondary groups (bnc#789635)
if (($useradd_defaults{"groups"} || "") eq "") {
$ret{"user_defaults"}{"no_groups"} = YaST::YCP::Boolean (1);
}
if (Autologin->used ()) {
my %autologin = ();
if (Autologin->pw_less ()) {
Expand Down

0 comments on commit 21bc122

Please sign in to comment.