Hello,
So after quite some time I finally got some HBAC time rules code I am
able to present. I forked your sssd Github repository and added the code
in my branch, the forked repo can be found on the following link:
https://github.com/stlaz/sssd/tree/freeipa-timerules
Please note that if there are any changes to the current state of
implementation it will be done via rebases so simply pulling the repo
might not always do. I will also attach my patches to this mail.
About the implementation:
You can read most about it at the feature's design page:
http://www.freeipa.org/page/V4/Time-Based_Account_Policies. I'm using
libical for parsing iCalendar strings which form the base of the time
rules. As such, for proper time zone handling, the Olson city name of
the host running SSSD is required.
Now I know that the pressure with this part of SSSD is on portability
lately and I have to say that to make getting Olson name portable, this
might get a bit painful. Currently, the presented solution should run
just fine on Red Hat-like and Debian-like distros and it's based on the
/etc/localtime (/etc/timezone) file. From what I've gathered, you would
also like to have it ported to FreeBSD and Solaris (correct me if I'm
wrong). I already did some research on how to get the Olson name there
but it all seems a bit messy so if you know of a good way, please, let
me know.
Also currently the Python bindings are missing but I'm hoping to add
these if not today then later this week. I have them pre-prepared from
the previous implementation, they just need to be modified a bit.
Standa