Your right, Tilmann ... and your approach will probably work. Another thing to look at might be rewriting ad_parse_ad_conn_file (renaming it, too?) to take an optional file parameter that overrides its use of ad_conn file.
Since you're digging into this I'll let you dig around a bit more and tell us which approach ends up looking cleaner. That's the bottom line IMO, let's keep it as kludge-free as we can.