version: desktop | mobile

Dave's Free Press

the Slightly Less Bad And Wrong Blog Edition

 

Recent posts

Less important journals

Search




Subscribe

rss

Journals that link here

Powered by

Bryar 3.0!
geeky silly politics rant weird meta religion music transport drinking london perl culture olympics photography language cooking hacking web sport media rsnapshot holidays books spam film whisky bryar yapc palm telecoms review bastards cars travel maths etiquette clothes lolcats amazon curry security home unix phone go environment bbc latin anglo-saxon privacy linux gps deafness work
Wed, 11 Jun 2008

Per-user resolv.conf files

I want per-user resolv.conf files. I've mentioned this in a couple of places and got asked why. It's so that I can have a consistent set of aliases everywhere I go (so I can, eg, type ssh sdf instead of ssh sverige.freeshell.org) and also so that the resolver will fill in my choice of domain on the end of hostnames, so I can be lazy and type ssh plough instead of ssh plough.barnyard.co.uk.

Some quick googling didn't turn up anything usefully cross-platform, but the implementation shouldn't be too hard - just set LD_LIBRARY_PATH or LD_PRELOAD and provide my own resolver library. Unfortunately, the resolver is part of libc so I need to figure out how to:

  • persuade arbitrary binaries to load an extra library;
  • have that library effectively replace bits of libc ...
  • ... even when the functions I'm replacing are called by other functions in libc

Damn, I might have to read about how the linker actually works if I'm ever to do this.

Posted at 19:10:58 by David Cantrell
keywords: geeky | unix
Permalink | 2 Comments

Archive

2007

Jan Feb Mar Apr
May Jun Jul Aug
Sep Oct Nov Dec
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan

2006

Jan Feb Mar Apr
May Jun Jul Aug
Sep Oct Nov Dec
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan

2005

Jan Feb Mar Apr
May Jun Jul Aug
Sep Oct Nov Dec
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan