0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-12-16 02:08:54 +00:00
Lakka-LibreELEC/projects/L4T/devices/Switch/patches/openssh/openssh-ignore-keydir-permissions.patch
GavinDarkglider 3a8bf282c6
[WIP] More switch/l4t stuff (#1543)
* Update UCM, Add initial LibreELEC build changes, Add alsastate save/restore, remove old ffmpeg from switch builds
* Add mount to switch build for cheats
* Add support for nvmpi to new ffmpeg
* L4T/Switch: use Python3
* L4T: use upstream openssh package
* openssh: add Switch specific patch for keydir
* project/device options cleanup, typos, other fixes
* moonlight: move the core to lakka packages, build for other targets
* rearange a few patches
* L4T: use upstream xorg-server package
* L4T: use upstream libglvnd package
* L4T: use upstream mesa package
* L4T: use upstream util-linux package
* Remove xpadneo from L4T builds

Co-authored-by: Tomáš Kelemen (vudiq) <vudiq@vudiq.sk>
2021-11-20 12:19:31 +01:00

34 lines
1.1 KiB
Diff

diff --git a/authfile.c b/authfile.c
index 946f50c..ddc47df 100644
--- a/authfile.c
+++ b/authfile.c
@@ -89,28 +89,6 @@ sshkey_save_private(struct sshkey *key, const char *filename,
int
sshkey_perm_ok(int fd, const char *filename)
{
- struct stat st;
-
- if (fstat(fd, &st) == -1)
- return SSH_ERR_SYSTEM_ERROR;
- /*
- * if a key owned by the user is accessed, then we check the
- * permissions of the file. if the key owned by a different user,
- * then we don't care.
- */
-#ifdef HAVE_CYGWIN
- if (check_ntsec(filename))
-#endif
- if ((st.st_uid == getuid()) && (st.st_mode & 077) != 0) {
- error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
- error("@ WARNING: UNPROTECTED PRIVATE KEY FILE! @");
- error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
- error("Permissions 0%3.3o for '%s' are too open.",
- (u_int)st.st_mode & 0777, filename);
- error("It is required that your private key files are NOT accessible by others.");
- error("This private key will be ignored.");
- return SSH_ERR_KEY_BAD_PERMISSIONS;
- }
return 0;
}