* 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.
This commit is contained in:
nekral-guest
2008-06-13 18:11:09 +00:00
parent 55b2e44814
commit ef32209fd7
10 changed files with 14 additions and 13 deletions

View File

@@ -356,7 +356,7 @@ int main (int argc, char **argv)
* 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) {

View File

@@ -324,7 +324,7 @@ int main (int argc, char **argv)
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 @@ int main (int argc, char **argv)
* 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) {

View File

@@ -93,7 +93,8 @@ int login_access (const char *user, const char *from)
*/
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') {