bin/142986: /dev/random can not be source for tr(1) | tr: Illegal byte sequence

vermaden vermaden at interia.pl
Tue Jan 19 18:50:06 UTC 2010


>Number:         142986
>Category:       bin
>Synopsis:       /dev/random can not be source for tr(1) | tr: Illegal byte sequence
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 19 18:50:05 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     vermaden
>Release:        8.0-RELEASE i386
>Organization:
>Environment:
Stock i386 8.0-RELEASE output.
>Description:
While I can use /dev/random for tr(1) source (password generation for example) on Linux (CentO@ 5.4 to be precise) and also on gtr(1) from coreutils port, the BSD tr(1) does not want to cooperate with /dev/random output, as below:

FreeBSD% head -c 200 /dev/random | tr -d -c 'A-Za-z0-9'
tr: Illegal byte sequence

FreeBSD% head -c 200 /dev/random| gtr -d -c 'A-Za-z0-9'
x9SMkHI4INJOwwAHhHocHElFdrVJOEMYxgtcVndR

CentOS$ head -c 200 /dev/random | tr -d -c 'A-Za-z0-9'
KMLqkAymFbFlpXPNrs5PaQ6McrHW3xzeBo9zm3aaL


>How-To-Repeat:
FreeBSD% head -c 200 /dev/random | tr -d -c 'A-Za-z0-9'
tr: Illegal byte sequence

FreeBSD% head -c 200 /dev/random| gtr -d -c 'A-Za-z0-9'
x9SMkHI4INJOwwAHhHocHElFdrVJOEMYxgtcVndR

CentOS$ head -c 200 /dev/random | tr -d -c 'A-Za-z0-9'
KMLqkAymFbFlpXPNrs5PaQ6McrHW3xzeBo9zm3aaL
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list