/[LeafOK_CVS]/lbbs/src/net_server.c
ViewVC logotype

Diff of /lbbs/src/net_server.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.97 by sysadm, Fri Nov 28 03:23:58 2025 UTC Revision 1.99 by sysadm, Mon Dec 1 14:01:36 2025 UTC
# Line 422  static int fork_server(void) Line 422  static int fork_server(void)
422                          log_error("Error setting SSH options: %s\n", ssh_get_error(SSH_session));                          log_error("Error setting SSH options: %s\n", ssh_get_error(SSH_session));
423                          goto cleanup;                          goto cleanup;
424                  }                  }
425    
426                    ssh_set_blocking(SSH_session, 0);
427          }          }
428    
429          // Redirect Input          // Redirect Input
# Line 536  int net_server(const char *hostaddr, in_ Line 538  int net_server(const char *hostaddr, in_
538    
539          if (ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HOSTKEY, SSH_HOST_RSA_KEY_FILE) < 0)          if (ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HOSTKEY, SSH_HOST_RSA_KEY_FILE) < 0)
540          {          {
541                  log_error("Error setting SSH RSA key: %s\n", SSH_HOST_RSA_KEY_FILE);                  log_error("Error loading SSH RSA key: %s\n", SSH_HOST_RSA_KEY_FILE);
542          }          }
543          else          else
544          {          {
# Line 544  int net_server(const char *hostaddr, in_ Line 546  int net_server(const char *hostaddr, in_
546          }          }
547          if (ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HOSTKEY, SSH_HOST_ED25519_KEY_FILE) < 0)          if (ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HOSTKEY, SSH_HOST_ED25519_KEY_FILE) < 0)
548          {          {
549                  log_error("Error setting SSH ED25519 key: %s\n", SSH_HOST_ED25519_KEY_FILE);                  log_error("Error loading SSH ED25519 key: %s\n", SSH_HOST_ED25519_KEY_FILE);
550            }
551            else
552            {
553                    ssh_key_valid = 1;
554            }
555            if (ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HOSTKEY, SSH_HOST_ECDSA_KEY_FILE) < 0)
556            {
557                    log_error("Error loading SSH ECDSA key: %s\n", SSH_HOST_ECDSA_KEY_FILE);
558          }          }
559          else          else
560          {          {
# Line 560  int net_server(const char *hostaddr, in_ Line 570  int net_server(const char *hostaddr, in_
570    
571          if (ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_BINDADDR, hostaddr) < 0 ||          if (ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_BINDADDR, hostaddr) < 0 ||
572                  ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_BINDPORT, &port) < 0 ||                  ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_BINDPORT, &port) < 0 ||
573                  ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HOSTKEY_ALGORITHMS, "ssh-rsa,rsa-sha2-512,rsa-sha2-256,ssh-ed25519") < 0 ||                  ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HOSTKEY_ALGORITHMS, "+ssh-rsa") < 0 ||
574                  ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_LOG_VERBOSITY, &ssh_log_level) < 0)                  ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_LOG_VERBOSITY, &ssh_log_level) < 0)
575          {          {
576                  log_error("Error setting SSH bind options: %s\n", ssh_get_error(sshbind));                  log_error("Error setting SSH bind options: %s\n", ssh_get_error(sshbind));
# Line 638  int net_server(const char *hostaddr, in_ Line 648  int net_server(const char *hostaddr, in_
648                  fcntl(socket_server[i], F_SETFL, flags_server[i] | O_NONBLOCK);                  fcntl(socket_server[i], F_SETFL, flags_server[i] | O_NONBLOCK);
649          }          }
650    
651            ssh_bind_set_blocking(sshbind, 0);
652    
653          hash_dict_pid_sockaddr = hash_dict_create(MAX_CLIENT_LIMIT);          hash_dict_pid_sockaddr = hash_dict_create(MAX_CLIENT_LIMIT);
654          if (hash_dict_pid_sockaddr == NULL)          if (hash_dict_pid_sockaddr == NULL)
655          {          {


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1