Goal: Check the passwd arguments and fail with the usage message if there
      are more than one non option arguments (i.e. usernames).

Fixes: #410268

Status wrt upstream: not reported yet.

Index: shadow-4.1.0/src/passwd.c
===================================================================
--- shadow-4.1.0.orig/src/passwd.c
+++ shadow-4.1.0/src/passwd.c
@@ -789,6 +789,12 @@
 		name = myname;
 
 	/*
+	 * Make sure that at most one username was specified.
+	 */
+	if (argc > optind+1)
+		usage (E_USAGE);
+
+	/*
 	 * The -a flag requires -S, no other flags, no username, and
 	 * you must be root.  --marekm
 	 */
