]>
Commit | Line | Data |
---|---|---|
42f11eb2 | 1 | /* |
2 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | |
3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | |
4 | * All rights reserved | |
5 | * | |
6 | * As far as I am concerned, the code I have written for this software | |
7 | * can be used freely for any purpose. Any derived versions of this | |
8 | * software must be clearly marked as such, and if the derived work is | |
9 | * incompatible with the protocol description in the RFC file, it must be | |
10 | * called by a name other than "ssh" or "Secure Shell". | |
11 | */ | |
12 | #ifndef LOGIN_H | |
13 | #define LOGIN_H | |
14 | ||
15 | /* | |
16 | * Returns the time when the user last logged in. Returns 0 if the | |
17 | * information is not available. This must be called before record_login. | |
18 | * The host from which the user logged in is stored in buf. | |
19 | */ | |
20 | u_long | |
21 | get_last_login_time(uid_t uid, const char *logname, | |
22 | char *buf, u_int bufsize); | |
23 | ||
24 | /* | |
25 | * Records that the user has logged in. This does many things normally done | |
26 | * by login(1). | |
27 | */ | |
28 | void | |
29 | record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid, | |
30 | const char *host, struct sockaddr *addr); | |
31 | ||
32 | /* | |
33 | * Records that the user has logged out. This does many thigs normally done | |
34 | * by login(1) or init. | |
35 | */ | |
36 | void record_logout(pid_t pid, const char *ttyname); | |
37 | ||
38 | #endif |