version 1.70, 2001/04/05 15:48:18 |
version 1.71, 2001/04/06 21:00:12 |
|
|
/* Setup to always have a local .Xauthority. */ |
/* Setup to always have a local .Xauthority. */ |
xauthfile = xmalloc(MAXPATHLEN); |
xauthfile = xmalloc(MAXPATHLEN); |
strlcpy(xauthfile, "/tmp/ssh-XXXXXXXX", MAXPATHLEN); |
strlcpy(xauthfile, "/tmp/ssh-XXXXXXXX", MAXPATHLEN); |
temporarily_use_uid(s->pw->pw_uid); |
temporarily_use_uid(s->pw); |
if (mkdtemp(xauthfile) == NULL) { |
if (mkdtemp(xauthfile) == NULL) { |
restore_uid(); |
restore_uid(); |
error("private X11 dir: mkdtemp %s failed: %s", |
error("private X11 dir: mkdtemp %s failed: %s", |
|
|
endgrent(); |
endgrent(); |
|
|
/* Permanently switch to the desired uid. */ |
/* Permanently switch to the desired uid. */ |
permanently_set_uid(pw->pw_uid); |
permanently_set_uid(pw); |
#endif |
#endif |
} |
} |
if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) |
if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) |
|
|
} |
} |
xauthfile = xmalloc(MAXPATHLEN); |
xauthfile = xmalloc(MAXPATHLEN); |
strlcpy(xauthfile, "/tmp/ssh-XXXXXXXX", MAXPATHLEN); |
strlcpy(xauthfile, "/tmp/ssh-XXXXXXXX", MAXPATHLEN); |
temporarily_use_uid(s->pw->pw_uid); |
temporarily_use_uid(s->pw); |
if (mkdtemp(xauthfile) == NULL) { |
if (mkdtemp(xauthfile) == NULL) { |
restore_uid(); |
restore_uid(); |
error("private X11 dir: mkdtemp %s failed: %s", |
error("private X11 dir: mkdtemp %s failed: %s", |