diff options
author | Damien Miller <djm@mindrot.org> | 2019-01-20 04:55:27 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-01-20 04:55:27 +0100 |
commit | 9b655dc9c9a353f0a527f0c6c43a5e35653c9503 (patch) | |
tree | 78b3512ffa1a9e5b8d954aca6fb45a0a3045504b /session.c | |
parent | remove PAM dependencies on old packet API (diff) | |
download | openssh-9b655dc9c9a353f0a527f0c6c43a5e35653c9503.tar.xz openssh-9b655dc9c9a353f0a527f0c6c43a5e35653c9503.zip |
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 *); int do_exec(struct ssh *, Session *, const char *); void do_login(struct ssh *, Session *, const char *); void do_child(struct ssh *, Session *, const char *); -#ifdef LOGIN_NEEDS_UTMPX -static void do_pre_login(Session *s); -#endif void do_motd(void); int check_quietlogin(Session *, const char *); @@ -656,35 +653,6 @@ do_exec_pty(struct ssh *ssh, Session *s, const char *command) return 0; } -#ifdef LOGIN_NEEDS_UTMPX -static void -do_pre_login(Session *s) -{ - struct ssh *ssh = active_state; /* XXX */ - socklen_t fromlen; - struct sockaddr_storage from; - pid_t pid = getpid(); - - /* - * Get IP address of client. If the connection is not a socket, let - * the address be 0.0.0.0. - */ - memset(&from, 0, sizeof(from)); - fromlen = sizeof(from); - if (packet_connection_is_on_socket()) { - if (getpeername(packet_get_connection_in(), - (struct sockaddr *)&from, &fromlen) < 0) { - debug("getpeername: %.100s", strerror(errno)); - cleanup_exit(255); - } - } - - record_utmp_only(pid, s->tty, s->pw->pw_name, - session_get_remote_name_or_ip(ssh, utmp_len, options.use_dns), - (struct sockaddr *)&from, fromlen); -} -#endif - /* * This is called to fork and execute a command. If another command is * to be forced, execute that instead. |