diff --git a/ChangeLog b/ChangeLog index f9a6bf15..8ff27cf6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-01-05 Nicolas François + + * lib/prototypes.h: Add the dolastlog() prototype. + * lib/prototypes.h: Typo: login.c -> loginprompt.c + * src/login.c: Remove declaration of dolastlog(). + 2008-01-05 Nicolas François * libmisc/pwdcheck.c: Do not include . Include @@ -34,15 +40,13 @@ of the spwd structure. Replace this include by * libmisc/xmalloc.c, libmisc/utmp.c, libmisc/strtoday.c, libmisc/pwd_init.c, libmisc/tz.c, lib/port.c, lib/fputsx.c, - libmisc/pam_pass.c: Include "prototypes.h" to make sure the - exported prototypes are the ones used for the definition of - functions. + libmisc/pam_pass.c, libmisc/log.c: Include "prototypes.h" to make + sure the exported prototypes are the ones used for the definition + of functions. * libmisc/console.c: Define is_listed() as static and add its prototype. * libmisc/xgetXXbyYY.c, libmisc/yesno.c: Include config.h as a system include, as recommended by the autoconf documentation. - * libmisc/log.c: Define dolastlog() as static and add its - prototype. * src/chage.c: Define isnum() as static and add its prototype. * libmisc/xgetspnam.c: Add missing include "shadowio.h". (This was OK as long as prototypes.h included this file.) diff --git a/lib/prototypes.h b/lib/prototypes.h index d6444d25..b3106a0e 100644 --- a/lib/prototypes.h +++ b/lib/prototypes.h @@ -99,7 +99,13 @@ extern char **dup_list (char *const *); extern int is_on_list (char *const *, const char *); extern char **comma_to_list (const char *); -/* login.c */ +/* log.c */ +extern void dolastlog (struct lastlog *ll, + const struct passwd *pw, + const char *line, + const char *host); + +/* loginprompt.c */ extern void login_prompt (const char *, char *, int); /* mail.c */ diff --git a/libmisc/log.c b/libmisc/log.c index 77ac87c8..3ff289ee 100644 --- a/libmisc/log.c +++ b/libmisc/log.c @@ -37,12 +37,7 @@ #include #include "defines.h" #include - -/* local function prototypes */ -static void dolastlog (struct lastlog *ll, - const struct passwd *pw, - const char *line, - const char *host); +#include "prototypes.h" /* * dolastlog - create lastlog entry @@ -51,7 +46,7 @@ static void dolastlog (struct lastlog *ll, * UID is extracted from the global (struct passwd) entry and the * TTY information is gotten from the (struct utmp). */ -static void +void dolastlog (struct lastlog *ll, const struct passwd *pw, const char *line, const char *host) { diff --git a/src/login.c b/src/login.c index 2a58c0c6..f78c568c 100644 --- a/src/login.c +++ b/src/login.c @@ -112,10 +112,6 @@ static int timeout; extern char **newenvp; extern size_t newenvc; - -extern void dolastlog (struct lastlog *, const struct passwd *, - const char *, const char *); - extern char **environ; #ifndef ALARM