Dunc's programming and sysadmin blog

I'm an experienced C and Perl programmer and systems administrator, interested in large scale ruthless automation of systems. These are random musings about stuff I'm doing or thinking about.

Practical Software Development Article 12: Another use of TEFEL - Go-style Interfaces in C

In August 2019, I wrote a new PSD article about my TEFEL: Tool-Enhanced Features for Existing Languages technique:

How to add Go-style Interfaces in C via Dynamic Linking and two TEFEL tools

Posted 49 weeks ago

Practical Software Development Article 11: TEFEL: Tool-Enhanced Features for Existing Languages

In July 2018, I wrote a new PSD article on a newish idea of mine called:

TEFEL: Tool-Enhanced Features for Existing Languages

Posted 49 weeks ago

PSD Article 10: Use Automation Wherever Possible - build tools to help you program

A few months ago, I wrote another Practical Software Development (PSD) article:
Use Automation Wherever Possible - build tools to help you program.

Posted 203 weeks ago

Gitlab and gitolite

I now maintain a Departmental Gitlab service, and have been working out how to archive “old” Gitlab projects, users and groups, preserving them on a readonly Gitolite system.  This has involved the excellent Gitlab API, also digging into the Gitlab Postgres database, and writing numerous Perl scripts to extract information from Gitlab, and convert Gitlab information (and repos) into Gitolite format.

Posted 203 weeks ago

httpoxy: building custom Apache2 packages

Just built and released a new version of Apache2 for use where I work (where we need to apply a few locally written patches to generalise suexec) in order to fix the httpoxy vulnerability.  Took the latest Ubuntu Apache2 source package with the httpoxy vulnerability fixed, and automatically applied our suexec patches to it, generating a local package.  Released it to a test webserver, checked that it worked and fixed the bug, then released it to 5 other Departmental webservers.  Good afternoon’s work.

Posted 211 weeks ago

My Perl course got cancelled

A while ago, the Perl course that I gave every January to second year undergrads got cancelled, because “Perl is not modern enough”.  Clearly someone’s not heard of the “Modern Perl” Renaissance!

Posted 212 weeks ago

Brexit ramifications

Sigh, so stupid that we’ve chosen Brexit, but sadly having asked a question of the British people, and received the answer, you can’t unask the question - or ignore it.  So now we’ll be leaving the EU.  New Prime Minister, new Cabinet, it’ll be interesting to see what happens in the next few months.

Posted 212 weeks ago

How to Crash ZFS on Linux: Glob Snapshots over NFS

Building an experimental online backup system on Linux, using rsync and ZFS snapshots to build a time machine like “past versions of your files”.  Sucks up 15TB of home directories and shared volumes, then exposes the readonly results over NFS.  ZFS on Linux has only just got the ability to share snapshots via NFS, and we’ve found that globbing across multiple snapshots over NFS reliably crashes the online backup fileserver (nfsd threads go into D state and the NFS client hangs, over time more and more nfsd threads go into D state).

To work around this snafu, I’ve built a tiny RESTful API web service that runs on the backup fileserver, receives a path such as ~dcw/blah or /vol/blurgh, discovers all distinct versions (in all snapshots) of that path by globbing across all snapshots locally on the server, and reports the distinct version paths via a JSON report. These things are sent to try us!  

Posted 246 weeks ago

Banning Strong Encryption: sign the petition against it

I’ve just signed the UK Government petition against Prime Minister David Cameron’s recently reported idea of banning strong encryption in order to “ensure that terrorists do not have a safe space in which to communicate.

While that sounds laudable, reading deeper into his idea there is a spectacularly naive implication behind the Prime Minister’s words that strong encryption may be rendered ineffective for bad people (like terrorists) without rendering it equally ineffective for the entire internet, allowing authoritarian governments to repress their citizens even more than they do at present, etc.

One example of a cryptography expert’s reaction to the UK PM’s proposals may be found here:

http://uk.businessinsider.com/bruce-schneier-david-cameron-proposed-encryption-ban-destroy-the-internet-2015-7 

Is this the latest incarnation of the perennial favourite of dumb politicians, the Evil Bit?  see https://en.wikipedia.org/wiki/Evil_bit

Posted 258 weeks ago

Shared Norms of C Programming: followup

Ok, I’ve created a draft article discussing this idea of individual or shared norms of C programming, not quite finished yet, but available here:

http://www.doc.ic.ac.uk/~dcw/PSD/article9/

Also I’ve started a LinkedIn discussion about this, good comments already coming in.  It’s still an open question whether each C programmer’s personal lists of safety tips can merge together in any useful sense to form a shared knowledge base.  Let’s see:-)

Posted 260 weeks ago