1UTEMPTER(3) BSD Library Functions Manual UTEMPTER(3)
2
4 utempter_add_record, utempter_remove_added_record,
5 utempter_remove_record, utempter_set_helper — utempter interface
6
8 #include <utempter.h>
9
10 int
11 utempter_add_record(int fd, const char *host);
12
13 int
14 utempter_remove_added_record(void);
15
16 int
17 utempter_remove_record(int fd);
18
19 void
20 utempter_set_helper(const char *pathname);
21
23 utempter_add_record() function adds a login record to the database for
24 the TTY belonging to the pseudo-terminal master file descriptor fd, using
25 the username corresponding with the real user ID of the calling process
26 and the optional hostname host. This function spawns a privileged
27 process to perform the actual logging.
28
29 utempter_remove_record() function marks the login session as being closed
30 for the TTY belonging to the pseudo-terminal master file descriptor fd.
31 This function spawns a privileged process to perform the actual logging.
32
33 utempter_remove_added_record() function has the same properties as the
34 previously mentioned function, except that it uses an internally cached
35 value of the file descriptor passed to the login functions.
36
37 utempter_set_helper() function changes default helper path to the speci‐
38 fied value. The pointer passed to this function must remain valid all
39 the time while utempter interface is in use.
40
42 On error, zero is returned. On success, a non-zero value is returned.
43
45 During execution of the privileged process spawned by these functions,
46 SIGCHLD signal handler will be temporarily set to the default action.
47
49 pututline(3), sigaction(3), updwtmp(3).
50
52 These functions appeared in ALT Linux Sisyphus in October 2001.
53
54ALT Linux November 4, 2010 ALT Linux