PR: 240378
Details
- Reviewers
jrm otis glebius - Group Reviewers
Src Committers - Commits
- rG4835fc45efe8: login.conf: Remove never used ignoretime/ignoretime@
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I can't find any references to these in sources, indeed.
Smeone from src should approve as well. Other than that, LGTM.
This options plays together with times.allow and times.deny, that are still documented in the login.conf. I think deeper digging is required to see if this is indeed a cruft or actually a functional thing. If it is cruft, then documentation in login.conf on times.allow/times.deny is also cruft.
If it ever existed it existed in lib/libutil/login_ok.c and lib/libutil/login_times.c. Even the original import to FreeBSD does mention ignoretime.
Both are still used, but ignoretime does not even appear in the initial import:
osipovmi@deblndw011x:~/var/Projekte/freebsd/src (pr-240378) $ grep -F -r -e times.allow -e times.deny . ./lib/libutil/login.conf.5:.It "times.allow list List of time periods during which" ./lib/libutil/login.conf.5:.It "times.deny list List of time periods during which logins are" ./lib/libutil/login.conf.5:.Em times.allow ./lib/libutil/login.conf.5:.Em times.deny ./lib/libutil/login.conf.5:.Em times.allow ./lib/libutil/login.conf.5:.Em times.deny ./lib/libutil/login.conf.5:.Em times.allow ./lib/libutil/login_ok.3:.Em times.allow ./lib/libutil/login_ok.3:.Em times.deny ./lib/libutil/login_ok.3:.Em times.allow ./lib/libutil/login_ok.3:.Em times.deny ./lib/libutil/login_ok.3:.Em times.allow ./lib/libutil/login_ok.3:.Em times.deny ./lib/libutil/login_ok.c: lt = login_timelist(lc, "times.allow", <imesno, <imes); ./lib/libutil/login_ok.c: lt = login_timelist(lc, "times.deny", <imesno, <imes); ./lib/libutil/login_times.3:.Ar times.allow ./lib/libutil/login_times.3:.Ar times.deny
Import commit: 68bbf3adb0b5def46b5174261657b038543972e3
So we have two options:
- Remove ignoretime
- Implement ignoretime
Simple patch (untested):
@@ -218,6 +218,11 @@ auth_timeok(login_cap_t *lc, time_t t) { int rc = 1; /* Default is ok */ + + /* Bypass time restrictions if ignoretime is set */ + if (lc != NULL && login_getcapbool(lc, "ignoretime", 0)) { + return rc; + } if (lc != NULL && t != (time_t)0 && t != (time_t)-1) { struct tm *tptr;
Bugzilla does not contain any issues that ignoretime does not work. Weird, not never obviously used.
LGTM.
Thanks for bringing the patch in Michael.
I was also very surprised when I come across it, both that it didn't seem to be mentioned anywhere in the source tree and that no one had noticed before me.