An opie seed should be at least 6 chars long. It defaults to 2 chars from the hostname and 4 random digits. I have don't have a hostname (not set in rc.conf) (equivalent to hostname being "" instead of not existing?). The result is that opiepasswd creates a seed with 4 chars only. Later, opiekey(1) rejects this seed. Fix: Could use one or two random chars if the hostname is too short (trivially patch contrib/bin/newseed.c?). How-To-Repeat: # hostname "" switch to a user who has never used opie (no entry in /etc/opiekeys) # opiepasswd -cf
I wonder whether this falls into the category "dont do that" situation, where people do things that we do not support. Like using a custom kernel, this smells like something that people choose for themselves. -- /"\ Best regards, | remko@FreeBSD.org \ / Remko Lodder | remko@EFnet X http://www.evilcoder.org/ | / \ ASCII Ribbon Campaign | Against HTML Mail and News
Why are short hostnames unsupported? Anyways, here's a basic patch to check for short hostnames as much as "no hostnames". Not tested. I have no idea where "ke" came from. Is it better than generating a couple (or more) of random characters?
This patch: Index: newseed.c =================================================================== --- newseed.c (revision 212217) +++ newseed.c (working copy) @@ -81,6 +81,10 @@ utsname.nodename[1] = 'e'; } utsname.nodename[2] = 0; + if (!isalnum(utsname.nodename[0]) + utsname.nodename[0] = 'k'; + if (!isalnum(utsname.nodename[1]) + utsname.nodename[1] = 'f'; if (snprintf(seed, OPIE_SEED_MAX+1, "%s%04d", utsname.nodename, (rand() % 9999) + 1) >= OPIE_SEED_MAX+1) should fix seed generation also for one-letter hostnames (the generated seed for hostname "x" was "x." and the opiepasswd failed as well because of the isalnum() check in writerec.c. //Marcin
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped