diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-12-03 15:21:20 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-12-03 15:21:20 -0800 |
commit | cd0320558342126ca8df91dd7d73f4561890e00d (patch) | |
tree | 2d45146fcb62d114dc58b5ba6ed6d28d345f6d1a /lib | |
parent | a907683b2f0b69581bc8c770020702c18e112e87 (diff) | |
parent | 31590c67860fb99d5c4b267dd880fe63497fb89f (diff) | |
download | vyatta-cfg-system-cd0320558342126ca8df91dd7d73f4561890e00d.tar.gz vyatta-cfg-system-cd0320558342126ca8df91dd7d73f4561890e00d.zip |
Merge branch 'kenwood' of 192.168.100.1:git/vyatta-cfg-system into kenwood
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Vyatta/Login/User.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Vyatta/Login/User.pm b/lib/Vyatta/Login/User.pm index f6706e4e..018e7e12 100755 --- a/lib/Vyatta/Login/User.pm +++ b/lib/Vyatta/Login/User.pm @@ -130,10 +130,11 @@ sub set_authorized_keys { unless (-d $sshdir) { mkdir $sshdir; chown ($uid, $gid, $sshdir); + chmod (0750, $sshdir); } my $auth; - unless (open (my $auth, "$sshdir/authorized_keys")) { + unless (open (my $auth, '>', "$sshdir/authorized_keys")) { warn "open $sshdir/authorized_keys failed: $!"; return; } @@ -152,6 +153,7 @@ sub set_authorized_keys { } select STDOUT; close $auth; + chmod (0640, "$sshdir/authorized_keys"); } sub update { |