[Pkg-shadow-commits] r2823 - in upstream/trunk: . src
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Mon Apr 27 20:20:38 UTC 2009
Author: nekral-guest
Date: 2009-04-27 20:20:37 +0000 (Mon, 27 Apr 2009)
New Revision: 2823
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/login.c
Log:
* src/login.c: Replace HAVE_UTMPX_H by USE_UTMPX.
* src/login.c: Avoid name clash between global variables and the
update_utmp() arguments.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2009-04-27 20:18:00 UTC (rev 2822)
+++ upstream/trunk/ChangeLog 2009-04-27 20:20:37 UTC (rev 2823)
@@ -1,5 +1,11 @@
2009-04-27 Nicolas François <nicolas.francois at centraliens.net>
+ * src/login.c: Replace HAVE_UTMPX_H by USE_UTMPX.
+ * src/login.c: Avoid name clash between global variables and the
+ update_utmp() arguments.
+
+2009-04-27 Nicolas François <nicolas.francois at centraliens.net>
+
* src/groupadd.c, lib/commonio.c, lib/groupio.c: Added missing
include of <assert.h>
Modified: upstream/trunk/src/login.c
===================================================================
--- upstream/trunk/src/login.c 2009-04-27 20:18:00 UTC (rev 2822)
+++ upstream/trunk/src/login.c 2009-04-27 20:20:37 UTC (rev 2823)
@@ -124,9 +124,9 @@
static void setup_tty (void);
static void process_flags (int argc, char *const *argv);
static /*@observer@*/const char *get_failent_user (/*@returned@*/const char *user);
-static void update_utmp (const char *username,
+static void update_utmp (const char *user,
const char *tty,
- const char *hostname,
+ const char *host,
/*@null@*/const struct utmp *utent);
#ifndef USE_PAM
@@ -476,23 +476,23 @@
* utent should be the utmp entry returned by get_current_utmp (or
* NULL).
*/
-static void update_utmp (const char *username,
+static void update_utmp (const char *user,
const char *tty,
- const char *hostname,
+ const char *host,
/*@null@*/const struct utmp *utent)
{
- struct utmp *ut = prepare_utmp (username, tty, hostname, utent);
-#ifdef HAVE_UTMPX_H
- struct utmpx *utx = prepare_utmpx (username, tty, hostname, utent);
-#endif /* HAVE_UTMPX_H */
+ struct utmp *ut = prepare_utmp (user, tty, host, utent);
+#ifdef USE_UTMPX
+ struct utmpx *utx = prepare_utmpx (user, tty, host, utent);
+#endif /* USE_UTMPX */
(void) setutmp (ut); /* make entry in the utmp & wtmp files */
free (ut);
-#ifdef HAVE_UTMPX_H
+#ifdef USE_UTMPX
(void) setutmpx (utx); /* make entry in the utmpx & wtmpx files */
free (utx);
-#endif /* HAVE_UTMPX_H */
+#endif /* USE_UTMPX */
}
/*
@@ -1022,19 +1022,19 @@
failure (pwd->pw_uid, tty, &faillog);
}
if (getdef_str ("FTMP_FILE") != NULL) {
-#ifdef HAVE_UTMPX_H
+#ifdef USE_UTMPX
struct utmpx *failent =
prepare_utmpx (failent_user,
tty,
/* FIXME: or fromhost? */hostname,
utent);
-#else
+#else /* !USE_UTMPX */
struct utmp *failent =
prepare_utmp (failent_user,
tty,
hostname,
utent);
-#endif
+#endif /* !USE_UTMPX */
failtmp (failent_user, failent);
free (failent);
}
More information about the Pkg-shadow-commits
mailing list