search for: linfo_hostsize

Displaying 2 results from an estimated 2 matches for "linfo_hostsize".

2001 Sep 06
1
lastlog on Solaris with PAM (patch included)
...th field and is not null-terminated. Since strlcpy copies n-1 bytes and then sets byte n-1 to 0, it would be more appropriate to use: strlcpy(li->hostname, last->ll_host, MIN_SIZEOF(li->hostname, last->ll_host + 1)); Think about what happens if sizeof(last->ll_host) = n (n < LINFO_HOSTSIZE) and a specific hostname is exactly n bytes long without any trailing 0-bytes. Also, watch out for other null-termination issues in the same region of code - I mention this because if LINFO_HOSTSIZE was set to coincide with sizeof(last->ll_host) of some particular system, it really should be bu...
2007 Jan 17
0
login_get_lastlog - nss enviornment - works in shell env, doesn't work when sshd calls it.
.../* types - different to utmp.h 'type' macros */ /* (though set to the same value as linux, openbsd and others...) */ #define LTYPE_LOGIN 7 #define LTYPE_LOGOUT 8 /* string lengths - set very long */ #define LINFO_PROGSIZE 64 #define LINFO_LINESIZE 64 #define LINFO_NAMESIZE 128 #define LINFO_HOSTSIZE 256 struct logininfo { char progname[LINFO_PROGSIZE]; /* name of program (for PAM) */ int progname_null; short int type; /* type of login (LTYPE_*) */ int pid; /* PID of login process */...