summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session.c')
-rw-r--r--session.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/session.c b/session.c
index b5a382473..4862e5d63 100644
--- a/session.c
+++ b/session.c
@@ -123,9 +123,6 @@ int do_exec_no_pty(struct ssh *, Session *, const char *);
123int do_exec(struct ssh *, Session *, const char *); 123int do_exec(struct ssh *, Session *, const char *);
124void do_login(struct ssh *, Session *, const char *); 124void do_login(struct ssh *, Session *, const char *);
125void do_child(struct ssh *, Session *, const char *); 125void do_child(struct ssh *, Session *, const char *);
126#ifdef LOGIN_NEEDS_UTMPX
127static void do_pre_login(Session *s);
128#endif
129void do_motd(void); 126void do_motd(void);
130int check_quietlogin(Session *, const char *); 127int 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
660static void
661do_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.