Skip to content

Commit

Permalink
Merge pull request #151 from teclator/merge-SLE-12-SP3
Browse files Browse the repository at this point in the history
Merge SLE-12-SP3 into master
  • Loading branch information
teclator committed Nov 29, 2017
2 parents 9b274b0 + 20ca608 commit 90104f1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
7 changes: 7 additions & 0 deletions package/yast2-users.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Nov 28 08:14:48 UTC 2017 - knut.anderssen@suse.com

- AutoYaST: Write and export SSH authorized keys also for root user
(bsc#1066342).
- 4.0.1

-------------------------------------------------------------------
Wed Nov 8 12:16:47 UTC 2017 - jsrain@suse.cz

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-users.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-users
Version: 4.0.0
Version: 4.0.1
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
6 changes: 6 additions & 0 deletions src/modules/Users.pm
Expand Up @@ -4032,6 +4032,12 @@ sub WriteAuthorizedKeys {
SSHAuthorizedKeys->write_keys($user{"homeDirectory"});
}
}

# Write root authorized keys(bsc#1066342)
my %root_user = %{$modified_users{"system"}{"root"}};
if ($root_user{"modified"} eq "imported") {
SSHAuthorizedKeys->write_keys($root_user{"homeDirectory"});
}
}

##------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions src/modules/UsersPasswd.pm
Expand Up @@ -305,6 +305,10 @@ sub read_authorized_keys {
foreach my $user (values %{$users{"local"}}) {
SSHAuthorizedKeys->read_keys($user->{"homeDirectory"});
}

# Read authorized keys also from root's home (bsc#1066342)
my %root_user = %{$users{"system"}{"root"}};
SSHAuthorizedKeys->read_keys($root_user{"homeDirectory"});
}

# actually read /etc/passwd and save into internal structure
Expand Down

0 comments on commit 90104f1

Please sign in to comment.