summaryrefslogtreecommitdiff
path: root/src/newusers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/newusers.c')
-rw-r--r--src/newusers.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/newusers.c b/src/newusers.c
index c1d29f83..4c6546e8 100644
--- a/src/newusers.c
+++ b/src/newusers.c
@@ -116,7 +116,7 @@ static void usage (int status)
"\n"
"Options:\n"),
Prog);
- (void) fputs (_(" -b, --badnames allow bad names\n"), usageout);
+ (void) fputs (_(" -b, --badname allow bad names\n"), usageout);
#ifndef USE_PAM
(void) fprintf (usageout,
_(" -c, --crypt-method METHOD the crypt method (one of %s)\n"),
@@ -383,7 +383,7 @@ static int add_user (const char *name, uid_t uid, gid_t gid)
/* Check if this is a valid user name */
if (!is_valid_user_name (name)) {
fprintf (stderr,
- _("%s: invalid user name '%s'\n"),
+ _("%s: invalid user name '%s': use --badname to ignore\n"),
Prog, name);
return -1;
}
@@ -464,7 +464,9 @@ static int add_passwd (struct passwd *pwd, const char *password)
{
const struct spwd *sp;
struct spwd spent;
+#ifndef USE_PAM
char *cp;
+#endif /* !USE_PAM */
#ifndef USE_PAM
void *crypt_arg = NULL;
@@ -607,11 +609,13 @@ static int add_passwd (struct passwd *pwd, const char *password)
static void process_flags (int argc, char **argv)
{
int c;
+#ifndef USE_PAM
#if defined(USE_SHA_CRYPT) || defined(USE_BCRYPT) || defined(USE_YESCRYPT)
int bad_s;
#endif /* USE_SHA_CRYPT || USE_BCRYPT || USE_YESCRYPT */
+#endif /* !USE_PAM */
static struct option long_options[] = {
- {"badnames", no_argument, NULL, 'b'},
+ {"badname", no_argument, NULL, 'b'},
#ifndef USE_PAM
{"crypt-method", required_argument, NULL, 'c'},
#endif /* !USE_PAM */