Debian Codegraph @

liblastlog2/man/ll2_remove_entry.3

raw
1 '\" t
2 .\" Title: ll2_remove_entry
3 .\" Author: [see the "AUTHOR(S)" section]
4 .\" Generator: Asciidoctor 2.0.20
5 .\" Date: 2026-04-28
6 .\" Manual: Programmer's Manual
7 .\" Source: util-linux 2.42.1
8 .\" Language: English
9 .\"
10 .TH "LL2_REMOVE_ENTRY" "3" "2026-04-28" "util\-linux 2.42.1" "Programmer\*(Aqs Manual"
11 .ie \n(.g .ds Aq \(aq
12 .el .ds Aq '
13 .ss \n[.ss] 0
14 .nh
15 .ad l
16 .de URL
17 \fI\\$2\fP <\\$1>\\$3
18 ..
19 .als MTO URL
20 .if \n[.g] \{\
21 . mso www.tmac
22 . am URL
23 . ad l
24 . .
25 . am MTO
26 . ad l
27 . .
28 . LINKSTYLE blue R < >
29 .\}
30 .SH "NAME"
31 ll2_remove_entry \- Removes all entries of a user.
32 .SH "SYNOPSIS"
33 .sp
34 \fB#include <lastlog2.h>\fP
35 .sp
36 \fBint ll2_remove_entry (struct ll2_context *\fIcontext\fP, const char *\fIuser\fP,
37 char **\fIerror\fP);\fP
38 .SH "DESCRIPTION"
39 .sp
40 Removes all database entries, defined in \fIcontext\fP, with the user name \fIuser\fP.
41 If \fIcontext\fP is NULL, the default database, defined in \fILL2_DEFAULT_DATABASE\fP,
42 will be taken.
43 .sp
44 .if n .RS 4
45 .nf
46 .fam C
47 char *error = NULL;
48 const char *user = "root";
49
50 int ret = ll2_remove_entry (NULL, user, &error);
51 .fam
52 .fi
53 .if n .RE
54 .SH "RETURN VALUE"
55 .sp
56 Returns 0 on success, \-ENOMEM or \-1 on other failure.
57 \fIerror\fP contains an error string if the return value is \-1.
58 \fIerror\fP is not guaranteed to contain an error string, could also be NULL.
59 \fIerror\fP should be freed by the caller.
60 .SH "AUTHORS"
61 .sp
62 .MTO "kukuk\(atsuse.de" "Thorsten Kukuk" ""
63 .SH "SEE ALSO"
64 .sp
65 \fBlastlog2\fP(3),
66 \fBll2_new_context\fP(3),
67 \fBll2_unref_context\fP(3),
68 \fBll2_read_all\fP(3),
69 \fBll2_write_entry\fP(3),
70 \fBll2_read_entry\fP(3),
71 \fBll2_update_login_time\fP(3),
72 \fBll2_rename_user\fP(3),
73 \fBll2_import_lastlog\fP(3)
74 .SH "REPORTING BUGS"
75 .sp
76 For bug reports, use the \c
77 .URL "https://github.com/util\-linux/util\-linux/issues" "issue tracker" "."
78 .SH "AVAILABILITY"
79 .sp
80 The \fBliblastlog2\fP library is part of the util\-linux package since version 2.40. It can be downloaded from \c
81 .URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "."