[Pkg-shadow-commits] r1598 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Tue Jan 1 14:38:47 UTC 2008
Author: nekral-guest
Date: 2008-01-01 14:38:47 +0000 (Tue, 01 Jan 2008)
New Revision: 1598
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/lastlog.c
Log:
* src/lastlog.c: Remove statbuf, not used.
* src/lastlog.c: Fix types, cast umin and umax to uid_t.
* src/lastlog.c: (option -u) user needs to be a signed long, not
uid_t (to accept rangees like -<uid>
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-01-01 14:34:07 UTC (rev 1597)
+++ upstream/trunk/ChangeLog 2008-01-01 14:38:47 UTC (rev 1598)
@@ -1,5 +1,12 @@
2008-01-01 Nicolas François <nicolas.francois at centraliens.net>
+ * src/lastlog.c: Remove statbuf, not used.
+ * src/lastlog.c: Fix types, cast umin and umax to uid_t.
+ * src/lastlog.c: (option -u) user needs to be a signed long, not
+ uid_t (to accept rangees like -<uid>
+
+2008-01-01 Nicolas François <nicolas.francois at centraliens.net>
+
* src/useradd.c: Avoid ?: construct without the middle term.
2008-01-01 Nicolas François <nicolas.francois at centraliens.net>
Modified: upstream/trunk/src/lastlog.c
===================================================================
--- upstream/trunk/src/lastlog.c 2008-01-01 14:34:07 UTC (rev 1597)
+++ upstream/trunk/src/lastlog.c 2008-01-01 14:38:47 UTC (rev 1598)
@@ -62,7 +62,6 @@
static int tflg = 0; /* print is restricted to most recent days */
static int bflg = 0; /* print excludes most recent days */
static struct lastlog lastlog; /* scratch structure to play with ... */
-static struct stat statbuf; /* fstat buffer for file size */
static struct passwd *pwent;
#define NOW (time ((time_t *) 0))
@@ -133,8 +132,8 @@
while ((pwent = getpwent ())) {
user = pwent->pw_uid;
if (uflg &&
- ((umin != -1 && user < umin) ||
- (umax != -1 && user > umax)))
+ ((umin != -1 && user < (uid_t)umin) ||
+ (umax != -1 && user > (uid_t)umax)))
continue;
offset = user * sizeof lastlog;
@@ -201,7 +200,8 @@
umax = umin;
} else {
char *endptr = NULL;
- uid_t user = strtol(optarg, &endptr, 10);
+ long int user;
+ user = strtol(optarg, &endptr, 10);
if (*optarg != '\0' && *endptr == '\0') {
if (user < 0) {
/* -<userid> */
More information about the Pkg-shadow-commits
mailing list