]> granicus.if.org Git - shadow/commitdiff
* lib/prototypes.h: Add the dolastlog() prototype.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 5 Jan 2008 16:44:28 +0000 (16:44 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 5 Jan 2008 16:44:28 +0000 (16:44 +0000)
* lib/prototypes.h: Typo: login.c -> loginprompt.c
* src/login.c: Remove declaration of dolastlog().
* libmisc/log.c: dolastlog() should not have been changed to static.
  Include prototypes.h instead.

ChangeLog
lib/prototypes.h
libmisc/log.c
src/login.c

index f9a6bf15f61c71dd5ce57670bc6b91424fbe6496..8ff27cf65c05002b228dd1d612497426bdbc25dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-01-05  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * 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  <nicolas.francois@centraliens.net>
 
        * libmisc/pwdcheck.c: Do not include <pwd.h>. Include <shadow.h>
        of the spwd structure. Replace this include by <shadow.h>
        * 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.)
index d6444d25e1d8924114a06e967e36c0e72ebd0591..b3106a0e0210b7f31a581681e103d41c6d328b80 100644 (file)
@@ -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 */
index 77ac87c8f23722987b9b0b12d9e0c73c2fc79f32..3ff289eed615abfb6728e35c3e6dde17a72373fb 100644 (file)
 #include <time.h>
 #include "defines.h"
 #include <lastlog.h>
-
-/* 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)
 {
index 2a58c0c6d565fa03566ad9c80afb26a88ce6ac6f..f78c568c4d27da2193f44edb25c16e82f579f9da 100644 (file)
@@ -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