Move tmp-file creation to create_and_write_cookie.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3877 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1997-11-09 11:14:28 +00:00
parent c99460c09c
commit 496e2c0ec8
2 changed files with 4 additions and 5 deletions

View File

@@ -424,8 +424,7 @@ doit_active (char *host, char *user,
snprintf (display, display_size, "localhost:%u", display_num);
else
snprintf (display, display_size, ":%u", display_num);
strncpy(xauthfile, tempnam("/tmp", NULL), xauthfile_size);
if (create_and_write_cookie (xauthfile, cookie, cookie_len))
if (create_and_write_cookie (xauthfile, xauthfile_size, cookie, cookie_len))
return 1;
status_output (debugpp);
for (;;) {

View File

@@ -364,9 +364,9 @@ doit(int sock, int tcpp)
snprintf (display, display_size, "localhost:%u", display_num);
else
snprintf (display, display_size, ":%u", display_num);
strncpy(xauthfile, tempnam("/tmp", NULL), xauthfile_size);
if(create_and_write_cookie (xauthfile, cookie, cookie_len))
return 1;
if(create_and_write_cookie (xauthfile, xauthfile_size,
cookie, cookie_len))
return 1;
p = msg;
*p++ = ACK;