[Pkg-shadow-commits] r3064 - in upstream/trunk: . libmisc
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Mon Sep 7 19:50:00 UTC 2009
Author: nekral-guest
Date: 2009-09-07 19:50:00 +0000 (Mon, 07 Sep 2009)
New Revision: 3064
Modified:
upstream/trunk/ChangeLog
upstream/trunk/libmisc/limits.c
upstream/trunk/libmisc/utmp.c
Log:
* libmisc/limits.c: Fix the format to match the unsigned long
variable in argument.
* libmisc/utmp.c: Fix tests. tmptty is a variable stack. ut_host
is an array of the ut structure. None of them can be NULL.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2009-09-07 19:25:07 UTC (rev 3063)
+++ upstream/trunk/ChangeLog 2009-09-07 19:50:00 UTC (rev 3064)
@@ -1,3 +1,10 @@
+2009-09-07 Steve Grubb <sgrubb at redhat.com>
+
+ * libmisc/limits.c: Fix the format to match the unsigned long
+ variable in argument.
+ * libmisc/utmp.c: Fix tests. tmptty is a variable stack. ut_host
+ is an array of the ut structure. None of them can be NULL.
+
2009-09-07 Nicolas François <nicolas.francois at centraliens.net>
* lib/shadowmem.c: Only copy the required fields of the struct
Modified: upstream/trunk/libmisc/limits.c
===================================================================
--- upstream/trunk/libmisc/limits.c 2009-09-07 19:25:07 UTC (rev 3063)
+++ upstream/trunk/libmisc/limits.c 2009-09-07 19:50:00 UTC (rev 3064)
@@ -167,8 +167,9 @@
* includes the user who is currently trying to log in.
*/
if (count > limit) {
- SYSLOG ((LOG_WARN, "Too many logins (max %d) for %s\n",
- limit, name));
+ SYSLOG ((LOG_WARN,
+ "Too many logins (max %lu) for %s\n",
+ limit, name));
return LOGIN_ERROR_LOGIN;
}
return 0;
Modified: upstream/trunk/libmisc/utmp.c
===================================================================
--- upstream/trunk/libmisc/utmp.c 2009-09-07 19:25:07 UTC (rev 3063)
+++ upstream/trunk/libmisc/utmp.c 2009-09-07 19:50:00 UTC (rev 3064)
@@ -71,7 +71,7 @@
}
}
- if (NULL == tmptty) {
+ if ('\0' == tmptty[0]) {
(void) puts (_("Unable to determine your tty name."));
exit (EXIT_FAILURE);
} else if (strncmp (tty, tmptty, sizeof (tmptty)) != 0) {
@@ -200,7 +200,6 @@
strcpy (hostname, host);
#ifdef HAVE_STRUCT_UTMP_UT_HOST
} else if ( (NULL != ut)
- && (NULL != ut->ut_host)
&& ('\0' != ut->ut_host[0])) {
hostname = (char *) xmalloc (sizeof (ut->ut_host) + 1);
strncpy (hostname, ut->ut_host, sizeof (ut->ut_host));
More information about the Pkg-shadow-commits
mailing list