ENDUTXENT - Online Linux Manual PageSection : 3P
Updated : 2003
Source : IEEE/The Open Group
Note : POSIX Programmer's Manual

PROLOGThis manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.

NAMEendutxent, getutxent, getutxid, getutxline, pututxline, setutxent − user accounting database functions

SYNOPSIS#include <utmpx.h>
void endutxent(void);
struct utmpx *getutxent(void);
struct utmpx *getutxid(const struct utmpx *
id);
struct utmpx *getutxline(const struct utmpx *
line);
struct utmpx *pututxline(const struct utmpx *
utmpx);
void setutxent(void);


DESCRIPTIONThese functions shall provide access to the user accounting database. The getutxent() function shall read the next entry from the user accounting database. If the database is not already open, it shall open it. If it reaches the end of the database, it shall fail. The getutxid() function shall search forward from the current point in the database. If the ut_type value of the utmpx structure pointed to by id is BOOT_TIME, OLD_TIME, or NEW_TIME, then it shall stop when it finds an entry with a matching ut_type value. If the ut_type value is INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, then it shall stop when it finds an entry whose type is one of these four and whose ut_id member matches the ut_id member of the utmpx structure pointed to by id. If the end of the database is reached without a match, getutxid() shall fail. The getutxline() function shall search forward from the current point in the database until it finds an entry of the type LOGIN_PROCESS or USER_PROCESS which also has a ut_line value matching that in the utmpx structure pointed to by line. If the end of the database is reached without a match, getutxline() shall fail. The getutxid() or getutxline() function may cache data. For this reason, to use getutxline() to search for multiple occurrences, the application shall zero out the static data after each success, or getutxline() may return a pointer to the same utmpx structure. There is one exception to the rule about clearing the structure before further reads are done. The implicit read done by pututxline() (if it finds that it is not already at the correct place in the user accounting database) shall not modify the static structure returned by getutxent(), getutxid(), or getutxline(), if the application has modified this structure and passed the pointer back to pututxline(). For all entries that match a request, the ut_type member indicates the type of the entry. Other members of the entry shall contain meaningful data based on the value of the ut_type member as follows: .TS C center; l lw(40). ut_type MemberT{ Other Members with Meaningful Data T} EMPTYT{ No others T} BOOT_TIMET{ ut_tv T} OLD_TIMET{ ut_tv T} NEW_TIMET{ ut_tv T} USER_PROCESST{ ut_id, ut_user (login name of the user), ut_line, ut_pid, ut_tv T} INIT_PROCESST{ ut_id, ut_pid, ut_tv T} LOGIN_PROCESST{ ut_id, ut_user (implementation-defined name of the login process), ut_pid, ut_tv T} DEAD_PROCESST{ ut_id, ut_pid, ut_tv T} An implementation that provides extended security controls may impose implementation-defined restrictions on accessing the user accounting database. In particular, the system may deny the existence of some or all of the user accounting database entries associated with users other than the caller. If the process has appropriate privileges, the pututxline() function shall write out the structure into the user accounting database. It shall use getutxid() to search for a record that satisfies the request. If this search succeeds, then the entry shall be replaced. Otherwise, a new entry shall be made at the end of the user accounting database. The endutxent() function shall close the user accounting database. The setutxent() function shall reset the input to the beginning of the database. This should be done before each search for a new entry if it is desired that the entire database be examined. These functions need not be reentrant. A function that is not required to be reentrant is not required to be thread-safe.

RETURN VALUEUpon successful completion, getutxent(), getutxid(), and getutxline() shall return a pointer to a utmpx structure containing a copy of the requested entry in the user accounting database. Otherwise, a null pointer shall be returned. The return value may point to a static area which is overwritten by a subsequent call to getutxid() or getutxline(). Upon successful completion, pututxline() shall return a pointer to a utmpx structure containing a copy of the entry added to the user accounting database. Otherwise, a null pointer shall be returned. The endutxent() and setutxent() functions shall not return a value.

ERRORSNo errors are defined for the endutxent(), getutxent(), getutxid(), getutxline(), and setutxent() functions. The pututxline() function may fail if: EPERM  The process does not have appropriate privileges. The following sections are informative.

EXAMPLESNone.

APPLICATION USAGEThe sizes of the arrays in the structure can be found using the sizeof operator.

RATIONALENone.

FUTURE DIRECTIONSNone.

SEE ALSOThe Base Definitions volume of IEEE Std 1003.1-2001, <utmpx.h>

COPYRIGHTPortions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
0
Johanes Gumabo
Data Size   :   21,168 byte
man-getutxid.3pBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 202,918
Visitor ID   :     :  
Visitor IP   :   3.135.214.226   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (rof_TS|11|getutxid.3p|77|2|.TS C )