diff options
author | djm@openbsd.org <djm@openbsd.org> | 2024-03-04 03:16:11 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2024-03-04 04:46:46 +0100 |
commit | 65a44a8a4f7d902a64d4e60eda84384b2e2a24a2 (patch) | |
tree | 76eab9c84fef54d5eb21825ff2b60ad678d7fcf8 /misc.c | |
parent | Add nbsd10 test target. (diff) | |
download | openssh-65a44a8a4f7d902a64d4e60eda84384b2e2a24a2.tar.xz openssh-65a44a8a4f7d902a64d4e60eda84384b2e2a24a2.zip |
upstream: Separate parsing of string array options from applying them
to the active configuration. This fixes the config parser from erroneously
rejecting cases like:
AuthenticationMethods password
Match User ivy
AuthenticationMethods any
bz3657 ok markus@
OpenBSD-Commit-ID: 7f196cba634c2a3dba115f3fac3c4635a2199491
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.189 2023/10/12 03:36:32 djm Exp $ */ +/* $OpenBSD: misc.c,v 1.190 2024/03/04 02:16:11 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005-2020 Damien Miller. All rights reserved. @@ -2644,6 +2644,19 @@ opt_array_append(const char *file, const int line, const char *directive, opt_array_append2(file, line, directive, array, NULL, lp, s, 0); } +void +opt_array_free2(char **array, int **iarray, u_int l) +{ + u_int i; + + if (array == NULL || l == 0) + return; + for (i = 0; i < l; i++) + free(array[i]); + free(array); + free(iarray); +} + sshsig_t ssh_signal(int signum, sshsig_t handler) { |