Today's Page Hits: 444
I have more hair and it isn't so grey. :->
This page validates as XHTML 1.0, and will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device. It was created using techniques detailed at glish.com/css/.
I knew I was close to having a lot more work last night. I spent a little bit of time this morning getting the error handling done the way I wanted for the evaluation (does a return of FALSE mean an error or not to match?). I also spliced the network parsing into the command line. Still needs to be reworked a bit, a network address is not a subnet after all. But, it now handles evaluating addresses correctly:
% /a.out -r tests/hulk.txt -d 12 -u 1167 -a 192.168.3.211 4, 25, 34000, uid == 1066 5, 30, 32000, uid == 1067 || uid == 1065 6, 15, 2000, uid == 1068 && gid == 500 7, 40, 8000, gid == 500 9, 40, 8000, day == 10 15, 3, 15000, subnet == 192.168.3.0/24 16, 3, 15000, subnet == 10.10.20.0/24 25, 2, 48000, ip == 192.168.2.211 1114, 30, 32000, !(uid == 1167 || uid == 1165) 1115, 40, 8000, !(day == 11) The matching policy is: 15, 3, 15000, subnet == 192.168.3.0/24 % ./a.out -r tests/hulk.txt -d 12 -u 1167 -a 192.168.2.211 ... The matching policy is: 25, 2, 48000, ip == 192.168.2.211 % ./a.out -r tests/hulk.txt -d 12 -u 1167 -a 10.10.20.5 ... The matching policy is: 16, 3, 15000, subnet == 10.10.20.0/24
Looks like I should have an option to dump the policies and by default not do it.
What I am struggling with now is how to differentiate between essentially testing this on the server and on any other machine. If it is the server, then I can state that the only command line parameters for attributes are those that I can pull out of a NFS request. I don't need anything else.
But if this is being run on a different computer, then I might need to provide some mock-up ability. E.g., I might want to set a netmask, a domain name, etc. In short, any of the secondary attributes.
I'm thinking of taking these off of the command line and putting them in a .speadm file. I want to focus on the command line looking like a NFS packet, but still allow for flexibility when debugging.
The latest code is at: speadm.c and speadm.h.