[Toybox] mkpasswd.c

Rob Landley rob at landley.net
Fri Jun 27 19:52:15 PDT 2014


On 06/26/14 17:07, scsijon wrote:
>> We don't need "-m help" when we can put the list of supported types in
>> the help text itself. (Unless this is used programmatically to
>> autodetect support? The ubuntu version outputs a lot of extra verbiage
>> that would make parsing hard, and the busybox-1.19.0 I have lying around
>> doesn't support -m help at all?) I've yanked it for now, I can put -m
>> help back if anybody's actually using it...
>>
> 
> um, as I read it the -m allows you to SET which encription method type
> IS to be used and the -m help allows the reading script to pick which
> one it is set for from those available or failover, the only one I have
> found across my testing systems that uses it is selinux, although it
> could be used by HLFS as that tends to use this sort of stuff (I don't
> have that installed at the moment).

The problem is this isn't easily mechanically parseable:

$ mkpasswd -m help
Available methods:
des	standard 56 bit DES-based crypt(3)
md5	MD5
sha-256	SHA-256
sha-512	SHA-512

If you're just going to grep the output for a recognized keyword, you
can just as easily do that with "mkpasswd --help".

That said, "sane way to do it" and "what selinux expects" have zero
relation. (The NSA wrote a system to "secure" linux, and people still
trust it post-Snowden. It would be hilarious if it wasn't so SAD.)

Sigh. So how do I test that what -m help is producing is what they need?
(Is there an example command line...?)

Thanks,

Rob

 1403923935.0


More information about the Toybox mailing list