On Mon, Apr 15, 2024 at 7:56 PM Greg Wooledge <g...@wooledge.org> wrote:
> On Mon, Apr 15, 2024 at 07:04:23PM +0200, Emanuel Attila Czirai wrote: > > In my superficial report, I definitely didn't think of that. I even > forgot > > to mention that it works when escaped like "\>" > > > > I've encountered it in the "adduser" FreeBSD sh script that runs as root, > > while trying to set a one char password like ">", so I thought I'd > mention > > it here as well in case it might be helpful since I saw it happens in > bash > > as well. > > Sounds like you've found a nontrivial bug in FreeBSD (in the adduser > script, not in sh). I hope this gets reported and fixed, and in any case, > good work and thank you. > It's nothing really, there's code in adduser that does this: [ -z ">" -a -z ">" ] && continue which errors like: [: -a: unexpected operator but the > are $passwordvars so if I want to set the password to ">" for example, I get to see that error, but still works as expected in the end.