]> git.ipfire.org Git - thirdparty/util-linux.git/blame - liblastlog2/man/ll2_update_login_time.3.adoc
lastlog2 - Y2038 safe version of lastlog
[thirdparty/util-linux.git] / liblastlog2 / man / ll2_update_login_time.3.adoc
CommitLineData
c2e299d0
SS
1//po4a: entry man manual
2= ll2_update_login_time(3)
3:doctype: manpage
4:man manual: Programmer's Manual
5:man source: util-linux {release-version}
6:page-layout: base
7:lib: liblastlog2
8:firstversion: 2.40
9
10== NAME
11
12ll2_update_login_time - Writes an *new* entry with updated login time.
13
14== SYNOPSIS
15
16*#include <lastlog2.h>*
17
18*int ll2_update_login_time (struct ll2_context *__context__,
19 const char *__user__, int64_t __ll_time__,
20 char **__error__);*
21
22== DESCRIPTION
23
24Writes an *new* entry to database, defined in _context_, for user _user_.
25Time is set by _ll_time_ whereas the other values are taken from
26an already existing entry.
27If _context_ is NULL, the default database, defined in _LL2_DEFAULT_DATABASE_,
28will be taken.
29
30--------------------------------------
31char *error = NULL;
32const char *user = "root";
33int64_t login_time = time(0); // Get the system time;
34
35int ret = ll2_update_login_time (NULL, user, login_time, &error);
36--------------------------------------
37
38== RETURN VALUE
39
40Returns 0 on success, -ENOMEM or -1 on other failure.
41_error_ contains an error string if the return value is -1.
42_error_ is not guaranteed to contain an error string. It could also be NULL if the return value is -1.
43_error_ should be freed by the caller.
44
45== AUTHORS
46
47Thorsten Kukuk (kukuk@suse.de)
48
49== SEE ALSO
50
51*lastlog2*(3),
52*ll2_new_context(3),
53*ll2_unref_context(3),
54*ll2_read_all*(3),
55*ll2_write_entry*(3),
56*ll2_read_entry*(3),
57*ll2_remove_entry*(3),
58*ll2_rename_user*(3),
59*ll2_import_lastlog*(3)
60
61include::man-common/bugreports.adoc[]
62
63include::man-common/footer-lib.adoc[]
64
65ifdef::translation[]
66include::man-common/translation.adoc[]
67endif::[]