Репозитории ALT
S: | 9.4p1-alt1 |
5.1: | 5.3p1-alt1 |
4.1: | 5.0p1-alt3 |
4.0: | 5.0p1-alt3 |
+updates: | 4.7p1-alt1 |
3.0: | 3.6.1p2-alt6 |
Группа :: Сети/Удалённый доступ
Пакет: openssh
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: openssh-3.6.1p1-owl-ssh-agent-dumpable.patch
Скачать
Скачать
diff -ur openssh-3.6.1p1.orig/ssh-agent.c openssh-3.6.1p1/ssh-agent.c
--- openssh-3.6.1p1.orig/ssh-agent.c Sat Mar 15 00:37:09 2003
+++ openssh-3.6.1p1/ssh-agent.c Mon Apr 7 22:10:45 2003
@@ -40,6 +40,10 @@
#include <openssl/evp.h>
#include <openssl/md5.h>
+#ifdef __linux__
+#include <sys/prctl.h>
+#endif
+
#include "ssh.h"
#include "rsa.h"
#include "buffer.h"
@@ -1004,6 +1008,18 @@
/* drop */
setegid(getgid());
setgid(getgid());
+
+#ifdef __linux__
+/*
+ * Protect this process even if it's not installed SGID (Linux 2.4+ only,
+ * but we also want to compile this in with older Linux kernel headers in
+ * case the binary is actually run with a 2.4+ kernel).
+ */
+#ifndef PR_SET_DUMPABLE
+#define PR_SET_DUMPABLE 4
+#endif
+ prctl(PR_SET_DUMPABLE, 0);
+#endif
SSLeay_add_all_algorithms();