diff options
author | des <des@FreeBSD.org> | 2008-10-20 17:17:58 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2008-10-20 17:17:58 +0000 |
commit | a7d94abf211d6e808b21a807018d475ba18c41fe (patch) | |
tree | 2e05e3b18fdbcfe8c018a9020d41122878c7288b /lib | |
parent | afd6f1dcd0a82039ee04f2250c5cf4ea2147598d (diff) | |
download | FreeBSD-src-a7d94abf211d6e808b21a807018d475ba18c41fe.zip FreeBSD-src-a7d94abf211d6e808b21a807018d475ba18c41fe.tar.gz |
Since in_lt() and in_lts() are not static, assume that they are intended to
be part of the public API. Accordingly, add prototypes and document them.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libutil/login_cap.h | 2 | ||||
-rw-r--r-- | lib/libutil/login_times.3 | 22 |
2 files changed, 22 insertions, 2 deletions
diff --git a/lib/libutil/login_cap.h b/lib/libutil/login_cap.h index 2e3d3e8..082e34b 100644 --- a/lib/libutil/login_cap.h +++ b/lib/libutil/login_cap.h @@ -146,8 +146,10 @@ int auth_timeok(login_cap_t *, time_t); struct tm; login_time_t parse_lt(const char *); +int in_lt(const login_time_t *, time_t *); int in_ltm(const login_time_t *, struct tm *, time_t *); int in_ltms(const login_time_t *, struct tm *, time_t *); +int in_lts(const login_time_t *, time_t *); /* helper functions */ diff --git a/lib/libutil/login_times.3 b/lib/libutil/login_times.3 index e1f57ce..a144484 100644 --- a/lib/libutil/login_times.3 +++ b/lib/libutil/login_times.3 @@ -19,13 +19,15 @@ .\" .\" $FreeBSD$ .\" -.Dd January 2, 1997 +.Dd October 20, 2008 .Os .Dt LOGIN_TIMES 3 .Sh NAME .Nm parse_lt , +.Nm in_lt , .Nm in_ltm , -.Nm in_ltms +.Nm in_ltms , +.Nm in_lts .Nd functions for parsing and checking login time periods .Sh LIBRARY .Lb libutil @@ -36,9 +38,13 @@ .Ft login_time_t .Fn parse_lt "const char *str" .Ft int +.Fn in_lt "const login_time_t *lt" "time_t *ends" +.Ft int .Fn in_ltm "const login_time_t *lt" "struct tm *t" "time_t *ends" .Ft int .Fn in_ltms "const login_time_t *lt" "struct tm *t" "time_t *ends" +.Ft int +.Fn in_lts "const login_time_t *lt" "time_t *ends" .Sh DESCRIPTION This set of functions may be used for parsing and checking login and session times against a predefined list of allowed login times as @@ -135,6 +141,18 @@ elements in length, and terminated by an element with its .Ar lt_dow field set to .Em LTM_NONE . +.Pp +The +.Fn in_lt +and +.Fn in_lts +functions are equivalent to +.Fn in_ltm +and +.Fn in_ltms , +respectively, with the second argument set to the current time as +returned by +.Xr localtime 3 . .Sh RETURN VALUES The .Fn parse_lt |