From c04189bfb6e8c8032e6eced171bdda3533dd9c49 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Sun, 31 Aug 2008 17:30:00 +0000 Subject: [PATCH] * src/pwconv.c, src/pwunconv.c: Fail if unexpected parameters are provided. --- ChangeLog | 5 +++++ src/pwconv.c | 3 +++ src/pwunconv.c | 3 +++ 3 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index f2e5c750..179d1f02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-29 Nicolas François + + * src/pwconv.c, src/pwunconv.c: Fail if unexpected parameters are + provided. + 2008-08-29 Nicolas François * src/passwd.c: Add brackets and parenthesis. diff --git a/src/pwconv.c b/src/pwconv.c index ea7e64fc..475c92ae 100644 --- a/src/pwconv.c +++ b/src/pwconv.c @@ -118,6 +118,9 @@ int main (int argc, char **argv) const struct spwd *sp; struct spwd spent; + if (1 != argc) { + (void) fputs (_("Usage: pwconv\n"), stderr); + } Prog = Basename (argv[0]); (void) setlocale (LC_ALL, ""); diff --git a/src/pwunconv.c b/src/pwunconv.c index a727bead..c0f49be3 100644 --- a/src/pwunconv.c +++ b/src/pwunconv.c @@ -80,6 +80,9 @@ int main (int argc, char **argv) struct passwd pwent; const struct spwd *spwd; + if (1 != argc) { + (void) fputs (_("Usage: pwunconv\n"), stderr); + } Prog = Basename (argv[0]); (void) setlocale (LC_ALL, "");