View | Details | Raw Unified | Return to bug 1032 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-1 / +7 lines)
Line  Link Here
0
-- openssh-4.0p1/session.c     2005-03-06 17:08:52.000000000 +0530
0
++ openssh-4.0p1-lastlog/session.c     2005-05-06 16:50:15.000000000 +0530
Lines 646-654 Link Here
646
               }
646
               }
647
       }
647
       }
648
#ifdef __hpux
649
       record_utmp_only(pid, s->tty, s->pw->pw_name, s->pw->pw_uid,
650
           get_remote_name_or_ip(utmp_len, options.use_dns),
651
           (struct sockaddr *)&from, fromlen);
652
#else
648
       record_utmp_only(pid, s->tty, s->pw->pw_name,
653
       record_utmp_only(pid, s->tty, s->pw->pw_name,
649
           get_remote_name_or_ip(utmp_len, options.use_dns),
654
           get_remote_name_or_ip(utmp_len, options.use_dns),
650
           (struct sockaddr *)&from, fromlen);
655
           (struct sockaddr *)&from, fromlen);
656
#endif
651
}
657
}
652
#endif
658
#endif
(-)openssh-4.0p1/sshlogin.c (-1 / +22 lines)
Lines 69-75 Link Here
69
 * Generate and store last login message.  This must be done before
69
 * Generate and store last login message.  This must be done before
70
 * login_login() is called and lastlog is updated.
70
 * login_login() is called and lastlog is updated.
71
 */
71
 */
72
73
#ifdef __hpux
74
void
75
#else
72
static void
76
static void
77
#endif
73
store_lastlog_message(const char *user, uid_t uid)
78
store_lastlog_message(const char *user, uid_t uid)
74
{
79
{
75
       char *time_string, hostname[MAXHOSTNAMELEN] = "", buf[512];
80
       char *time_string, hostname[MAXHOSTNAMELEN] = "", buf[512];
Lines 93-98 Link Here
93
                       snprintf(buf, sizeof(buf), "Last login: %s from %s\r\n",
98
                       snprintf(buf, sizeof(buf), "Last login: %s from %s\r\n",
94
                           time_string, hostname);
99
                           time_string, hostname);
95
               buffer_append(&loginmsg, buf, strlen(buf));
100
               buffer_append(&loginmsg, buf, strlen(buf));
101
#ifdef __hpux
102
       if(options.use_login)
103
                printf("%s", (char *)buffer_ptr(&loginmsg));
104
#endif
105
96
       }
106
       }
97
#endif /* NO_SSH_LASTLOG */
107
#endif /* NO_SSH_LASTLOG */
98
}
108
}
Lines 117-128 Link Here
117
}
127
}
118
#ifdef LOGIN_NEEDS_UTMPX
128
#ifdef LOGIN_NEEDS_UTMPX
129
#ifdef __hpux
119
void
130
void
120
record_utmp_only(pid_t pid, const char *ttyname, const char *user,
131
record_utmp_only(pid_t pid, const char *ttyname, const char *user, uid_t uid,
121
                const char *host, struct sockaddr * addr, socklen_t addrlen)
132
                const char *host, struct sockaddr * addr, socklen_t addrlen)
133
#else
134
void
135
record_utmp_only(pid_t pid, const char *ttyname, const char *user,
136
               const char *host, struct sockaddr * addr, socklen_t addrlen)
137
#endif
122
{
138
{
123
       struct logininfo *li;
139
       struct logininfo *li;
140
#ifdef __hpux
141
       /* save previous login details before writing new */
142
        store_lastlog_message(user, uid);
143
#endif
144
124
       li = login_alloc_entry(pid, user, host, ttyname);
145
       li = login_alloc_entry(pid, user, host, ttyname);
125
       login_set_addr(li, addr, addrlen);
146
       login_set_addr(li, addr, addrlen);
126
       login_utmp_only(li);
147
       login_utmp_only(li);
(-)openssh-4.0p1/sshlogin.h (-1 / +10 lines)
Lines 21-28 Link Here
21
u_long         get_last_login_time(uid_t, const char *, char *, u_int);
21
u_long         get_last_login_time(uid_t, const char *, char *, u_int);
22
#ifdef LOGIN_NEEDS_UTMPX
22
#ifdef LOGIN_NEEDS_UTMPX
23
void   record_utmp_only(pid_t, const char *, const char *, const char *,
23
#ifdef __hpux
24
void   record_utmp_only(pid_t, const char *, const char *, uid_t, const char *,
24
               struct sockaddr *, socklen_t);
25
               struct sockaddr *, socklen_t);
26
#else
27
void    record_utmp_only(pid_t, const char *, const char *, const char *,
28
               struct sockaddr *, socklen_t);
29
#endif
30
#endif
31
32
#ifdef __hpux
33
void store_lastlog_message(const char *user, uid_t uid);
25
#endif
34
#endif
26
#endif
35
#endif

Return to bug 1032