New upstream version 4.15.2
This commit is contained in:
+9
-7
@@ -19,6 +19,8 @@
|
||||
#include "defines.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "atoi/str2i.h"
|
||||
|
||||
|
||||
static FILE *shadow;
|
||||
|
||||
@@ -116,7 +118,7 @@ static struct spwd *my_sgetspent (const char *string)
|
||||
if (fields[2][0] == '\0') {
|
||||
spwd.sp_lstchg = -1;
|
||||
} else {
|
||||
if (getlong(fields[2], &spwd.sp_lstchg) == -1)
|
||||
if (str2sl(&spwd.sp_lstchg, fields[2]) == -1)
|
||||
return 0;
|
||||
if (spwd.sp_lstchg < 0)
|
||||
return 0;
|
||||
@@ -129,7 +131,7 @@ static struct spwd *my_sgetspent (const char *string)
|
||||
if (fields[3][0] == '\0') {
|
||||
spwd.sp_min = -1;
|
||||
} else {
|
||||
if (getlong(fields[3], &spwd.sp_min) == -1)
|
||||
if (str2sl(&spwd.sp_min, fields[3]) == -1)
|
||||
return 0;
|
||||
if (spwd.sp_min < 0)
|
||||
return 0;
|
||||
@@ -142,7 +144,7 @@ static struct spwd *my_sgetspent (const char *string)
|
||||
if (fields[4][0] == '\0') {
|
||||
spwd.sp_max = -1;
|
||||
} else {
|
||||
if (getlong(fields[4], &spwd.sp_max) == -1)
|
||||
if (str2sl(&spwd.sp_max, fields[4]) == -1)
|
||||
return 0;
|
||||
if (spwd.sp_max < 0)
|
||||
return 0;
|
||||
@@ -169,7 +171,7 @@ static struct spwd *my_sgetspent (const char *string)
|
||||
if (fields[5][0] == '\0') {
|
||||
spwd.sp_warn = -1;
|
||||
} else {
|
||||
if (getlong(fields[5], &spwd.sp_warn) == -1)
|
||||
if (str2sl(&spwd.sp_warn, fields[5]) == -1)
|
||||
return 0;
|
||||
if (spwd.sp_warn < 0)
|
||||
return 0;
|
||||
@@ -183,7 +185,7 @@ static struct spwd *my_sgetspent (const char *string)
|
||||
if (fields[6][0] == '\0') {
|
||||
spwd.sp_inact = -1;
|
||||
} else {
|
||||
if (getlong(fields[6], &spwd.sp_inact) == -1)
|
||||
if (str2sl(&spwd.sp_inact, fields[6]) == -1)
|
||||
return 0;
|
||||
if (spwd.sp_inact < 0)
|
||||
return 0;
|
||||
@@ -197,7 +199,7 @@ static struct spwd *my_sgetspent (const char *string)
|
||||
if (fields[7][0] == '\0') {
|
||||
spwd.sp_expire = -1;
|
||||
} else {
|
||||
if (getlong(fields[7], &spwd.sp_expire) == -1)
|
||||
if (str2sl(&spwd.sp_expire, fields[7]) == -1)
|
||||
return 0;
|
||||
if (spwd.sp_expire < 0)
|
||||
return 0;
|
||||
@@ -211,7 +213,7 @@ static struct spwd *my_sgetspent (const char *string)
|
||||
if (fields[8][0] == '\0') {
|
||||
spwd.sp_flag = SHADOW_SP_FLAG_UNSET;
|
||||
} else {
|
||||
if (getulong(fields[8], &spwd.sp_flag) == -1)
|
||||
if (str2ul(&spwd.sp_flag, fields[8]) == -1)
|
||||
return 0;
|
||||
if (spwd.sp_flag < 0)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user