On Mon, Dec 01 2014, Michal Nazarewicz <m...@google.com> wrote: > From: Michal Nazarewicz <min...@mina86.com> > > Instead of storing password in MPD_HOST environment variable (which > is passed around everywhere) allow saving password in an ~/.authinfo > file. This is especially useful if MPD is listening on default > host:port, i.e. localhost:6600, in which case all one needs to do is > to put line like > machine localhost port 6600 password some-password > to make MPD clients use “some-password” when connecting to it.
> + char *pwd = NULL; > + for (i = 0; !pwd && i < sizeof filenames / sizeof *filenames; ++i) { > + strcpy(str, filenames[i]); > + FILE *fd = mpd_fopen(path); Doh. Just realised I forgot to include fd_util.h. Will fix in v4 with any other potential fixes that may come up. > + if (fd) { > + pwd = mpd_parse_authinfo(host, port, fd); > + fclose(fd); > + } > + } -- Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o ..o | Computer Science, Michał “mina86” Nazarewicz (o o) ooo +--<m...@google.com>--<xmpp:min...@jabber.org>--ooO--(_)--Ooo-- _______________________________________________ mpd-devel mailing list mpd-devel@musicpd.org http://mailman.blarg.de/listinfo/mpd-devel