control: tag -1 +pending On Mon, May 28, 2018 at 2:49 PM, Shengjing Zhu <[email protected]> wrote: > Source: shadowsocks-libev > Severity: wishlist > Tags: patch > > Dear Maintainer, > > This package depends apg or pwgen to generate an initial password, but I > don't think it's needed to use an extra program. > > perl-base is an Essential package, so every Debian based system has perl > interpreter. You can just use perl's rand function to do this. So that > this package has less depends and I can reduce the install size. > > passwd=$(perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..12)') > > This snippet is taken from mysql-5.7 package.
Thanks for the patch! Applied with slight modification. AFAIK, "set +e" before setting $passwd and "set -e" afterwards are necessary. This can prevent leaking generated text. Cheers, -- Roger Shimizu, GMT +9 Tokyo PGP/GPG: 4096R/6C6ACD6417B3ACB1

