Friday, June 29, 2012

GSoC Week #5 & 6 - Onto the flow of working!

Hello ladies and gentlegeeks!

It's currently 7:15, and lack of sleep is quite a problem of mine. I should probably get it checked out, seeing as I fall asleep around 6am (typically) and wake up about 3pm (15:00). I don't find it to be very productive; which is also one reason why I haven't posted in a bit. I've been so tired and unmotivated to do absolutely anything! Since it is also Friday I decided to combine info from last week and this week into one post so, enjoy ;)

The current events I am going through don't help much either. Lucky me, oh lucky me!

On the bright side I have completely finished making the policy-parser for seorigin! Huzzah!

One thing I did notice though was that although it works well on Gentoo (even this I have SLIGHT reservations about) it had some "weirdness" on Ubuntu. Currently, it is being made simply for Gentoo purposes and once it is complete cross-platform compatibility will be worked on. Although, Sven says that it worked well for him on other distros aside from Gentoo. Which is a good thing =)

Since the completion of the policy-parser I have gathered quite a bit of knowledge on regular expressions, I am not so frightened of them anymore!

Onto the big boy of seorigin: The workflow component!

Regarding this, myself and "The Big Blue" were able to take the output from the parsed output of policy-parser and make a nice clean format then I went ahead and took that output for the workflow to take in and insert into their respective database tables! So, good news there.

Onto the real task though, the normalization of the information gathered. So, what is normalization? Is it when we make the database normal and a functioning member of society? Well....kinda. What it does is this: normalization is the process in which a database table is taken and organized to reduce redundancy and dependency. This usually involves taking information from a larger table and inserting it into smaller tables. I believe this process is going to be the most algorithmic intense section of the project. I look forward to it, hesitantly.

Well, I am done reading this out to myself in my daze of being awake and asleep!

With regards,
    Devan Franchini

Monday, June 18, 2012

GSoC Week #4 - Capture Plugin near complete!

Hello Ladies and Gentlegeeks!

Good news!

The capture plugin for seorigin is complete!


A big thanks to my Professor Anthony Basile for giving me a boost with the regexs (they aren't as evil as I thought they were...they are still evil), as well as a thanks to my mentor Sven Vermulen for helping me find the pattern in the *.te files as well as the all_interfaces.conf files.
 
Well, mostly complete. And for this reason:
The source record for a SELinux policy typically comes from the .te file of a package and the corresponding line.
The definition record on the other hand is a little more complex,  it derives from the all_interfaces.conf as well as *.spt files. The only issues faced when having these two separate file types is that the pattern may or may not be the same thing. I am in talks with one of my mentors, SwifT (Sven Vermulen), regarding this.

Aside from that the parsing of all_interfaces.conf files is complete as well as *.te files!

I'm pretty happy with this as well. I'll be moving onto the workflow component shortly and I already have a vague understanding of what I can do for this monster component of seorigin.

I personally believe the workflow component will be the most time consuming part of this project, it will require creating a database of the parsed records (I believe this will be done by writing commands for a SQLite database to a .sql file via python), it will be necessary to check if the database needs to be updated (I believe this will be done by a check to the parsed records, if the records are any different than before, we will need to update, if not then an update is obviously not necessary), and it needs to make sure the information being stored into the database is presentable for the query interface once compiled.

Although this sounds easy enough I don't believe anything regarding coding is ever as easy as it sounds for me, as of right now. I'm looking forward to this though and hope to have a final outcome that will not only be good, but useful as well :)

I hope everyone has a good week and each person does something productive with the time given to them!

With my regards,
    Devan Franchini (twitch153)

Saturday, June 9, 2012

GSoC week #3 - Finished with Calculus!

Welcome ladies and gentlegeeks!

I feel as if little progress was made this week regarding Seorigin. While this upsets me I am also happy that I am finally done with my calculus summer course!

So that means only one thing:

Time to kick coding up a notch. :)

Progress was made but it was far from what I was hoping to accomplish.

I was hoping to complete the capture plugin for seorigin.

This required getting proper regexs set up in my python script and creating the proper format for the parsed file.

In order to parse anything I needed to see what pattern there was in the raw macro expansions that I could use to aid myself in parsing out 

Once I found this pattern I documented it along with a few other things on SEOrigin's wiki:

https://github.com/twitch153/seorigin/wiki/_pages

If you're interested in this pattern or how seorigin will be working then look for the page concerning how seorigin works and get a nice read out of it.

I also changed the way the policy-parser read in the files for pattern searching as well as a nice way to default the location of the outputted file in case one was not specified (Thanks to Igraltist for help with this).

Next week I plan on *hopefully* getting the proper regexs for the parser. Hopefully I can get this done in the time I want to. Regexs are a HUGE pain in the nether region of my body. I'll be working with my professor "The Big Blue" on getting this to work soon.

Enjoy your weekend folks, I know I will be enjoying mine,
     Devan Franchini (twitch153)

Friday, June 1, 2012

The long and winding week.(GSoC week - 2)

Welcome back Ladies and Gentlegeeks that have been reading up on my blog, and hello to any new readers.

If this week could have a theme it would be this:

"Cramming".

Everything about this week has been about cramming, aside from my Google summer of code work (You should never try and cram coding, bad results will ensue). I have been cramming in my calculus class, only one week left until I am free from that nightmare!!! If you haven't noticed, math is not my strong point....I can do it without struggle I just don't like it. I prefer coding and anything computer related over anything that has to do with in depth math.

So far I have been working on my parsing script for project: seorigin. Learning python on the go is tricky at first but I found that I really enjoy coding in python. :) I have not yet completed the parsing script, but I've gotten enough code in to read in the file I am looking to parse, checking for a certain pattern, and then parsing out random spam. I think it shouldn't be TOO much longer till I have it parsing like a killing machine! It'll eat macro expansions and crap properly parsed output (I hope someone gets this reference)!

This week has drained me quite a bit.

 So I'll keep this week's post short...

Until next week, stay classy.