diff options
author | Damien Miller <djm@mindrot.org> | 2019-01-20 14:55:27 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-01-20 14:55:27 +1100 |
commit | 9b655dc9c9a353f0a527f0c6c43a5e35653c9503 (patch) | |
tree | 78b3512ffa1a9e5b8d954aca6fb45a0a3045504b /session.c | |
parent | 3f0786bbe73609ac96e5a0d91425ee21129f8e04 (diff) |
last bits of old packet API / active_state global
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 32 |
1 files changed, 0 insertions, 32 deletions
@@ -123,9 +123,6 @@ int do_exec_no_pty(struct ssh *, Session *, const char *); | |||
123 | int do_exec(struct ssh *, Session *, const char *); | 123 | int do_exec(struct ssh *, Session *, const char *); |
124 | void do_login(struct ssh *, Session *, const char *); | 124 | void do_login(struct ssh *, Session *, const char *); |
125 | void do_child(struct ssh *, Session *, const char *); | 125 | void do_child(struct ssh *, Session *, const char *); |
126 | #ifdef LOGIN_NEEDS_UTMPX | ||
127 | static void do_pre_login(Session *s); | ||
128 | #endif | ||
129 | void do_motd(void); | 126 | void do_motd(void); |
130 | int check_quietlogin(Session *, const char *); | 127 | int check_quietlogin(Session *, const char *); |
131 | 128 | ||
@@ -656,35 +653,6 @@ do_exec_pty(struct ssh *ssh, Session *s, const char *command) | |||
656 | return 0; | 653 | return 0; |
657 | } | 654 | } |
658 | 655 | ||
659 | #ifdef LOGIN_NEEDS_UTMPX | ||
660 | static void | ||
661 | do_pre_login(Session *s) | ||
662 | { | ||
663 | struct ssh *ssh = active_state; /* XXX */ | ||
664 | socklen_t fromlen; | ||
665 | struct sockaddr_storage from; | ||
666 | pid_t pid = getpid(); | ||
667 | |||
668 | /* | ||
669 | * Get IP address of client. If the connection is not a socket, let | ||
670 | * the address be 0.0.0.0. | ||
671 | */ | ||
672 | memset(&from, 0, sizeof(from)); | ||
673 | fromlen = sizeof(from); | ||
674 | if (packet_connection_is_on_socket()) { | ||
675 | if (getpeername(packet_get_connection_in(), | ||
676 | (struct sockaddr *)&from, &fromlen) < 0) { | ||
677 | debug("getpeername: %.100s", strerror(errno)); | ||
678 | cleanup_exit(255); | ||
679 | } | ||
680 | } | ||
681 | |||
682 | record_utmp_only(pid, s->tty, s->pw->pw_name, | ||
683 | session_get_remote_name_or_ip(ssh, utmp_len, options.use_dns), | ||
684 | (struct sockaddr *)&from, fromlen); | ||
685 | } | ||
686 | #endif | ||
687 | |||
688 | /* | 656 | /* |
689 | * This is called to fork and execute a command. If another command is | 657 | * This is called to fork and execute a command. If another command is |
690 | * to be forced, execute that instead. | 658 | * to be forced, execute that instead. |