summaryrefslogtreecommitdiffstats
path: root/models/publickey.go
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-08-07 06:45:29 -0400
committerUnknwon <joe2010xtmf@163.com>2014-08-07 06:45:29 -0400
commit9d5c0c80a4984acc1a42da8360a712e4f5f615a0 (patch)
tree250e5264bda4c66f3b1e96e90d9ffe6674f6ac1b /models/publickey.go
parente527c9b330d411a97a66b4ed58b3a12280d21bf8 (diff)
downloadgitea-9d5c0c80a4984acc1a42da8360a712e4f5f615a0.tar.gz
gitea-9d5c0c80a4984acc1a42da8360a712e4f5f615a0.zip
Mirror fix on #352
Diffstat (limited to 'models/publickey.go')
-rw-r--r--models/publickey.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/models/publickey.go b/models/publickey.go
index 83a3e1b87e..f9880c74cd 100644
--- a/models/publickey.go
+++ b/models/publickey.go
@@ -161,9 +161,8 @@ func saveAuthorizedKeyFile(key *PublicKey) error {
return err
}
if finfo.Mode().Perm() > 0600 {
- log.Error(3, "authorized_keys file has unusual permission flags: %s - setting to -rw-------", finfo.Mode().Perm().String())
- err = f.Chmod(0600)
- if err != nil {
+ log.Error(4, "authorized_keys file has unusual permission flags: %s - setting to -rw-------", finfo.Mode().Perm().String())
+ if err = f.Chmod(0600); err != nil {
return err
}
}