diff options
author | andre <andre> | 2000-06-19 08:20:03 +0000 |
---|---|---|
committer | andre <andre> | 2000-06-19 08:20:03 +0000 |
commit | 2b7c4e702f282778f4e1fe74ae9f290d0a1f51f3 (patch) | |
tree | 391c835c8293303c2c7a3797b3888eda59909720 /loginrec.h | |
parent | f1aca5904bbe83e78c0197946f38d6f01ea71a39 (diff) | |
download | openssh-2b7c4e702f282778f4e1fe74ae9f290d0a1f51f3.tar.gz |
Big loginrec.c update
- MIN_SIZEOF macro to pick smallest buffer for str[ln]cpy()
- fixes lastlog clobber spotted by P.S.S.Camp <P.S.S.Camp@ukc.ac.uk>
- Added some top-level api documentation
- Re-ordered construct_utmp(x)() to build well-formed structures for
both login and logout, based on li->type.
- change wtmp(x)_logout() to match new construct_*() form
- Improved error responses throughout
- Add ut_type cross-check for 'lastlog-from-wtmp(x)' where available
- utmp_write_direct() has had some testing. Oh yes!
- Re-ordered loginrec.h slightly
Diffstat (limited to 'loginrec.h')
-rw-r--r-- | loginrec.h | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -40,7 +40,7 @@ #include <netinet/in.h> #include <sys/socket.h> -/* RCSID("$Id: loginrec.h,v 1.2 2000/06/04 17:07:49 andre Exp $"); */ +/* RCSID("$Id: loginrec.h,v 1.3 2000/06/19 08:20:03 andre Exp $"); */ /** ** you should use the login_* calls to work around platform dependencies @@ -102,6 +102,9 @@ struct logininfo { /* * login recording functions */ + +/** 'public' functions */ + /* construct a new login entry */ struct logininfo *login_alloc_entry(int pid, const char *username, const char *hostname, const char *line); @@ -113,16 +116,20 @@ int login_init_entry(struct logininfo *li, int pid, const char *username, /* place the current time in a logininfo struct */ void login_set_current_time(struct logininfo *li); -/* set the network address based on network address type */ -void login_set_addr(struct logininfo *li, const struct sockaddr *sa, - const unsigned int sa_size); - /* record the entry */ -int login_write (struct logininfo *li); int login_login (struct logininfo *li); int login_logout(struct logininfo *li); + +/** End of public functions */ + +/* record the entry */ +int login_write (struct logininfo *li); int login_log_entry(struct logininfo *li); +/* set the network address based on network address type */ +void login_set_addr(struct logininfo *li, const struct sockaddr *sa, + const unsigned int sa_size); + /* * lastlog retrieval functions */ |