summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/openssh/files/openssh-6.7p1-avoid-exit.patch')
-rw-r--r--net-misc/openssh/files/openssh-6.7p1-avoid-exit.patch441
1 files changed, 0 insertions, 441 deletions
diff --git a/net-misc/openssh/files/openssh-6.7p1-avoid-exit.patch b/net-misc/openssh/files/openssh-6.7p1-avoid-exit.patch
deleted file mode 100644
index 4998a941..00000000
--- a/net-misc/openssh/files/openssh-6.7p1-avoid-exit.patch
+++ /dev/null
@@ -1,441 +0,0 @@
-diff -ur a/openssh-6.7p1/configure.ac b/openssh-6.7p1/configure.ac
---- a/openssh-6.7p1/configure.ac 2014-08-26 21:32:01.000000000 -0100
-+++ b/openssh-6.7p1/configure.ac 2014-12-08 20:55:47.281836604 -0100
-@@ -252,7 +252,7 @@
- [AC_LANG_PROGRAM([[
- #include <stdlib.h>
- __attribute__((__unused__)) static void foo(void){return;}]],
-- [[ exit(0); ]])],
-+ [[ return 0; ]])],
- [ AC_MSG_RESULT([yes]) ],
- [ AC_MSG_RESULT([no])
- AC_DEFINE(NO_ATTRIBUTE_ON_RETURN_TYPE, 1,
-@@ -442,7 +442,7 @@
- [AC_LANG_PROGRAM([[
- #define testmacro foo
- #define testmacro bar]],
-- [[ exit(0); ]])],
-+ [[ return 0; ]])],
- [ AC_MSG_RESULT([yes]) ],
- [ AC_MSG_RESULT([no])
- CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
-@@ -562,9 +562,9 @@
- AC_MSG_CHECKING([if we have working getaddrinfo])
- AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <mach-o/dyld.h>
- main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
-- exit(0);
-+ return 0;
- else
-- exit(1);
-+ return 1;
- }
- ]])],
- [AC_MSG_RESULT([working])],
-@@ -1067,7 +1067,7 @@
- esac
-
- AC_MSG_CHECKING([compiler and flags for sanity])
--AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], [[ exit(0); ]])],
-+AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], [[ return 0; ]])],
- [ AC_MSG_RESULT([yes]) ],
- [
- AC_MSG_RESULT([no])
-@@ -1099,9 +1099,9 @@
- strncpy(buf,"/etc", 32);
- s = dirname(buf);
- if (!s || strncmp(s, "/", 32) != 0) {
-- exit(1);
-+ return 1;
- } else {
-- exit(0);
-+ return 0;
- }
- }
- ]])],
-@@ -1191,19 +1191,19 @@
- int a=0, b=0, c=0, d=0, n, v;
- n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
- if (n != 3 && n != 4)
-- exit(1);
-+ return 1;
- v = a*1000000 + b*10000 + c*100 + d;
- fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);
-
- /* 1.1.4 is OK */
- if (a == 1 && b == 1 && c >= 4)
-- exit(0);
-+ return 0;
-
- /* 1.2.3 and up are OK */
- if (v >= 1020300)
-- exit(0);
-+ return 0;
-
-- exit(2);
-+ return 2;
- ]])],
- AC_MSG_RESULT([no]),
- [ AC_MSG_RESULT([yes])
-@@ -1308,7 +1308,7 @@
- #include <dirent.h>]],
- [[
- struct dirent d;
-- exit(sizeof(d.d_name)<=sizeof(char));
-+ return sizeof(d.d_name)<=sizeof(char);
- ]])],
- [AC_MSG_RESULT([yes])],
- [
-@@ -1354,7 +1354,7 @@
- #include <skey.h>
- ]], [[
- char *ff = skey_keyinfo(""); ff="";
-- exit(0);
-+ return 0;
- ]])],
- [AC_MSG_RESULT([yes])],
- [
-@@ -1403,7 +1403,7 @@
- #include <stdlib.h>
- #include <stdint.h>
- #include <ldns/ldns.h>
--int main() { ldns_status status = ldns_verify_trusted(NULL, NULL, NULL, NULL); status=LDNS_STATUS_OK; exit(0); }
-+int main() { ldns_status status = ldns_verify_trusted(NULL, NULL, NULL, NULL); status=LDNS_STATUS_OK; return 0; }
- ]])
- ],
- [AC_MSG_RESULT(yes)],
-@@ -1460,7 +1460,7 @@
- [[
- int i = H_SETSIZE;
- el_init("", NULL, NULL, NULL);
-- exit(0);
-+ return 0;
- ]])],
- [ AC_MSG_RESULT([yes]) ],
- [ AC_MSG_RESULT([no])
-@@ -1808,9 +1808,9 @@
- errno=0;
- setresuid(0,0,0);
- if (errno==ENOSYS)
-- exit(1);
-+ return 1;
- else
-- exit(0);
-+ return 0;
- ]])],
- [AC_MSG_RESULT([yes])],
- [AC_DEFINE([BROKEN_SETRESUID], [1],
-@@ -1831,9 +1831,9 @@
- errno=0;
- setresgid(0,0,0);
- if (errno==ENOSYS)
-- exit(1);
-+ return 1;
- else
-- exit(0);
-+ return 0;
- ]])],
- [AC_MSG_RESULT([yes])],
- [AC_DEFINE([BROKEN_SETRESGID], [1],
-@@ -1875,7 +1875,7 @@
- [[
- char b[5];
- snprintf(b,5,"123456789");
-- exit(b[4]!='\0');
-+ return b[4]!='\0';
- ]])],
- [AC_MSG_RESULT([yes])],
- [
-@@ -1966,9 +1966,9 @@
- ]], [[
- char template[]="conftest.mkstemp-test";
- if (mkstemp(template) == -1)
-- exit(1);
-+ return 1;
- unlink(template);
-- exit(0);
-+ return 0;
- ]])],
- [
- AC_MSG_RESULT([no])
-@@ -1999,22 +1999,22 @@
-
- pid = fork();
- if (pid < 0) { /* failed */
-- exit(1);
-+ return 1;
- } else if (pid > 0) { /* parent */
- waitpid(pid, &status, 0);
- if (WIFEXITED(status))
-- exit(WEXITSTATUS(status));
-+ return WEXITSTATUS(status);
- else
-- exit(2);
-+ return 2;
- } else { /* child */
- close(0); close(1); close(2);
- setsid();
- openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
- fd = open("/dev/tty", O_RDWR | O_NOCTTY);
- if (fd >= 0)
-- exit(3); /* Acquired ctty: broken */
-+ return 3; /* Acquired ctty: broken */
- else
-- exit(0); /* Did not acquire ctty: OK */
-+ return 0; /* Did not acquire ctty: OK */
- }
- ]])],
- [
-@@ -2055,7 +2055,7 @@
- err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
- if (err != 0) {
- fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
-- exit(1);
-+ return 1;
- }
-
- for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
-@@ -2072,7 +2072,7 @@
- else
- fprintf(stderr, "getnameinfo failed: %s\n",
- gai_strerror(err));
-- exit(2);
-+ return 2;
- }
-
- sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
-@@ -2080,10 +2080,10 @@
- perror("socket");
- if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
- if (errno == EBADF)
-- exit(3);
-+ return 3;
- }
- }
-- exit(0);
-+ return 0;
- ]])],
- [
- AC_MSG_RESULT([yes])
-@@ -2123,7 +2123,7 @@
- err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
- if (err != 0) {
- fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
-- exit(1);
-+ return 1;
- }
-
- for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
-@@ -2136,10 +2136,10 @@
-
- if (ai->ai_family == AF_INET && err != 0) {
- perror("getnameinfo");
-- exit(2);
-+ return 2;
- }
- }
-- exit(0);
-+ return 0;
- ]])],
- [
- AC_MSG_RESULT([yes])
-@@ -2248,12 +2248,12 @@
-
- fd = fopen(DATA,"w");
- if(fd == NULL)
-- exit(1);
-+ return 1;
-
- if ((rc = fprintf(fd ,"%08x (%s)\n", OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT)) <0)
-- exit(1);
-+ return 1;
-
-- exit(0);
-+ return 0;
- ]])],
- [
- ssl_header_ver=`cat conftest.sslincver`
-@@ -2283,13 +2283,13 @@
-
- fd = fopen(DATA,"w");
- if(fd == NULL)
-- exit(1);
-+ return 1;
-
- if ((rc = fprintf(fd ,"%08x (%s)\n", SSLeay(),
- SSLeay_version(SSLEAY_VERSION))) <0)
-- exit(1);
-+ return 1;
-
-- exit(0);
-+ return 0;
- ]])],
- [
- ssl_library_ver=`cat conftest.ssllibver`
-@@ -2330,7 +2330,7 @@
- #include <string.h>
- #include <openssl/opensslv.h>
- ]], [[
-- exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1);
-+ return SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1;
- ]])],
- [
- AC_MSG_RESULT([yes])
-@@ -2419,7 +2419,7 @@
- #include <string.h>
- #include <openssl/evp.h>
- ]], [[
-- exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);
-+ return EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL;
- ]])],
- [
- AC_MSG_RESULT([no])
-@@ -2490,7 +2490,7 @@
- #include <openssl/evp.h>
- ]], [[
- if(EVP_DigestUpdate(NULL, NULL,0))
-- exit(0);
-+ return 0;
- ]])],
- [
- AC_MSG_RESULT([yes])
-@@ -2604,7 +2604,7 @@
- ]],[[
- EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
- const EVP_MD *m = EVP_sha512(); /* We need this too */
-- exit(e == NULL || m == NULL);
-+ return e == NULL || m == NULL;
- ]])],
- [ AC_MSG_RESULT([yes])
- enable_nistp521=1 ],
-@@ -2677,7 +2677,7 @@
- #include <string.h>
- #include <openssl/rand.h>
- ]], [[
-- exit(RAND_status() == 1 ? 0 : 1);
-+ return RAND_status() == 1 ? 0 : 1;
- ]])],
- [
- OPENSSL_SEEDS_ITSELF=yes
-@@ -2985,7 +2985,7 @@
- struct rlimit rl_zero;
-
- rl_zero.rlim_cur = rl_zero.rlim_max = 0;
-- exit(setrlimit(RLIMIT_FSIZE, &rl_zero) != 0);
-+ return setrlimit(RLIMIT_FSIZE, &rl_zero) != 0;
- ]])],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
-@@ -3119,7 +3119,7 @@
- long long i, llmin, llmax = 0;
-
- if((f = fopen(DATA,"w")) == NULL)
-- exit(1);
-+ return 1;
-
- #if defined(LLONG_MIN) && defined(LLONG_MAX)
- fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
-@@ -3138,16 +3138,16 @@
- || llmax - 1 > llmax || llmin == llmax || llmin == 0
- || llmax == 0 || llmax < LONG_MAX || llmin > LONG_MIN) {
- fprintf(f, "unknown unknown\n");
-- exit(2);
-+ return 2;
- }
-
- if (fprint_ll(f, llmin) < 0)
-- exit(3);
-+ return 3;
- if (fprint_ll(f, llmax) < 0)
-- exit(4);
-+ return 4;
- if (fclose(f) < 0)
-- exit(5);
-- exit(0);
-+ return 5;
-+ return 0;
- ]])],
- [
- llong_min=`$AWK '{print $1}' conftest.llminmax`
-@@ -3553,8 +3553,8 @@
- strcpy(expected_out, "9223372036854775807");
- snprintf(buf, mazsize, "%lld", num);
- if(strcmp(buf, expected_out) != 0)
-- exit(1);
-- exit(0);
-+ return 1;
-+ return 0;
- }
- #else
- main() { exit(0); }
-@@ -3641,11 +3641,11 @@
- ]], [[
- #ifdef msg_accrights
- #error "msg_accrights is a macro"
--exit(1);
-+return 1;
- #endif
- struct msghdr m;
- m.msg_accrights = 0;
--exit(0);
-+return 0;
- ]])],
- [ ac_cv_have_accrights_in_msghdr="yes" ],
- [ ac_cv_have_accrights_in_msghdr="no" ]
-@@ -3702,11 +3702,11 @@
- ]], [[
- #ifdef msg_control
- #error "msg_control is a macro"
--exit(1);
-+return 1;
- #endif
- struct msghdr m;
- m.msg_control = 0;
--exit(0);
-+return 0;
- ]])],
- [ ac_cv_have_control_in_msghdr="yes" ],
- [ ac_cv_have_control_in_msghdr="no" ]
-@@ -4128,22 +4128,22 @@
-
- fd = fopen(DATA,"w");
- if(fd == NULL)
-- exit(1);
-+ return 1;
-
- #if defined (_PATH_MAILDIR)
- if ((rc = fprintf(fd ,"_PATH_MAILDIR:%s\n", _PATH_MAILDIR)) <0)
-- exit(1);
-+ return 1;
- #elif defined (MAILDIR)
- if ((rc = fprintf(fd ,"MAILDIR:%s\n", MAILDIR)) <0)
-- exit(1);
-+ return 1;
- #elif defined (_PATH_MAIL)
- if ((rc = fprintf(fd ,"_PATH_MAIL:%s\n", _PATH_MAIL)) <0)
-- exit(1);
-+ return 1;
- #else
- exit (2);
- #endif
-
-- exit(0);
-+ return 0;
- ]])],
- [
- maildir_what=`awk -F: '{print $1}' conftest.maildir`
-@@ -4378,12 +4378,12 @@
-
- fd = fopen(DATA,"w");
- if(fd == NULL)
-- exit(1);
-+ return 1;
-
- if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
-- exit(1);
-+ return 1;
-
-- exit(0);
-+ return 0;
- ]])],
- [ user_path=`cat conftest.stdpath` ],
- [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],