]>
git.ipfire.org Git - thirdparty/bird.git/blob - nest/password.c
2 * BIRD -- Password handling
4 * (c) 1999 Pavel Machek <pavel@ucw.cz>
5 * (c) 2004 Ondrej Filip <feela@network.cz>
7 * Can be freely distributed and used under the terms of the GNU GPL.
10 #include "nest/bird.h"
11 #include "nest/password.h"
12 #include "lib/string.h"
14 struct password_item
*last_password_item
= NULL
;
16 struct password_item
*
17 password_find(list
*l
, int first_fit
)
19 struct password_item
*pi
;
20 struct password_item
*pf
= NULL
;
26 if ((pi
->genfrom
< now_real
) && (pi
->gento
> now_real
))
31 if (!pf
|| pf
->genfrom
< pi
->genfrom
)
39 struct password_item
*
40 password_find_by_id(list
*l
, int id
)
42 struct password_item
*pi
;
48 if ((pi
->id
== id
) && (pi
->accfrom
<= now_real
) && (now_real
< pi
->accto
))