Jan 4 2010

Finding Files with Applied ACL — RHEL 5

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Following a discussion on Freenode’s #fedora, I set out to find a quick and easy way to find all files (or directories) that have a non-default ACL applied.

Fortunately, pylibacl exists!

Assuming you’ve installed pylibacl, you can now run a simple find command to locate your files:

# the new line is important, and so is the space before the print statement.
# it should work if pasted.
find . -type f -exec /usr/bin/python -c "import posix1e;
if posix1e.has_extended('{}'):
 print '{}'
" \;
# the new line is important, and so is the space before the print statement.
# it should work if pasted.
find . -type f -exec /usr/bin/python -tt -c “import posix1e;
if posix1e.has_extended(‘{}’):
print ‘{}’
” \;# the new line is important, and so is the space before the print statement.# it should work if pasted.

Dec 3 2009

Segfaults on FreeBSD 7 and PHP5 – Solved

Looks like compiling libxml2 without pthread support causes severe issues in PHP, E.G:

(gdb) bt
#0  0x28959cd0 in ?? ()
#1  0x285b13d4 in pthread_mutex_destroy () from /lib/libc.so.7
#2  0x28346668 in xmlFreeRMutex () from /usr/local/lib/libxml2.so.5
#3  0x28398faa in xmlDictCreateSub () from /usr/local/lib/libxml2.so.5
#4  0x282d88fb in xmlCtxtResetPush () from /usr/local/lib/libxml2.so.5
#5  0x080844eb in php_libxml_shutdown ()
#6  0x0808451b in zm_shutdown_libxml ()
#7  0x0814b4ae in module_destructor ()
#8  0x08151804 in zend_hash_apply_deleter ()
#9  0x08151a48 in zend_hash_graceful_reverse_destroy ()
#10 0x08147d2e in zend_shutdown ()
#11 0x0810615f in php_module_shutdown ()
#12 0x081c4100 in main ()

The (relatively simple) fix is to remove the last hunk in /usr/ports/textproc/libxml2/files/patch-configure — after doing so, run:

The contents of /usr/ports/textproc/libxml2/files/patch-configure after patching should look like this:

--- configure.orig      2009-10-06 18:31:12.000000000 +0200
+++ configure   2009-11-30 12:54:21.000000000 +0100
@@ -12149,7 +12149,7 @@
 VERSION_SCRIPT_FLAGS=
 $(/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null) && \
 VERSION_SCRIPT_FLAGS=-Wl,--version-script=
-test "`uname`" == "SunOS" && \
+test "`uname`" = "SunOS" && \
 VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,"

 if test -n "$VERSION_SCRIPT_FLAGS"; then
@@ -19856,11 +19856,12 @@
 fi
 if test "$PYTHON_VERSION" != ""
 then
+       with_python=`$PYTHON -c "import sys; print sys.exec_prefix"`
 if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
 -d $with_python/lib/python$PYTHON_VERSION/site-packages
 then
 PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
-           PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
+           PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages
 else
 if test -r $prefix/include/python$PYTHON_VERSION/Python.h
 then

Obviously, you should back up the original file. After patching, run:

/usr/ports/textproc/libxml2/# make clean && make patch && make all
/usr/ports/textproc/libxml2/# make deinstall && make reinstall

The issue should then be resolved.


Apr 26 2009

Home Center, Student Chair

I'm SO buying this.

I'm SO buying this.


Jan 6 2009

Hellraiser, the Fruit Approach

Just got my EOS 40D the other day, improvised some shitty lighting: behold, Hellraiser!

Orange Hellraiser


Jan 5 2009

Gaza Conflict — The Motivator

War Motivator


Dec 15 2008

The Administrator’s Creed

This is my server.

There are many like it, but this one is MINE.

My server is my best friend. It is my life.

I must master it as I must master my life.

My server without me is useless. Without my server, I am useless.

I must maintain my server true.

I must secure better than my enemy who is trying to hack me.

My server and myself know that what counts in security is not the ports we close,
the logs of our daemons, nor the firewall rules we make.

We know it is the uptime that counts.

My server is human, even as I, because it is my life.

Thus, I will learn it as a brother.

I will learn its weaknesses, its strengths, its parts, its accessories,
its shell, and its uplink.

I will ever guard it against the ravages of spam and crackers.

I will keep my server clean and ready, even as I am clean and ready.

We will become part of each other. We will…

Before Theo I swear this creed.

My server and myself are the defenders of my department.

We are the masters of our enemy.

So be it, until there is no Windows, but UNIX.


Jun 24 2008

Border Guard Shoots Self During Sarkozy’s Departure Ceremony

Only in Israel can this happen — a Border Police (MAGAV) soldier fired a shot from his weapon, killing himself during the farewell ceremony held for Sarkozy.

WTF?

JPost article here.


May 10 2008

Destinator 7 240×240 Screen Fix

After writing the previous post I realized that I made some modifications to my Destinator copy that several people might be interested it.

Since the 6915 has a square screen instead of the usual 240×320 rectangular one found on many PDAs, a slight modification to the UI files must be done.

The file can be found here.

Simply copy it to your Destinator directory (under Skin/All) and you’re set.


May 10 2008

Eyron Hebrew Breaks GPS on WM5.0 (iPaq HW6915)

After almost 4 hours of endless tweaking, debugging and prodding of various hidden control panels in my iPaq 6915, I’ve come to a surprising conclusion: the Eyron-made Hebrew language support for Windows Mobile 5 seems to simply break the GPS software within it.

The symptoms I was encountering were extremely frustrating:

1. Start Destinator

2. Navigate to “Settings” then “GPS Settings”.

3. Watch the status title change from “GPS Device Connected” to “No GPS device found” in a viciously annoying cycle.

After a while, I’ve decided to simply perform a hard reset on my iPaq and reinstall everything piece by piece. Now, when you install Eyron Hebrew Support, it changes your UI language to full-blown Hebrew — menu items, input, etc. I usually set it to “English with Hebrew Support” so that I can read/write Hebrew content but still have a normal English UI.

Out of sheer curiousness, I started up Destinator — lo and behold “Valid GPS Signal”.

So, for some strange reason, if you set your interface language to “English with Hebrew Support”, no GPS for you. Otherwise, everything works as smoothly as possible.

Go figure.


Apr 24 2008

Storage Prices (HTPC Project)

After some research via Zap, I’ve arrived at this spreadsheet. It appears that getting 2 500GB drives will be the optimal choice with regard to price per TB. Even though the NIS/GB ratio is rather high, the final price is the lowest one.

Comments?