[Pkg-shadow-commits] r2130 - in upstream/trunk: lib libmisc src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Fri Jun 13 18:11:09 UTC 2008
Author: nekral-guest
Date: 2008-06-13 18:11:09 +0000 (Fri, 13 Jun 2008)
New Revision: 2130
Modified:
upstream/trunk/lib/port.c
upstream/trunk/libmisc/console.c
upstream/trunk/libmisc/hushed.c
upstream/trunk/libmisc/loginprompt.c
upstream/trunk/libmisc/ttytype.c
upstream/trunk/libmisc/tz.c
upstream/trunk/libmisc/yesno.c
upstream/trunk/src/chgpasswd.c
upstream/trunk/src/chpasswd.c
upstream/trunk/src/login_nopam.c
Log:
* libmisc/console.c, libmisc/hushed.c, libmisc/yesno.c,
libmisc/loginprompt.c, libmisc/ttytype.c, libmisc/tz.c,
src/login_nopam.c, src/chpasswd.c, src/chgpasswd.c, lib/port.c:
The size argument of fgets is an int, not a size_t.
* libmisc/loginprompt.c: Ignore the return value from signal()
when the signal handlers are restored.
* src/chpasswd.c: Cast the return value of time() to a long
integer.
* src/chpasswd.c: Use the SCALE macro instead of (24L * 3600L)
for the values to be set in /etc/shadow.
Modified: upstream/trunk/lib/port.c
===================================================================
--- upstream/trunk/lib/port.c 2008-06-12 23:52:30 UTC (rev 2129)
+++ upstream/trunk/lib/port.c 2008-06-13 18:11:09 UTC (rev 2130)
@@ -157,7 +157,7 @@
* is a '\n'. Lines which begin with '#' are all ignored.
*/
- if (fgets (buf, sizeof buf, ports) == 0) {
+ if (fgets (buf, (int) sizeof buf, ports) == 0) {
errno = saveerr;
return 0;
}
Modified: upstream/trunk/libmisc/console.c
===================================================================
--- upstream/trunk/libmisc/console.c 2008-06-12 23:52:30 UTC (rev 2129)
+++ upstream/trunk/libmisc/console.c 2008-06-13 18:11:09 UTC (rev 2130)
@@ -93,7 +93,7 @@
* See if this tty is listed in the console file.
*/
- while (fgets (buf, sizeof (buf), fp) != NULL) {
+ while (fgets (buf, (int) sizeof (buf), fp) != NULL) {
buf[strlen (buf) - 1] = '\0';
if (strcmp (buf, tty) == 0) {
(void) fclose (fp);
Modified: upstream/trunk/libmisc/hushed.c
===================================================================
--- upstream/trunk/libmisc/hushed.c 2008-06-12 23:52:30 UTC (rev 2129)
+++ upstream/trunk/libmisc/hushed.c 2008-06-13 18:11:09 UTC (rev 2130)
@@ -83,7 +83,7 @@
if (NULL == fp) {
return false;
}
- for (found = false; !found && (fgets (buf, sizeof buf, fp) == buf);) {
+ for (found = false; !found && (fgets (buf, (int) sizeof buf, fp) == buf);) {
buf[strlen (buf) - 1] = '\0';
found = (strcmp (buf, pw->pw_shell) == 0) ||
(strcmp (buf, pw->pw_name) == 0);
Modified: upstream/trunk/libmisc/loginprompt.c
===================================================================
--- upstream/trunk/libmisc/loginprompt.c 2008-06-12 23:52:30 UTC (rev 2129)
+++ upstream/trunk/libmisc/loginprompt.c 2008-06-13 18:11:09 UTC (rev 2130)
@@ -109,7 +109,7 @@
*/
memzero (buf, sizeof buf);
- if (fgets (buf, sizeof buf, stdin) != buf) {
+ if (fgets (buf, (int) sizeof buf, stdin) != buf) {
exit (1);
}
@@ -167,9 +167,9 @@
* Set the SIGQUIT handler back to its original value
*/
- signal (SIGQUIT, sigquit);
+ (void) signal (SIGQUIT, sigquit);
#ifdef SIGTSTP
- signal (SIGTSTP, sigtstp);
+ (void) signal (SIGTSTP, sigtstp);
#endif
}
Modified: upstream/trunk/libmisc/ttytype.c
===================================================================
--- upstream/trunk/libmisc/ttytype.c 2008-06-12 23:52:30 UTC (rev 2129)
+++ upstream/trunk/libmisc/ttytype.c 2008-06-13 18:11:09 UTC (rev 2130)
@@ -62,7 +62,7 @@
perror (typefile);
return;
}
- while (fgets (buf, sizeof buf, fp) == buf) {
+ while (fgets (buf, (int) sizeof buf, fp) == buf) {
if (buf[0] == '#') {
continue;
}
Modified: upstream/trunk/libmisc/tz.c
===================================================================
--- upstream/trunk/libmisc/tz.c 2008-06-12 23:52:30 UTC (rev 2129)
+++ upstream/trunk/libmisc/tz.c 2008-06-13 18:11:09 UTC (rev 2130)
@@ -53,7 +53,7 @@
const char *def_tz = "TZ=CST6CDT";
if ((fp = fopen (fname, "r")) == NULL ||
- fgets (tzbuf, sizeof (tzbuf), fp) == NULL) {
+ fgets (tzbuf, (int) sizeof (tzbuf), fp) == NULL) {
#ifndef USE_PAM
if (!(def_tz = getdef_str ("ENV_TZ")) || def_tz[0] == '/')
def_tz = "TZ=CST6CDT";
Modified: upstream/trunk/libmisc/yesno.c
===================================================================
--- upstream/trunk/libmisc/yesno.c 2008-06-12 23:52:30 UTC (rev 2129)
+++ upstream/trunk/libmisc/yesno.c 2008-06-13 18:11:09 UTC (rev 2130)
@@ -70,7 +70,7 @@
* Get a line and see what the first character is.
*/
/* TODO: use gettext */
- if (fgets (buf, sizeof buf, stdin) == buf) {
+ if (fgets (buf, (int) sizeof buf, stdin) == buf) {
return buf[0] == 'y' || buf[0] == 'Y';
}
Modified: upstream/trunk/src/chgpasswd.c
===================================================================
--- upstream/trunk/src/chgpasswd.c 2008-06-12 23:52:30 UTC (rev 2129)
+++ upstream/trunk/src/chgpasswd.c 2008-06-13 18:11:09 UTC (rev 2130)
@@ -356,7 +356,7 @@
* group entry for each group will be looked up in the appropriate
* file (gshadow or group) and the password changed.
*/
- while (fgets (buf, sizeof buf, stdin) != (char *) 0) {
+ while (fgets (buf, (int) sizeof buf, stdin) != (char *) 0) {
line++;
cp = strrchr (buf, '\n');
if (NULL != cp) {
Modified: upstream/trunk/src/chpasswd.c
===================================================================
--- upstream/trunk/src/chpasswd.c 2008-06-12 23:52:30 UTC (rev 2129)
+++ upstream/trunk/src/chpasswd.c 2008-06-13 18:11:09 UTC (rev 2130)
@@ -324,7 +324,7 @@
struct passwd newpw;
int errors = 0;
int line = 0;
- long now = time ((time_t *)NULL) / (24L * 3600L);
+ long now = (long) time ((time_t *)NULL) / SCALE;
int ok;
Prog = Basename (argv[0]);
@@ -349,7 +349,7 @@
* last change date is set in the age only if aging information is
* present.
*/
- while (fgets (buf, sizeof buf, stdin) != (char *) 0) {
+ while (fgets (buf, (int) sizeof buf, stdin) != (char *) 0) {
line++;
cp = strrchr (buf, '\n');
if (NULL != cp) {
Modified: upstream/trunk/src/login_nopam.c
===================================================================
--- upstream/trunk/src/login_nopam.c 2008-06-12 23:52:30 UTC (rev 2129)
+++ upstream/trunk/src/login_nopam.c 2008-06-13 18:11:09 UTC (rev 2130)
@@ -93,7 +93,8 @@
*/
fp = fopen (TABLE, "r");
if (NULL != fp) {
- while (!match && (fgets (line, sizeof (line), fp) == line)) {
+ while ( !match
+ && (fgets (line, (int) sizeof (line), fp) == line)) {
lineno++;
end = (int) strlen (line) - 1;
if (line[end] != '\n') {
More information about the Pkg-shadow-commits
mailing list