mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Make x11_get_auth_from_authfile take a Filename.
I think the only reason it currently takes a plain string is because its interesting caller (in unix/x11.c) has just constructed a string out of an environment variable, and it seemed like the path of least effort not to bother wrapping it into a proper Filename. But when Filename on Windows becomes more interesting, we'll need it to take the full version.
This commit is contained in:
@ -27,7 +27,7 @@ static void BinarySink_put_stringpl_xauth(BinarySink *bs, ptrlen pl)
|
||||
BinarySink_put_stringpl_xauth(BinarySink_UPCAST(bs),ptrlen)
|
||||
|
||||
void x11_get_auth_from_authfile(struct X11Display *disp,
|
||||
const char *authfilename)
|
||||
Filename *authfilename)
|
||||
{
|
||||
FILE *authfp;
|
||||
char *buf;
|
||||
@ -72,7 +72,7 @@ void x11_get_auth_from_authfile(struct X11Display *disp,
|
||||
*/
|
||||
bool localhost = !disp->unixdomain && sk_address_is_local(disp->addr);
|
||||
|
||||
authfp = fopen(authfilename, "rb");
|
||||
authfp = f_open(authfilename, "rb", false);
|
||||
if (!authfp)
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user