"pw useradd -D -e" writes bogus expire_days value into pw.conf
Victor Sudakov
sudakov+freebsd at sibptus.tomsk.ru
Sun Nov 5 12:55:10 UTC 2017
Yuri Pankov wrote:
> On Sun, 5 Nov 2017 19:09:14 +0700, Victor Sudakov wrote:
> > Yuri Pankov wrote:
> >> On Sun, 5 Nov 2017 10:32:22 +0700, Victor Sudakov wrote:
> >>> Dear Colleagues,
> >>>
> >>> Could anyone please reproduce this bug, especially on an 11.x and 12.x
> >>> branches? Or is it just me?
> >>>
> >>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223431
> >>
> >> Yes, it's the same on -CURRENT, but as the man page says, argument to -e
> >> must be numeric in presence of -D, so most likely it just needs an
> >> additional check.
> >
> > Hmm, even with a numeric argument it sets the expiry date incorrectly in
> > newly created accounts, see the "Expire" line below:
>
> Indeed, guess there are a lot more bugs to fixed here :-)
>
> - `pw useradd -D -e 0` doesn't reset the value in pw.conf
> - man page doesn't say that `pw useradd -D -p days` should be treated
> the same as -D -e
Even if I treat expire_days as seconds, new accounts are still created
with the expiration date in the past (seconds since epoch, not since
the moment of account creation).
--
Victor Sudakov, VAS4-RIPE, VAS47-RIPN
AS43859
More information about the freebsd-hackers
mailing list