diff options
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/bsd-misc.c | 2 | ||||
-rw-r--r-- | openbsd-compat/bsd-snprintf.c | 2 | ||||
-rw-r--r-- | openbsd-compat/fnmatch.c | 4 | ||||
-rw-r--r-- | openbsd-compat/glob.c | 10 | ||||
-rw-r--r-- | openbsd-compat/openbsd-compat.h | 2 | ||||
-rw-r--r-- | openbsd-compat/openssl-compat.h | 6 | ||||
-rw-r--r-- | openbsd-compat/port-aix.c | 10 | ||||
-rw-r--r-- | openbsd-compat/port-aix.h | 2 | ||||
-rw-r--r-- | openbsd-compat/port-linux.c | 2 |
9 files changed, 27 insertions, 13 deletions
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index 829e0c075..059b6d3b3 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c | |||
@@ -129,7 +129,9 @@ utimensat(int fd, const char *path, const struct timespec times[2], | |||
129 | int flag) | 129 | int flag) |
130 | { | 130 | { |
131 | struct timeval tv[2]; | 131 | struct timeval tv[2]; |
132 | # ifdef HAVE_FUTIMES | ||
132 | int ret, oflags = O_WRONLY; | 133 | int ret, oflags = O_WRONLY; |
134 | # endif | ||
133 | 135 | ||
134 | tv[0].tv_sec = times[0].tv_sec; | 136 | tv[0].tv_sec = times[0].tv_sec; |
135 | tv[0].tv_usec = times[0].tv_nsec / 1000; | 137 | tv[0].tv_usec = times[0].tv_nsec / 1000; |
diff --git a/openbsd-compat/bsd-snprintf.c b/openbsd-compat/bsd-snprintf.c index f27b9d808..f041121fd 100644 --- a/openbsd-compat/bsd-snprintf.c +++ b/openbsd-compat/bsd-snprintf.c | |||
@@ -73,7 +73,7 @@ | |||
73 | * Fix incorrect zpadlen handling in fmtfp. | 73 | * Fix incorrect zpadlen handling in fmtfp. |
74 | * Thanks to Ollie Oldham <ollie.oldham@metro-optix.com> for spotting it. | 74 | * Thanks to Ollie Oldham <ollie.oldham@metro-optix.com> for spotting it. |
75 | * few mods to make it easier to compile the tests. | 75 | * few mods to make it easier to compile the tests. |
76 | * addedd the "Ollie" test to the floating point ones. | 76 | * added the "Ollie" test to the floating point ones. |
77 | * | 77 | * |
78 | * Martin Pool (mbp@samba.org) April 2003 | 78 | * Martin Pool (mbp@samba.org) April 2003 |
79 | * Remove NO_CONFIG_H so that the test case can be built within a source | 79 | * Remove NO_CONFIG_H so that the test case can be built within a source |
diff --git a/openbsd-compat/fnmatch.c b/openbsd-compat/fnmatch.c index da841d203..b5641a091 100644 --- a/openbsd-compat/fnmatch.c +++ b/openbsd-compat/fnmatch.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: fnmatch.c,v 1.21 2016/03/01 20:29:03 millert Exp $ */ | 1 | /* $OpenBSD: fnmatch.c,v 1.22 2020/03/13 03:25:45 djm Exp $ */ |
2 | 2 | ||
3 | /* Copyright (c) 2011, VMware, Inc. | 3 | /* Copyright (c) 2011, VMware, Inc. |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -294,7 +294,7 @@ int fnmatch(const char *pattern, const char *string, int flags) | |||
294 | const int leading_dir = !!(flags & FNM_LEADING_DIR); | 294 | const int leading_dir = !!(flags & FNM_LEADING_DIR); |
295 | const char *dummyptr, *matchptr, *strendseg; | 295 | const char *dummyptr, *matchptr, *strendseg; |
296 | int wild; | 296 | int wild; |
297 | /* For '*' wild processing only; surpress 'used before initialization' | 297 | /* For '*' wild processing only; suppress 'used before initialization' |
298 | * warnings with dummy initialization values; | 298 | * warnings with dummy initialization values; |
299 | */ | 299 | */ |
300 | const char *strstartseg = NULL; | 300 | const char *strstartseg = NULL; |
diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index 1e346a8f6..e89151789 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: glob.c,v 1.48 2019/02/04 16:45:40 millert Exp $ */ | 1 | /* $OpenBSD: glob.c,v 1.49 2020/04/21 08:25:22 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1989, 1993 | 3 | * Copyright (c) 1989, 1993 |
4 | * The Regents of the University of California. All rights reserved. | 4 | * The Regents of the University of California. All rights reserved. |
@@ -83,6 +83,10 @@ | |||
83 | 83 | ||
84 | #include "charclass.h" | 84 | #include "charclass.h" |
85 | 85 | ||
86 | #ifdef TILDE | ||
87 | # undef TILDE | ||
88 | #endif | ||
89 | |||
86 | #define DOLLAR '$' | 90 | #define DOLLAR '$' |
87 | #define DOT '.' | 91 | #define DOT '.' |
88 | #define EOS '\0' | 92 | #define EOS '\0' |
@@ -829,7 +833,7 @@ globextend(const Char *path, glob_t *pglob, struct glob_lim *limitp, | |||
829 | if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) { | 833 | if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) { |
830 | /* first time around -- clear initial gl_offs items */ | 834 | /* first time around -- clear initial gl_offs items */ |
831 | pathv += pglob->gl_offs; | 835 | pathv += pglob->gl_offs; |
832 | for (i = pglob->gl_offs; --i >= 0; ) | 836 | for (i = pglob->gl_offs; i > 0; i--) |
833 | *--pathv = NULL; | 837 | *--pathv = NULL; |
834 | } | 838 | } |
835 | pglob->gl_pathv = pathv; | 839 | pglob->gl_pathv = pathv; |
@@ -841,7 +845,7 @@ globextend(const Char *path, glob_t *pglob, struct glob_lim *limitp, | |||
841 | if (pglob->gl_statv == NULL && pglob->gl_offs > 0) { | 845 | if (pglob->gl_statv == NULL && pglob->gl_offs > 0) { |
842 | /* first time around -- clear initial gl_offs items */ | 846 | /* first time around -- clear initial gl_offs items */ |
843 | statv += pglob->gl_offs; | 847 | statv += pglob->gl_offs; |
844 | for (i = pglob->gl_offs; --i >= 0; ) | 848 | for (i = pglob->gl_offs; i > 0; i--) |
845 | *--statv = NULL; | 849 | *--statv = NULL; |
846 | } | 850 | } |
847 | pglob->gl_statv = statv; | 851 | pglob->gl_statv = statv; |
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h index 4a16702ef..e5fd6f5bb 100644 --- a/openbsd-compat/openbsd-compat.h +++ b/openbsd-compat/openbsd-compat.h | |||
@@ -197,7 +197,7 @@ int writev(int, struct iovec *, int); | |||
197 | #include "bsd-waitpid.h" | 197 | #include "bsd-waitpid.h" |
198 | #include "bsd-poll.h" | 198 | #include "bsd-poll.h" |
199 | 199 | ||
200 | #ifndef HAVE_GETPEEREID | 200 | #if defined(HAVE_DECL_GETPEEREID) && HAVE_DECL_GETPEEREID == 0 |
201 | int getpeereid(int , uid_t *, gid_t *); | 201 | int getpeereid(int , uid_t *, gid_t *); |
202 | #endif | 202 | #endif |
203 | 203 | ||
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h index abdcb8763..388ae8aa0 100644 --- a/openbsd-compat/openssl-compat.h +++ b/openbsd-compat/openssl-compat.h | |||
@@ -62,6 +62,12 @@ void ssh_libcrypto_init(void); | |||
62 | # define OPENSSL_DSA_MAX_MODULUS_BITS 10000 | 62 | # define OPENSSL_DSA_MAX_MODULUS_BITS 10000 |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | #ifdef LIBRESSL_VERSION_NUMBER | ||
66 | # if LIBRESSL_VERSION_NUMBER < 0x3010000fL | ||
67 | # define HAVE_BROKEN_CHACHA20 | ||
68 | # endif | ||
69 | #endif | ||
70 | |||
65 | #ifndef OPENSSL_HAVE_EVPCTR | 71 | #ifndef OPENSSL_HAVE_EVPCTR |
66 | # define EVP_aes_128_ctr evp_aes_128_ctr | 72 | # define EVP_aes_128_ctr evp_aes_128_ctr |
67 | # define EVP_aes_192_ctr evp_aes_128_ctr | 73 | # define EVP_aes_192_ctr evp_aes_128_ctr |
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c index e1ad3f117..e0d3eba51 100644 --- a/openbsd-compat/port-aix.c +++ b/openbsd-compat/port-aix.c | |||
@@ -383,12 +383,13 @@ aix_restoreauthdb(void) | |||
383 | 383 | ||
384 | # ifdef USE_AIX_KRB_NAME | 384 | # ifdef USE_AIX_KRB_NAME |
385 | /* | 385 | /* |
386 | * aix_krb5_get_principal_name: returns the user's kerberos client principal name if | 386 | * aix_krb5_get_principal_name: returns the user's kerberos client principal |
387 | * configured, otherwise NULL. Caller must free returned string. | 387 | * name if configured, otherwise NULL. Caller must free returned string. |
388 | */ | 388 | */ |
389 | char * | 389 | char * |
390 | aix_krb5_get_principal_name(char *pw_name) | 390 | aix_krb5_get_principal_name(const char *const_pw_name) |
391 | { | 391 | { |
392 | char *pw_name = (char *)const_pw_name; | ||
392 | char *authname = NULL, *authdomain = NULL, *principal = NULL; | 393 | char *authname = NULL, *authdomain = NULL, *principal = NULL; |
393 | 394 | ||
394 | setuserdb(S_READ); | 395 | setuserdb(S_READ); |
@@ -398,7 +399,8 @@ aix_krb5_get_principal_name(char *pw_name) | |||
398 | debug("AIX getuserattr S_AUTHNAME: %s", strerror(errno)); | 399 | debug("AIX getuserattr S_AUTHNAME: %s", strerror(errno)); |
399 | 400 | ||
400 | if (authdomain != NULL) | 401 | if (authdomain != NULL) |
401 | xasprintf(&principal, "%s@%s", authname ? authname : pw_name, authdomain); | 402 | xasprintf(&principal, "%s@%s", authname ? authname : pw_name, |
403 | authdomain); | ||
402 | else if (authname != NULL) | 404 | else if (authname != NULL) |
403 | principal = xstrdup(authname); | 405 | principal = xstrdup(authname); |
404 | enduserdb(); | 406 | enduserdb(); |
diff --git a/openbsd-compat/port-aix.h b/openbsd-compat/port-aix.h index 904de3096..0ee366140 100644 --- a/openbsd-compat/port-aix.h +++ b/openbsd-compat/port-aix.h | |||
@@ -97,7 +97,7 @@ char *sys_auth_get_lastlogin_msg(const char *, uid_t); | |||
97 | # define CUSTOM_FAILED_LOGIN 1 | 97 | # define CUSTOM_FAILED_LOGIN 1 |
98 | # if defined(S_AUTHDOMAIN) && defined (S_AUTHNAME) | 98 | # if defined(S_AUTHDOMAIN) && defined (S_AUTHNAME) |
99 | # define USE_AIX_KRB_NAME | 99 | # define USE_AIX_KRB_NAME |
100 | char *aix_krb5_get_principal_name(char *); | 100 | char *aix_krb5_get_principal_name(const char *); |
101 | # endif | 101 | # endif |
102 | #endif | 102 | #endif |
103 | 103 | ||
diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c index 622988822..f46094faf 100644 --- a/openbsd-compat/port-linux.c +++ b/openbsd-compat/port-linux.c | |||
@@ -193,7 +193,7 @@ ssh_selinux_change_context(const char *newname) | |||
193 | } | 193 | } |
194 | if ((cx = index(oldctx, ':')) == NULL || (cx = index(cx + 1, ':')) == | 194 | if ((cx = index(oldctx, ':')) == NULL || (cx = index(cx + 1, ':')) == |
195 | NULL) { | 195 | NULL) { |
196 | logit ("%s: unparseable context %s", __func__, oldctx); | 196 | logit ("%s: unparsable context %s", __func__, oldctx); |
197 | return; | 197 | return; |
198 | } | 198 | } |
199 | 199 | ||