diff options
Diffstat (limited to 'src/chpasswd.c')
-rw-r--r-- | src/chpasswd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/chpasswd.c b/src/chpasswd.c index 918b27ee..d1c1043a 100644 --- a/src/chpasswd.c +++ b/src/chpasswd.c @@ -44,6 +44,7 @@ #endif /* USE_PAM */ #include "defines.h" #include "nscd.h" +#include "sssd.h" #include "getdef.h" #include "prototypes.h" #include "pwio.h" @@ -431,6 +432,15 @@ int main (int argc, char **argv) *cp = '\0'; } else { if (feof (stdin) == 0) { + + // Drop all remaining characters on this line. + while (fgets (buf, (int) sizeof buf, stdin) != (char *) 0) { + cp = strchr (buf, '\n'); + if (cp != NULL) { + break; + } + } + fprintf (stderr, _("%s: line %d: line too long\n"), Prog, line); @@ -624,6 +634,7 @@ int main (int argc, char **argv) } nscd_flush_cache ("passwd"); + sssd_flush_cache (SSSD_DB_PASSWD); return (0); } |