With many, many new features Sun VDI 3.1 launches today.
Some quick links:
As we say – The best VDI ever!
With many, many new features Sun VDI 3.1 launches today.
Some quick links:
As we say – The best VDI ever!
One of my (many) pet peeves are shell scripts that fail to delete any temporary files they use. Included in this pet peeve are shell scripts that create more temporary files than they absolutely need, in most cases the number is 0 but there are a few cases where you really do need a temporary file but if it is temproary make sure you always delete the file.
The trick here is to use the EXIT trap handler to delete the file. That way if your script is killed (unless it is kill with SIGKILL) it will still clean up. Since you will be using mktemp(1) to create your temporary file and you want to minimize any race condition where the file could be left around you need to do (korn shell):
trap '${TMPFILE:+rm ${TMPFILE}}' EXIT TMPFILE=$(mktemp /tmp/$0.temp.XXXXXX)
if further down the script you delete or rename the file all you have to do is unset TMPFILE eg:
mv $TMPFILE /etc/foo && unset TMPFILE
We've just published a new paper that explores the area of risk and cloud application optimization. Does it make sense to refactor that existing application? Should I make it run on the cloud or optimize it? What is cloud computing application utopia?
You can find it here...
https://www.sun.com/offers/details/cloud_refactoring.xml
Table of Contents...
Benefits of cloud computing
Risks of cloud computing
Reducing risk
Definitions
Compatible with the cloud
Runs in the cloud
Optimized for the cloud
Patterns
Methodology
Process overview
Example: two-tier Web service
Initial assessment
Optimize through refactoring
Optimize further
Example: enterprise database cluster
Initial assessment
Optimize through refactoring further
When a thread hits an error in a multithreaded application, that error will take out the entire app. Here's some example code:
#include <pthread.h>
#include <stdio.h>
void *work(void * param)
{
int*a;
a=(int*)(1024*1024);
(*a)++;
printf("Child thread exit\n");
}
void main()
{
pthread_t thread;
pthread_create(&thread,0,work,0);
pthread_join(thread,0);
printf("Main thread exit\n");
}
Compiling and running this produces:
% cc -O -mt pthread_error.c % ./a.out Segmentation Fault (core dumped)
Not entirely unexpected, that. The app died without the main thread having the chance to clear up resources etc. This is probably not ideal. However, it is possible to write a signal handler to capture the segmentation fault, and terminate the child thread without causing the main thread to terminate. It's important to realise that there's probably little chance of actually recovering from the unspecified error, but this at least might give the app the chance to report the symptoms of its demise.
#include <pthread.h>
#include <stdio.h>
#include <signal.h>
void *work(void * param)
{
int*a;
a=(int*)(1024*1024);
(*a)++;
printf("Child thread exit\n");
}
void hsignal(int i)
{
printf("Signal %i\n",i);
pthread_exit(0);
}
void main()
{
pthread_t thread;
sigset(SIGSEGV,hsignal);
pthread_create(&thread,0,work,0);
pthread_join(thread,0);
printf("Main thread exit\n");
}
Which produces the output:
% cc -O -mt pthread_error.c % ./a.out Signal 11 Main thread exit
The best photo I've ever seen of a StorageTek unit:
"An automated magnetic tape vault at CERN computer center, seen on September 15th, 2008. The tapes are used to store the complete LHC data set, from which a fraction of the data is copied to overlying disk caches for fast and widespread access. The handling of the magnetic tape cartridges is now fully automated, as they are racked in vaults where they are moved between the storage shelves and the tape drives by robotic arms. (Claudia Marcelloni, Maximilien Brice, © CERN)" via The Boston Globe
This and other awesome photos have been posted to twitter over the weekend, because the Large Hadron Collider was finally switched on – and will produce tons of data about zillions of hardly existing particles. Yet another special form of virtualization!
Here is the first blog entry I wrote that describes my thought process about using ZFS on OpenSolaris to store our home's data.
Here is the second blog entry I wrote, giving all the details about what I needed to do to format the disks and set up the ZFS pools and filesystems. This was based on the OpenSolaris 2008.11 release; I plan to upgrade to a more recent release (probably an OpenSolaris build after the June 2009 release; I'd love to try the new ZFS deduplication feature). Everything has been running fine, with the exception of the TimeSlider feature for doing automated ZFS snapshots. That was fixed in the June 2009 release.
Powered by ScribeFire.

Sometimes my TiVo gets confused after a power outage, and it takes forever to reboot (I think it's trying to recover its files which takes a while when you have over 1TB of storage connected to the TiVo). Sometimes, I lose some of my shows, and that makes me sad.
So I decided to find some software I could get running on OpenSolaris so I could use my home media server as a backup device for my TiVo shows.
I did it, using the Galleon open source Java application; here's how.
Now, if somebody smarter than me would just port the TiVo software to OpenSolaris, we'd have the benefits of ZFS on a TiVo box. That would be fantastic.
Powered by ScribeFire.
Most people get a virus/cold during the winter since they spend more time indoors interacting with each other. One could validate this fact by doing a study where introverted folks are compared with the ones that are more social. Anyway, during the cold (relatively since I live in California) season I got a case "slow context menu" any time I right-mouse-click in a Windows folder. My computer has been socialized with a bunch of 3rd party software, in addition to its native Vista OS. The kind of software I've installed tends to be geeky: Visual Studio.NET, NetBeans, Eclipse, SmartSVN, cygwin, Filezilla, Java, Mercurial, SQL Server, RealVNC, etc. So which software has been causing me the ... ailment.
At first I searched the registry for "contextmenu". I found lots of entries and gave up after inspecting about a dozen. The internet came to rescue, once again. I found a great utility from the folks at NirSoft. Their utility (ShellExView) helped me to rapidly analyze the shell extensions on my system and I started to turn off the ones which did not come from Microsoft. I rapidly found the cause: SmartSVN (I've been using SVN for zembly and the Java Store). Once I've disabled the extension name every started to work fine (pop-up menus are snappy once again). I'll have to default to the client that NetBeans installs.
Many thanks for the folks at Nir Sofer for making the software available for free.
Meeting in a Grange Hall felt a little like doing business in Boston's Faneuil Hall, a building still in use but suffused with history. On the wall was this Mission Statement:
The dents in the wooden floor were testimony to heavy use of the Prunedale Grange.
|
|
|
Images Copyright 2009 by Katy Dickinson
Here are the slides and some references for my closing talk at Swiss Intranet Summit in Zürich.
Below is the original list, the names added by the Sun women, plus some references. The list is uneven and I am sure there are many more who should be added but here is what I have so far...
Original List (alphabetized, not original order):
List Additions (suggested by Sun Women in Engineering)
Other References
As Christoph Noack opened a time capsule, let me do the same. Mine goes back 2 months to Sept 17/18/19 when specially invited members of the German-language OpenOffice.org community came to Hamburg. The visitors pictured above, plus me and Marcus Lange from Sun who joined the photo, were (l to r): Marcus Lange, Florian Effenberger, Daniel Stoni, Christian Lohmaier, Elizabeth Matthis (aka Liz), Thomas Hackert Uwe Altmann (not pictured: Gerald Geib, Volker Merschmann)
It was so wonderful to meet face to face people otherwise only known
from email and to be able to thank them for their dedication and
support. They each traveled here at their own cost (from far corners of
Germany and even from Switzerland), which further shows their enthusiasm
and dedication to our thriving open source product. On Thursday evening,
those who were already in Hamburg met at a pub (Max&Consorten) for a first get-together. Afterward,
most of us concluded the evening with a round of beers and more talk at
my home---which I jokingly called "Motel Matthis".
Friday started out with a heartfelt word of welcome and thanks from
Michael Bemmer, Senior Director of StarOffice/OpenOffice.org Engineering, and
unfolded with a series of talks and snacks, including lunch and several
smaller group meetings about special topics, until concluding at
approximately 5:30 PM.
There were entertaining and informative talks by Stefan Taxhet on OOo in
general, Gerd Weiss on infrastructure---including a personal tour of the
server rooms to underline some of his points about the hardware, Andreas
Bartel on Renaissance and Uwe Fischer on documentation, as well as tours
of the engineering facility and opportunities to say hello to many of
the OOo developers in real life.

At the end of the very busy but fun day, those of us who still had time
went out to eat together at an Italian restaurant (maybe this
was to get in the mood for the OOoCon in Italy!) and, several courageous
visitors even spent a second night at Motel Matthis! This time Uwe made
sure we had enough beer to let us talk long into the night. Thanks, Uwe!

Some comments I received after the visit are:
thackert: "It was interesting to become acquainted with some people I'd
only known the mail address or nick of, and to hear really interesting
talks as well to "sightsee" SUN. All in all a nice trip and - the best
of all - a really nice stay at "Motel Matthis" with a perfect hostess
(Liz!)"
floeff: "Thank you very much to everyone who made this visit in Hamburg
possible! I'd never been at Sun Hamburg before, and it was a really nice
day meeting old and new friends, getting insight on how the
OpenOffice.org development works, and after all, we also had a lot of
fun and a real great time. Liz is a wonderful hostess and we all enjoyed
some very special days in a community that more and more becomes a real
family."
VolkerMe: "Thank you again for such a nice day, which was very much too
short for me. The opportunity to have personal talks with the engineers
at SUN was so interesting, I wasn't able to discuss everything, so I
hope I can come back another time. And although it has been said so
often: Thanks Liz for hosting the meeting, for the well-prepared
accommodation and for being our always smiling guide!
Saturday came too quickly and I had to say goodbye to my delightful
guests. I hope to organize another visit to thank additional and
like-wise dedicated community members in 2010.
Kind regards,
Liz
Judging from a quick look at the survey results from this weekend's Sun HPC Consortium meeting in Portland, Oregon, Marc Parizeau's talk was a favorite with both customers and Sun employees.
Marc is Deputy Director of CLUMEQ and a professor at Université Laval in Québec City. His talk, Colossus: A cool HPC tower! [PDF, 10MB], describes with many photos how a 1960s era Van de Graaff generator facility was turned into an innovative, state of the art, supercomputing installation featuring Sun Constellation hardware. Very much worth a look.
A nicely-produced CLUMEQ / Constellation video that describes the creation of this computing facility is also available on YouTube.
The current setup of websites for downloading OpenOffice.org installation sets provides builds for several languages and operating systems. But nowadays a lot more are built. Unfortunately they are not that easy to find as they are on mirror servers. The most users do not know this or how to come to these mirrors.
Furthermore there was no comfortable way to download language packs (currently for 96 languages !).
Another reason is that many native language teams have only a small staff or do not have the time to test all available Release Candidate (RC) builds on all platforms for their language. However, these are very close to a final release but have not got the latest tests. But why not offering these to the users with a hint to be carefully when using?
To improve this situation and to deliver more choice we have created a new download website layout.
Main Download Page
http://download.openoffice.org
This website was enhanced to download easily the build you want. Of course the well-known (green) One-Click download remains the same easy way to get your favorite version. The same for the orange button for Developer Snapshots. The new thing is the yellow button that will guide you to the website for Release Candidates.
Full Installations and Language Packs
The improvements were done here to provide all available stable builds:
http://download.openoffice.org/other.html
The first table provides all full installation sets as stable release of the current OpenOffice.org version. The second table provides all stable language packs.
BTW:
A language pack contains only resource files for a specific language and platform to show, e.g., menus, dialogs and error messages in your language. If translated it may contain also the help content. It's a comfortable way to get several languages without to install the applications double and triple. After installation change the languages via menu "Tools - Options - Language Settings - Languages - User Interface".
Release Candidates
A complete new website was created to offer all Release Candidates. Also here the first table has links to the full installation sets and the second to all language packs:http://download.openoffice.org/all_rc.html
Some days ago the 100 millionth download of an OpenOffice.org build was announced. We hope to increase this impressive number with the new download websites.
Happy downloading. :-)
Henry Tufo from NCAR and CU-Boulder spoke this weekend at the Sun HPC Consortium meeting here in Portland, OR. As part of his talk, More than a Big Machine: Why We Need Multiple Breakthroughs to Tackle Cloud Resolving Climate [PDF], he estimated the number of floating-point operations (FLOPs) needed to compute a climate model over a one-century time scale with a 1 km atmosphere model.
His answer was the highlight of the Consortium for me: A Century Experiment requires about a mole of FLOPs.
On 17 October 2009, Saint Timothy's Episcopal Church ("St. Tim's") in Mountain View, California held a fund raising formal dinner and auction called "A Feast of All Things Chocolate" to benefit Santa Maria Urban Ministry or SMUM. Peggy Aoki was the head chef, assisted by Jennifer Ezell of St. Tim's. The cooks clearly had fun putting together the meal, especially the desserts. Both dark and white chocolate fountains were offered for dipping strawberries and cake. My favorite was the ganache in shortbread boats. St. Tim's youth served the dinner. The event was hosted by the Vestry (elected church leaders). We won certificates for two custom made cakes in the silent auction.
My husband John Plocher and I are on the SMUM Board of Directors and were asked to speak about SMUM and why we support it. Some of what we said:
Santa Maria Urban Ministry was founded as an outreach ministry of the Episcopal Diocese of El Camino Real in 1983, providing emergency food to the residents of San Jose's inner city. SMUM is a partner agency of the Second Harvest Food Bank, and has been designated to serve those in need within the eight Central San Jose zip codes. SMUM provides basic services to meet short-term needs, such as food, clothing and referral services, and by supporting long-term transformation through education, counseling and seasonal programs.
John and I have been helping mentor a dozen or so grade and middle school kids in the after school program for several years. During the school year, we focus on homework and computer skills. Last summer, we went on field trips to The Tech Museum of Innovation, the Monterey Bay Aquarium, and the San Francisco Zoo.
Due to a shortage of regular volunteers, the after school program is only open on Tuesdays and Thursdays, but we could be open every weekday if we had more adults available. Sometimes we have too many high school students earning service hour credits; what we need is adult volunteers. When we started, John's and my qualifications were minimal - a desire to help, a couple of hours a week and a willingness to learn Spanish from a first grader! Since then, the kids have stolen our hearts. Our Spanish is improving slowly.
SMUM now has an operating budget of about $200,000/year, of which less than 15% comes from the Episcopal Church. More than 100 families a week from come to the facility for basic foodstuffs to supplement what they are able to buy with food stamps. Dozens of homeless clients get hygiene packs and clothing as well.
Several dozen children are part of the preschool and after school homework/computer programs. Many Latino clients work seasonally in the central valley as fieldworkers and move to San Jose on the off season to work in the construction and service areas. Unfortunately, it is still somewhat the norm in that community for young teens to drop out of school to babysit younger siblings or to go out to work along with their fathers, brothers and uncles in the fields. SMUM's after school program has two goals:
A Feast of All Things Chocolate, Photos
|
|
|
SMUM, Photos
|
|
|
|
Images Copyright 2009 by Katy Dickinson and John Plocher
Developer Snapshot build OOo-Dev OOO320_m5 which installs as OOo-DEV 3.2.0 has been uploaded.
If you find severe issues within this build please file them to OpenOffice.org's bug tracking system IssueTracker.
Please use the following link:
http://download.openoffice.org/next
Release Notes:
http://development.openoffice.org/releases/OOO320_m5_snapshot.html
MD5 checksums:
http://download.openoffice.org/next/md5sums/OOO320_m5_md5sums.txt
Developer Snapshot build OOo-Dev DEV300_m65 which installs as OOo-DEV 3.2 (subject to change) has been uploaded to the mirror network.
If you find severe issues within this build please file them to OpenOffice.org's bug tracking system IssueTracker.
Please use the following link:
http://download.openoffice.org/next
Packages are also available from extended mirror sites ( listed with an [E] ) from the ".../extended/developer/DEV300_m65" directory:
http://distribution.openoffice.org/mirrors/#extmirrors
Release Notes:
http://development.openoffice.org/releases/DEV300_m65_snapshot.html
MD5 checksums:
http://download.openoffice.org/next/md5sums/DEV300_m65_md5sums.txt
|
|
|
My mother, Eleanor Creekmore Dickinson, grew up at 1007 Circle Park Drive, Knoxville, Tennessee. This address does not exist any more. In the mid-1960's, the whole neighborhood was torn down to make room for the University of Tennessee. You can check out Circle Park on Google Maps: the satellite view shows that Circle Park itself is still there but the round street around it is now called Circle Park Drive SW or Circle Park Drive. Originally, Circle Park was a private open space owned by the houses around it.
It is surprising how much of a presence a house that does not exist still has. 1007 Circle Park stood on its own acre of land. It had towers, secret passages (an air gap between inner and outer walls), and a teardrop-shaped carriage drive in the side yard with a porte-cochere to keep the rain off. There were stables and three servant quarters in the back. My great grandfather, Walter Van Gilder, bought the house around 1910. It was ornate Victorian in style, built around the time of the American Civil War.
After 1965, when Evelyn Van Gilder Creekmore and Robert Elmond Creekmore (my grandparents) knew that their home would be torn down, they took as much of the house with them as they could when they moved. This included doors, architectural trim, windows, banisters, and ironwork as well as furniture. Over the years those pieces have been installed in a variety of our family's houses in California and Tennessee.
My husband, John Plocher just finished bolting the extremely heavy black iron fireback (featuring Poseidon and seahorses) into the exterior wall of his new workshop. In our house, we also have furniture carved by Ellen Bolli Van Gilder (my great grandma), a parlor screen with six paintings by my ancestress Mary Esperandieu, the newel post from the 1007 Circle Park staircase, a heater grate, a metal fire screen, several panels of stained glass and clear leaded glass, and a variety of mirrors that Walter Van Gilder made himself for 1007 Circle Park.
The bottom left photo shows the front door of 1007 Circle Park on the day my mother married my father in 1952. In the picture, she is being escorted to the wedding by her father, R.E. Creekmore, flanked by my other grandparents (B.W.O. Dickinson and Gladys Grace Oakes Dickinson) and Ellen Bolli Van Gilder. The doors and stained glass panel in the back of that 1952 photo are the same doors and stained glass panel in my parents' house in San Francisco now, shown on the right with my mother at the door. Walter Van Gilder made the glass panel.
|
|
|
|
|
|
|
|
|
|
Images Copyright 1938-2009 by Katy Dickinson and Eleanor Dickinson
I assume that most of the people in the Java community have already noticed that the Java team at Sun has released a beta version of the Java Store. Lots of details about the launch can be read here. If you are a consumer that uses the store, you have several options of installing and uninstalling the applications that you've installed from the store. I'll focus on the more obscure ways of uninstalling apps on Windows:
Niall wrote a post to the zfs-auto-snapshot alias announcing his new time-sliderd implementation of the ZFS Automatic Snapshot service.
I'm looking forward to this new implementation: I wrote the old ksh-based code back in 2006 and have been adding features & fixing bugs ever since. Over time, it's started creaking at the seams - there were a few issues with it that were tricky to deal with in it's existing implementation. I've long felt the desire to start again, but just couldn't give it the time it needed. Well, Niall's done just that - many thanks Niall!
I've got commentary on the thread on the auto snapshot mailing list and have also forwarded Niall's announcement to zfs-discuss. The old README on this blog has been updated, with a pointer to the original heads-up message.
So now I get to focus on my day-job again :-)
The OpenDS development team is very pleased to announce the immediate availability of OpenDS 2.2.0-RC3.
OpenDS 2.2 offers the following new features from OpenDS 2.0 :
The purpose of the Release Candidate is to solicit one last round of testing before the final release. So please test the OpenDS release with your client applications, in your environment or on your favorite platform.
If you do find a bug, please report it with Issue Tracker.
We welcome feedback. Please report you experience with OpenDS on our mailing lists, or on #opends IRC channel on Freenode.
OpenDS 2.2.0-RC3 is built from revision 6147 of the b2.2 branch of the source tree.
The direct link to download the core server is: http://www.opends.org/promoted-builds/2.2.0-RC3/OpenDS-2.2.0-RC3.zip
The direct link to download the DSML gateway is: http://www.opends.org/promoted-builds/2.2.0-RC3/OpenDS-2.2.0-RC3-DSML.war
We have also updated the archive that may be used to install OpenDS via Java Web Start. You may launch that using the URL http://www.opends.org/promoted-builds/2.2.0-RC3/install/QuickSetup.jnlp, or visit https://www.opends.org/wiki/page/OverviewOfTheQuickSetupTool for more information.
Detailed information about this build is available at http://www.opends.org/promoted-builds/2.2.0-RC3, including the detailed change log
Major changes incorporated since OpenDS 2.2.0-RC2 include:
Technorati Tags: directory-server, java, ldap, opends, opensource, performance, quality, replication
My husband, John Plocher and I were at HSC the other day looking for parts for his HO-scale model train layout. If you like putting together your own electronics, you will be happy at Halted.
|
|
|
|
|
|
|
Images Copyright 2009 by Katy Dickinson
|
|
|
Images Copyright 2009 by Katy Dickinson
I'll be spending the end of the week at Cartes, talking with the SmartCard crowd. Between the 10th anniversary of GlobalPlatform (12 years of JavaCard!) and the release of JavaCard 3, it's a big year for us in the SmartCard world.
The current episode of the German HELDENFunk podcast features an interview with Chris Gerhard about one of his favourite subjects: DTrace (in English, beginning at 14:58):
After the interview, we hear a guy called "Konteener Kalle" express his love (in German) for DTrace by playing a prank on his boss: Whenever he presses the Windows key (on an OpenSolaris system, mind you), he's punished by watching the XScreensaver BSOD hack (of course not knowing that it's just a screensaver).
That little joke challenged me to actually implement this prank. Here's how to do it.
The idea of this prank is to start the XScreensaver Blue-Screen-of-Death screensaver (which simulates a Windows crash experience) on an OpenSolaris system whenever the user presses a certain key a certain number of times. This could be the Windows-Key (which doesn't have any real use on an OpenSolaris machine) or any other key. We count the number of key presses and only execute the BSOD after a certain number of key presses in order to make the prank less obvious.
If you have a Windows-Keyboard, this is easy: Run xev and press the Windows-Key. Take note of the keycode displayed in the xev output. Of course you can use any other key as well to play this prank. In this case, I'm using the left Control-Key, because I don't have a Windows-Key on the system I'm working on. The Control key has the keycode 37.
XScreensaver comes with a great collection of "hacks" that do interesting stuff on the screen when the screensaver activates. Check out the /usr/lib/xscreensaver/hacks directory. Each hack can be run individually, but then it will only execute inside a new window. For the BSOD illusion to be realistic, we want to execute the BSOD hack in full-screen.
This can be achieved by telling XScreensaver to demo the BSOD hack for us. It will then create a full-screen window and execute the BSOD hack inside the new window. The following command will tell XScreensaver to run a hack for us:
xscreensaver-command -demo <number>
The <number> part is a little complicated: XScreensaver looks at its config file ~/.xscreensaver where it stores a list of programs and arguments after the keyword "programs:". <number> simply refers to the number of the hack on that list. Therefore, we must create an entry in our admin user's .xscreensaver file that starts bsod(6) with the right parameters and that gives us a known number to call xscreensaver-command with.
Let's put our entry at the top of the list so we can simply use the number "1" to execute the BSOD screensaver. Somewhere in our .xscreensaver, the programs section should look like this:
... textFile: /etc/motd textProgram: date textURL: http://blogs.sun.com/roller/rss programs: \ - "BSOD Windoze" bsod -root -only nt \n\ - "Qix (solid)" qix -root -solid -segments 100 \n\ - "Qix (transparent)" qix -root -count 4 -solid -transparent \n\ ...
You can test this by running xscreensaver-command -demo 1.
Now it gets more interesting. How do we use DTrace to find out when a user presses a certain key? All we know is that the Xorg server processes the keystrokes for us. So let's start by watching Xorg in action. The following DTrace command will trace all function calls within Xorg:
pfexec dtrace -n pid`pgrep Xorg`:::entry'{ @func[probefunc] = count(); }'
Let's start it, press the desired key 10 times, then stop it with CTRL-C. You'll see a long list of Xorg functions, sorted by the number of times they've been called. Since we pressed the key 10 times, it's a good idea to look for functions that have been called ca. 10 times. And here, we seem to be lucky:
... miUnionO 8 DeviceFocusInEvents 9 CommonAncestor 10 ComputeFreezes 10 CoreLeaveNotifies 10 key_is_down 11 FreeScratchPixmapHeader 12 GetScratchPixmapHeader 12 LookupIDByType 12 ProcShmDispatch 12 ProcShmPutImage 12 ...
The key_is_down function looks like exactly the function we're looking for! In fact, some googling tells us that this function's 2nd argument is the keycode of the key that is down when the function is called.
Why do we see "11" and not "10" function calls to key_is_down? Because it also counted my pressing of the Ctrl-Key when I stopped the DTrace script through Ctrl-C :).
This gives us enough knowledge to create the following DTrace script:
#!/usr/sbin/dtrace -s
/*
* BSODKey.d
*/
/*
* This D script will monitor a certain key in the system. When this key is
* pressed, a shell script will be executed that simulates a BSOD.
*
* The script needs the process id of the Xorg server to tap into as its
* first argument.
*
* One example of using this script is to punish a user pressing the
* Windows key on an OpenSolaris system by launching the BSOD screen saver.
*/
#pragma D option quiet
#pragma D option destructive
BEGIN
{
ctrlcount = 0;
keycode=37
}
pid$1::key_is_down:entry
/arg1 == keycode/
{
ctrlcount ++;
}
pid$1::key_is_down:return
/ctrlcount == 10/
{
ctrlcount = 0;
system("/usr/bin/xscreensaver-command -demo 1");
}
First, we need to enable DTrace's destructive mode (ever heard of a "constructive prank"?) otherwise we can't call the system-command at the end. The script uses the pid provider to tap into Xorg. Therefore, we need to give it the PID of the Xorg server as an argument:
pfexec ./BSODKey.d `pgrep Xorg`
It then sets up a probe that fires whenever key_is_down is called with our keycode and counts the key presses. At the end of the key_is_down function call, it checks whether we reached 10 keypresses, then executes the BSOD screen saver and resets the counter. You may need to make sure that the DISPLAY variable is set correctly for the BSOD program to show up on the victim's screen when starting this script.
After hitting the Control-Key 10 times, we're rewarded with our beloved BSOD:
That wasn't too difficult, was it? Yes, one could have done the same thing by writing a regular script that taps into /dev/kbd or something similar. But the beauty of DTrace lies in the simplicity of this script (Tap into the right function while it's running) and in the fact that it now can be modified very easily to fire BSODs at any kind of event, including the user hitting a certain area of the screen with his mouse or selecting a particular text or whatever you choose it to be.
So, have fun with this script and let me know in the comments what kind of pranks (or helpful actions) you can imagine with DTrace!
If you share a file system using the CIFS server (not SAMBA) and create a file in that file system using Windows XP the file ends up with these strange permissions and an ACL like this:
: pearson FSS 12 $; ls -vd Bad
d---------+ 2 cjg staff 2 Nov 13 17:11 Bad
0:user:cjg:list_directory/read_data/add_file/write_data/add_subdirectory
/append_data/read_xattr/write_xattr/execute/delete_child
/read_attributes/write_attributes/delete/read_acl/write_acl
/write_owner/synchronize:allow
1:group:2147483648:list_directory/read_data/add_file/write_data
/add_subdirectory/append_data/read_xattr/write_xattr/execute
/delete_child/read_attributes/write_attributes/delete/read_acl
/write_acl/write_owner/synchronize:allow
: pearson FSS 13 $;
The first thing that riles UNIX some users is the lack of any file permissions, although things seem to work fine. The strange group ACL is for the local WINDOWS SYSTEM group. However the odd thing is for me it renders iTunes on the Windows system unable to see the files that it has created.
The solution is to add a default ACL to the root of the file system (well to every object in the file system if the file system is not new) that looks like this:
A+owner@:full_set:fd:allow,everyone@:read_set/execute:fd:allow
So this has the rather pleasant side effect of setting the UNIX permissions to something more recognisable:
: pearson FSS 20 $; ls -vd Good
drwxr-xr-x+ 2 cjg staff 2 Nov 13 18:16 Good
0:owner@:list_directory/read_data/add_file/write_data/add_subdirectory
/append_data/read_xattr/write_xattr/execute/delete_child
/read_attributes/write_attributes/delete/read_acl/write_acl
/write_owner/synchronize:file_inherit/dir_inherit/inherited:allow
1:everyone@:list_directory/read_data/read_xattr/execute/read_attributes
/read_acl:file_inherit/dir_inherit/inherited:allow
: pearson FSS 21 $; and the even more pleasant side effect of making iTunes works again!