coreos/go-systemd — pull request #39 by alexlarsson (2014-03-19 09:10:26+00:00)
Title: dbus: Hardcode EXTERNAL auth using the uid to avoid dynamic linking

The default mode of dbusConn.Auth(nil) is to use EXTERNAL and
DBUS_COOKIE_SHA1. This code calls user.Current() which gives this
warning when linking docker:

/var/tmp/go-link-mIsVGq/000005.o: In function `mygetpwuid_r':
/usr/local/go/src/pkg/os/user/lookup_unix.go:72: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/var/tmp/go-link-mIsVGq/000005.o: In function `_cgo_bc43c179ae62_Cfunc_mygetpwuid_r':
/usr/local/go/src/pkg/os/user/lookup_unix.go:27: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
Created binary: /go/src/github.com/dotcloud/docker/bundles/0.9.0-dev/binary/docker-0.9.0-dev

For the systemd we use EXTERNAL anyway, which only needs the uid, not
the username. So we set our own list of methods to avoid running
this code.