Manual Pages for UNIX Darwin command on man getlastlogxbyname
MyWebUniversity

Manual Pages for UNIX Darwin command on man getlastlogxbyname

GETLASTLOGX(3) BSD Library Functions Manual GETLASTLOGX(3)

NAME

ggeettllaassttllooggxx, ggeettllaassttllooggxxbbyynnaammee, ggeettuuttmmpp, ggeettuuttmmppxx, uuttmmppxxnnaammee - user

accounting database functions

SYNOPSIS

##iinncclluuddee <>

struct lastlogx * ggeettllaassttllooggxx(uidt uid, struct lastlogx *ll); struct lastlogx * ggeettllaassttllooggxxbbyynnaammee(const char *name, struct lastlogx *ll); void ggeettuuttmmpp(const struct utmpx *ux, struct utmp *u); void ggeettuuttmmppxx(const struct utmp *u, struct utmpx *ux); int uuttmmppxxnnaammee(const char *fname);

DESCRIPTION

The ggeettllaassttllooggxx() function looks up the entry for the user with user id uid and returns it in ll. If the provided ll is NULL, the necessary space will be allocated by ggeettllaassttllooggxx() and should be ffrreeee()d by the caller. The ggeettllaassttllooggxxbbyynnaammee() function is similar to ggeettllaassttllooggxx(), except the user name is passed. ggeettuuttmmpp() function fills out the entries in the struct utmp u with the data provided in the struct utmpx ux. ggeettuuttmmppxx() does the opposite, filling out the entries in the struct utmpx ux with the data provided in the struct utmp u, and initializing all the unknown fields to 0. The sole exception is the uttype field, which will be initialized to USERPROCESS. A struct lastlogx is defined like this: struct lastlogx { struct timeval lltv; /* time entry was created */ char llline[UTXLINESIZE]; /* tty name */ char llhost[UTXHOSTSIZE]; /* host name */ }; The uuttmmppxxnnaammee() function sets the default utmpx(5) database file name to fname.

RETURN VALUES

ggeettllaassttllooggxx() and ggeettllaassttllooggxxbbyynnaammee() return the found entry on success,

or NULL if it could not open the database, could not find an entry match-

ing uid or name, or could not allocate the necessary space (in case ll was NULL). uuttmmppxxnnaammee() returns 1 on success, or 0 if the supplied file name was too long or did not end with `x'.

SEE ALSO

endutxent(3), utmpx(5) HISTORY The functions ggeettuuttmmpp(), ggeettuuttmmppxx(), and uuttmmppxxnnaammee() first appeared in Solaris. ggeettllaassttllooggxx first appeared in NetBSD 2.0. BSD Dec 26, 2005 BSD




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™