1 /* $OpenBSD: auth2.c,v 1.168 2023/12/18 14:45:49 djm Exp $ */
3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 #include <sys/types.h>
53 #include "pathnames.h"
55 #include "blacklist_client.h"
59 #include "monitor_wrap.h"
64 extern ServerOptions options;
65 extern struct sshbuf *loginmsg;
69 extern Authmethod method_none;
70 extern Authmethod method_pubkey;
71 extern Authmethod method_passwd;
72 extern Authmethod method_kbdint;
73 extern Authmethod method_hostbased;
75 extern Authmethod method_gssapi;
78 Authmethod *authmethods[] = {
92 static int input_service_request(int, u_int32_t, struct ssh *);
93 static int input_userauth_request(int, u_int32_t, struct ssh *);
96 static Authmethod *authmethod_byname(const char *);
97 static Authmethod *authmethod_lookup(Authctxt *, const char *);
98 static char *authmethods_get(Authctxt *authctxt);
100 #define MATCH_NONE 0 /* method or submethod mismatch */
101 #define MATCH_METHOD 1 /* method matches (no submethod specified) */
102 #define MATCH_BOTH 2 /* method and submethod match */
103 #define MATCH_PARTIAL 3 /* method matches, submethod can't be checked */
104 static int list_starts_with(const char *, const char *, const char *);
107 auth2_read_banner(void)
114 if ((fd = open(options.banner, O_RDONLY)) == -1)
116 if (fstat(fd, &st) == -1) {
120 if (st.st_size <= 0 || st.st_size > 1*1024*1024) {
125 len = (size_t)st.st_size; /* truncate */
126 banner = xmalloc(len + 1);
127 n = atomicio(read, fd, banner, len);
140 userauth_send_banner(struct ssh *ssh, const char *msg)
144 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_BANNER)) != 0 ||
145 (r = sshpkt_put_cstring(ssh, msg)) != 0 ||
146 (r = sshpkt_put_cstring(ssh, "")) != 0 || /* language, unused */
147 (r = sshpkt_send(ssh)) != 0)
148 fatal_fr(r, "send packet");
149 debug("%s: sent", __func__);
153 userauth_banner(struct ssh *ssh)
157 if (options.banner == NULL)
160 if ((banner = PRIVSEP(auth2_read_banner())) == NULL)
162 userauth_send_banner(ssh, banner);
169 * loop until authctxt->success == TRUE
172 do_authentication2(struct ssh *ssh)
174 Authctxt *authctxt = ssh->authctxt;
176 ssh_dispatch_init(ssh, &dispatch_protocol_error);
177 if (ssh->kex->ext_info_c)
178 ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &kex_input_ext_info);
179 ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_REQUEST, &input_service_request);
180 ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt->success);
181 ssh->authctxt = NULL;
185 input_service_request(int type, u_int32_t seq, struct ssh *ssh)
187 Authctxt *authctxt = ssh->authctxt;
188 char *service = NULL;
191 if ((r = sshpkt_get_cstring(ssh, &service, NULL)) != 0 ||
192 (r = sshpkt_get_end(ssh)) != 0)
195 if (authctxt == NULL)
196 fatal("input_service_request: no authctxt");
198 if (strcmp(service, "ssh-userauth") == 0) {
199 if (!authctxt->success) {
201 /* now we can handle user-auth requests */
202 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_REQUEST,
203 &input_userauth_request);
206 /* XXX all other service requests are denied */
209 if ((r = sshpkt_start(ssh, SSH2_MSG_SERVICE_ACCEPT)) != 0 ||
210 (r = sshpkt_put_cstring(ssh, service)) != 0 ||
211 (r = sshpkt_send(ssh)) != 0 ||
212 (r = ssh_packet_write_wait(ssh)) != 0)
215 debug("bad service request %s", service);
216 ssh_packet_disconnect(ssh, "bad service request %s", service);
218 ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &dispatch_protocol_error);
225 #define MIN_FAIL_DELAY_SECONDS 0.005
226 #define MAX_FAIL_DELAY_SECONDS 5.0
228 user_specific_delay(const char *user)
231 size_t len = ssh_digest_bytes(SSH_DIGEST_SHA512);
232 u_char *hash = xmalloc(len);
235 (void)snprintf(b, sizeof b, "%llu%s",
236 (unsigned long long)options.timing_secret, user);
237 if (ssh_digest_memory(SSH_DIGEST_SHA512, b, strlen(b), hash, len) != 0)
238 fatal_f("ssh_digest_memory");
239 /* 0-4.2 ms of delay */
240 delay = (double)PEEK_U32(hash) / 1000 / 1000 / 1000 / 1000;
242 debug3_f("user specific delay %0.3lfms", delay/1000);
243 return MIN_FAIL_DELAY_SECONDS + delay;
247 ensure_minimum_time_since(double start, double seconds)
250 double elapsed = monotime_double() - start, req = seconds, remain;
252 if (elapsed > MAX_FAIL_DELAY_SECONDS) {
253 debug3_f("elapsed %0.3lfms exceeded the max delay "
254 "requested %0.3lfms)", elapsed*1000, req*1000);
258 /* if we've already passed the requested time, scale up */
259 while ((remain = seconds - elapsed) < 0.0)
263 ts.tv_nsec = (remain - ts.tv_sec) * 1000000000;
264 debug3_f("elapsed %0.3lfms, delaying %0.3lfms (requested %0.3lfms)",
265 elapsed*1000, remain*1000, req*1000);
266 nanosleep(&ts, NULL);
270 input_userauth_request(int type, u_int32_t seq, struct ssh *ssh)
272 Authctxt *authctxt = ssh->authctxt;
273 Authmethod *m = NULL;
274 char *user = NULL, *service = NULL, *method = NULL, *style = NULL;
275 int r, authenticated = 0;
276 double tstart = monotime_double();
278 if (authctxt == NULL)
279 fatal("input_userauth_request: no authctxt");
281 if ((r = sshpkt_get_cstring(ssh, &user, NULL)) != 0 ||
282 (r = sshpkt_get_cstring(ssh, &service, NULL)) != 0 ||
283 (r = sshpkt_get_cstring(ssh, &method, NULL)) != 0)
285 debug("userauth-request for user %s service %s method %s", user, service, method);
286 debug("attempt %d failures %d", authctxt->attempt, authctxt->failures);
288 if ((style = strchr(user, ':')) != NULL)
291 if (authctxt->attempt >= 1024)
292 auth_maxtries_exceeded(ssh);
293 if (authctxt->attempt++ == 0) {
294 /* setup auth context */
295 authctxt->pw = PRIVSEP(getpwnamallow(ssh, user));
296 authctxt->user = xstrdup(user);
297 if (authctxt->pw && strcmp(service, "ssh-connection")==0) {
299 debug2_f("setting up authctxt for %s", user);
302 /* Invalid user, fake password information */
303 authctxt->pw = fakepw();
304 #ifdef SSH_AUDIT_EVENTS
305 PRIVSEP(audit_event(ssh, SSH_INVALID_USER));
310 PRIVSEP(start_pam(ssh));
312 ssh_packet_set_log_preamble(ssh, "%suser %s",
313 authctxt->valid ? "authenticating " : "invalid ", user);
314 setproctitle("%s%s", authctxt->valid ? user : "unknown",
315 use_privsep ? " [net]" : "");
316 authctxt->service = xstrdup(service);
317 authctxt->style = style ? xstrdup(style) : NULL;
319 mm_inform_authserv(service, style);
320 userauth_banner(ssh);
321 if ((r = kex_server_update_ext_info(ssh)) != 0)
322 fatal_fr(r, "kex_server_update_ext_info failed");
323 if (auth2_setup_methods_lists(authctxt) != 0)
324 ssh_packet_disconnect(ssh,
325 "no authentication methods enabled");
326 } else if (strcmp(user, authctxt->user) != 0 ||
327 strcmp(service, authctxt->service) != 0) {
328 ssh_packet_disconnect(ssh, "Change of username or service "
329 "not allowed: (%s,%s) -> (%s,%s)",
330 authctxt->user, authctxt->service, user, service);
333 auth2_challenge_stop(ssh);
336 /* XXX move to auth2_gssapi_stop() */
337 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
338 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL);
341 auth2_authctxt_reset_info(authctxt);
342 authctxt->postponed = 0;
343 authctxt->server_caused_failure = 0;
345 /* try to authenticate user */
346 m = authmethod_lookup(authctxt, method);
347 if (m != NULL && authctxt->failures < options.max_authtries) {
348 debug2("input_userauth_request: try method %s", method);
349 authenticated = m->userauth(ssh, method);
351 if (!authctxt->authenticated && strcmp(method, "none") != 0)
352 ensure_minimum_time_since(tstart,
353 user_specific_delay(authctxt->user));
354 userauth_finish(ssh, authenticated, method, NULL);
364 userauth_finish(struct ssh *ssh, int authenticated, const char *packet_method,
365 const char *submethod)
367 Authctxt *authctxt = ssh->authctxt;
368 Authmethod *m = NULL;
369 const char *method = packet_method;
374 if (!authctxt->valid) {
375 fatal("INTERNAL ERROR: authenticated invalid user %s",
378 if (authctxt->postponed)
379 fatal("INTERNAL ERROR: authenticated and postponed");
380 /* prefer primary authmethod name to possible synonym */
381 if ((m = authmethod_byname(method)) == NULL)
382 fatal("INTERNAL ERROR: bad method %s", method);
386 /* Special handling for root */
387 if (authenticated && authctxt->pw->pw_uid == 0 &&
388 !auth_root_allowed(ssh, method)) {
390 #ifdef SSH_AUDIT_EVENTS
391 PRIVSEP(audit_event(ssh, SSH_LOGIN_ROOT_DENIED));
395 if (authenticated && options.num_auth_methods != 0) {
396 if (!auth2_update_methods_lists(authctxt, method, submethod)) {
402 /* Log before sending the reply */
403 auth_log(ssh, authenticated, partial, method, submethod);
405 /* Update information exposed to session */
406 if (authenticated || partial)
407 auth2_update_session_info(authctxt, method, submethod);
409 if (authctxt->postponed)
413 if (options.use_pam && authenticated) {
414 int r, success = PRIVSEP(do_pam_account());
416 /* If PAM returned a message, send it to the user. */
417 if (sshbuf_len(loginmsg) > 0) {
418 if ((r = sshbuf_put(loginmsg, "\0", 1)) != 0)
419 fatal("%s: buffer error: %s",
420 __func__, ssh_err(r));
421 userauth_send_banner(ssh, sshbuf_ptr(loginmsg));
422 if ((r = ssh_packet_write_wait(ssh)) != 0) {
424 "%s: send PAM banner", __func__);
428 fatal("Access denied for user %s by PAM account "
429 "configuration", authctxt->user);
434 if (authenticated == 1) {
435 /* turn off userauth */
436 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_REQUEST,
437 &dispatch_protocol_ignore);
438 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_SUCCESS)) != 0 ||
439 (r = sshpkt_send(ssh)) != 0 ||
440 (r = ssh_packet_write_wait(ssh)) != 0)
441 fatal_fr(r, "send success packet");
442 /* now we can break out */
443 authctxt->success = 1;
444 ssh_packet_set_log_preamble(ssh, "user %s", authctxt->user);
446 /* Allow initial try of "none" auth without failure penalty */
447 if (!partial && !authctxt->server_caused_failure &&
448 (authctxt->attempt > 1 || strcmp(method, "none") != 0)) {
449 authctxt->failures++;
450 BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_FAIL, "ssh");
452 if (authctxt->failures >= options.max_authtries) {
453 #ifdef SSH_AUDIT_EVENTS
454 PRIVSEP(audit_event(ssh, SSH_LOGIN_EXCEED_MAXTRIES));
456 auth_maxtries_exceeded(ssh);
458 methods = authmethods_get(authctxt);
459 debug3_f("failure partial=%d next methods=\"%s\"",
461 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_FAILURE)) != 0 ||
462 (r = sshpkt_put_cstring(ssh, methods)) != 0 ||
463 (r = sshpkt_put_u8(ssh, partial)) != 0 ||
464 (r = sshpkt_send(ssh)) != 0 ||
465 (r = ssh_packet_write_wait(ssh)) != 0)
466 fatal_fr(r, "send failure packet");
472 * Checks whether method is allowed by at least one AuthenticationMethods
473 * methods list. Returns 1 if allowed, or no methods lists configured.
477 auth2_method_allowed(Authctxt *authctxt, const char *method,
478 const char *submethod)
483 * NB. authctxt->num_auth_methods might be zero as a result of
484 * auth2_setup_methods_lists(), so check the configuration.
486 if (options.num_auth_methods == 0)
488 for (i = 0; i < authctxt->num_auth_methods; i++) {
489 if (list_starts_with(authctxt->auth_methods[i], method,
490 submethod) != MATCH_NONE)
497 authmethods_get(Authctxt *authctxt)
503 if ((b = sshbuf_new()) == NULL)
504 fatal_f("sshbuf_new failed");
505 for (i = 0; authmethods[i] != NULL; i++) {
506 if (strcmp(authmethods[i]->name, "none") == 0)
508 if (authmethods[i]->enabled == NULL ||
509 *(authmethods[i]->enabled) == 0)
511 if (!auth2_method_allowed(authctxt, authmethods[i]->name,
514 if ((r = sshbuf_putf(b, "%s%s", sshbuf_len(b) ? "," : "",
515 authmethods[i]->name)) != 0)
516 fatal_fr(r, "buffer error");
518 if ((list = sshbuf_dup_string(b)) == NULL)
519 fatal_f("sshbuf_dup_string failed");
525 authmethod_byname(const char *name)
530 fatal_f("NULL authentication method name");
531 for (i = 0; authmethods[i] != NULL; i++) {
532 if (strcmp(name, authmethods[i]->name) == 0 ||
533 (authmethods[i]->synonym != NULL &&
534 strcmp(name, authmethods[i]->synonym) == 0))
535 return authmethods[i];
537 debug_f("unrecognized authentication method name: %s", name);
542 authmethod_lookup(Authctxt *authctxt, const char *name)
546 if ((method = authmethod_byname(name)) == NULL)
549 if (method->enabled == NULL || *(method->enabled) == 0) {
550 debug3_f("method %s not enabled", name);
553 if (!auth2_method_allowed(authctxt, method->name, NULL)) {
554 debug3_f("method %s not allowed "
555 "by AuthenticationMethods", name);
562 * Check a comma-separated list of methods for validity. Is need_enable is
563 * non-zero, then also require that the methods are enabled.
564 * Returns 0 on success or -1 if the methods list is invalid.
567 auth2_methods_valid(const char *_methods, int need_enable)
569 char *methods, *omethods, *method, *p;
573 if (*_methods == '\0') {
574 error("empty authentication method list");
577 omethods = methods = xstrdup(_methods);
578 while ((method = strsep(&methods, ",")) != NULL) {
579 for (found = i = 0; !found && authmethods[i] != NULL; i++) {
580 if ((p = strchr(method, ':')) != NULL)
582 if (strcmp(method, authmethods[i]->name) != 0)
585 if (authmethods[i]->enabled == NULL ||
586 *(authmethods[i]->enabled) == 0) {
587 error("Disabled method \"%s\" in "
588 "AuthenticationMethods list \"%s\"",
597 error("Unknown authentication method \"%s\" in list",
609 * Prune the AuthenticationMethods supplied in the configuration, removing
610 * any methods lists that include disabled methods. Note that this might
611 * leave authctxt->num_auth_methods == 0, even when multiple required auth
612 * has been requested. For this reason, all tests for whether multiple is
613 * enabled should consult options.num_auth_methods directly.
616 auth2_setup_methods_lists(Authctxt *authctxt)
620 /* First, normalise away the "any" pseudo-method */
621 if (options.num_auth_methods == 1 &&
622 strcmp(options.auth_methods[0], "any") == 0) {
623 free(options.auth_methods[0]);
624 options.auth_methods[0] = NULL;
625 options.num_auth_methods = 0;
628 if (options.num_auth_methods == 0)
630 debug3_f("checking methods");
631 authctxt->auth_methods = xcalloc(options.num_auth_methods,
632 sizeof(*authctxt->auth_methods));
633 authctxt->num_auth_methods = 0;
634 for (i = 0; i < options.num_auth_methods; i++) {
635 if (auth2_methods_valid(options.auth_methods[i], 1) != 0) {
636 logit("Authentication methods list \"%s\" contains "
637 "disabled method, skipping",
638 options.auth_methods[i]);
641 debug("authentication methods list %d: %s",
642 authctxt->num_auth_methods, options.auth_methods[i]);
643 authctxt->auth_methods[authctxt->num_auth_methods++] =
644 xstrdup(options.auth_methods[i]);
646 if (authctxt->num_auth_methods == 0) {
647 error("No AuthenticationMethods left after eliminating "
655 list_starts_with(const char *methods, const char *method,
656 const char *submethod)
658 size_t l = strlen(method);
662 if (strncmp(methods, method, l) != 0)
665 match = MATCH_METHOD;
668 return MATCH_PARTIAL;
669 l = strlen(submethod);
671 if (strncmp(submethod, p, l))
676 if (*p != ',' && *p != '\0')
682 * Remove method from the start of a comma-separated list of methods.
683 * Returns 0 if the list of methods did not start with that method or 1
687 remove_method(char **methods, const char *method, const char *submethod)
689 char *omethods = *methods, *p;
690 size_t l = strlen(method);
693 match = list_starts_with(omethods, method, submethod);
694 if (match != MATCH_METHOD && match != MATCH_BOTH)
697 if (submethod && match == MATCH_BOTH)
698 p += 1 + strlen(submethod); /* include colon */
701 *methods = xstrdup(p);
707 * Called after successful authentication. Will remove the successful method
708 * from the start of each list in which it occurs. If it was the last method
709 * in any list, then authentication is deemed successful.
710 * Returns 1 if the method completed any authentication list or 0 otherwise.
713 auth2_update_methods_lists(Authctxt *authctxt, const char *method,
714 const char *submethod)
718 debug3_f("updating methods list after \"%s\"", method);
719 for (i = 0; i < authctxt->num_auth_methods; i++) {
720 if (!remove_method(&(authctxt->auth_methods[i]), method,
724 if (*authctxt->auth_methods[i] == '\0') {
725 debug2("authentication methods list %d complete", i);
728 debug3("authentication methods list %d remaining: \"%s\"",
729 i, authctxt->auth_methods[i]);
731 /* This should not happen, but would be bad if it did */
733 fatal_f("method not in AuthenticationMethods");
737 /* Reset method-specific information */
738 void auth2_authctxt_reset_info(Authctxt *authctxt)
740 sshkey_free(authctxt->auth_method_key);
741 free(authctxt->auth_method_info);
742 authctxt->auth_method_key = NULL;
743 authctxt->auth_method_info = NULL;
746 /* Record auth method-specific information for logs */
748 auth2_record_info(Authctxt *authctxt, const char *fmt, ...)
753 free(authctxt->auth_method_info);
754 authctxt->auth_method_info = NULL;
757 i = vasprintf(&authctxt->auth_method_info, fmt, ap);
761 fatal_f("vasprintf failed");
765 * Records a public key used in authentication. This is used for logging
766 * and to ensure that the same key is not subsequently accepted again for
767 * multiple authentication.
770 auth2_record_key(Authctxt *authctxt, int authenticated,
771 const struct sshkey *key)
773 struct sshkey **tmp, *dup;
776 if ((r = sshkey_from_private(key, &dup)) != 0)
777 fatal_fr(r, "copy key");
778 sshkey_free(authctxt->auth_method_key);
779 authctxt->auth_method_key = dup;
784 /* If authenticated, make sure we don't accept this key again */
785 if ((r = sshkey_from_private(key, &dup)) != 0)
786 fatal_fr(r, "copy key");
787 if (authctxt->nprev_keys >= INT_MAX ||
788 (tmp = recallocarray(authctxt->prev_keys, authctxt->nprev_keys,
789 authctxt->nprev_keys + 1, sizeof(*authctxt->prev_keys))) == NULL)
790 fatal_f("reallocarray failed");
791 authctxt->prev_keys = tmp;
792 authctxt->prev_keys[authctxt->nprev_keys] = dup;
793 authctxt->nprev_keys++;
797 /* Checks whether a key has already been previously used for authentication */
799 auth2_key_already_used(Authctxt *authctxt, const struct sshkey *key)
804 for (i = 0; i < authctxt->nprev_keys; i++) {
805 if (sshkey_equal_public(key, authctxt->prev_keys[i])) {
806 fp = sshkey_fingerprint(authctxt->prev_keys[i],
807 options.fingerprint_hash, SSH_FP_DEFAULT);
808 debug3_f("key already used: %s %s",
809 sshkey_type(authctxt->prev_keys[i]),
810 fp == NULL ? "UNKNOWN" : fp);
819 * Updates authctxt->session_info with details of authentication. Should be
820 * whenever an authentication method succeeds.
823 auth2_update_session_info(Authctxt *authctxt, const char *method,
824 const char *submethod)
828 if (authctxt->session_info == NULL) {
829 if ((authctxt->session_info = sshbuf_new()) == NULL)
830 fatal_f("sshbuf_new");
833 /* Append method[/submethod] */
834 if ((r = sshbuf_putf(authctxt->session_info, "%s%s%s",
835 method, submethod == NULL ? "" : "/",
836 submethod == NULL ? "" : submethod)) != 0)
837 fatal_fr(r, "append method");
839 /* Append key if present */
840 if (authctxt->auth_method_key != NULL) {
841 if ((r = sshbuf_put_u8(authctxt->session_info, ' ')) != 0 ||
842 (r = sshkey_format_text(authctxt->auth_method_key,
843 authctxt->session_info)) != 0)
844 fatal_fr(r, "append key");
847 if (authctxt->auth_method_info != NULL) {
848 /* Ensure no ambiguity here */
849 if (strchr(authctxt->auth_method_info, '\n') != NULL)
850 fatal_f("auth_method_info contains \\n");
851 if ((r = sshbuf_put_u8(authctxt->session_info, ' ')) != 0 ||
852 (r = sshbuf_putf(authctxt->session_info, "%s",
853 authctxt->auth_method_info)) != 0) {
854 fatal_fr(r, "append method info");
857 if ((r = sshbuf_put_u8(authctxt->session_info, '\n')) != 0)
858 fatal_fr(r, "append");