- Xauth fix from Markus Friedl <markus.friedl@informatik.uni-erlangen.de>
This commit is contained in:
parent
ef7df54073
commit
d999ae26b7
|
@ -1,3 +1,6 @@
|
||||||
|
20000520
|
||||||
|
- Xauth fix from Markus Friedl <markus.friedl@informatik.uni-erlangen.de>
|
||||||
|
|
||||||
20000518
|
20000518
|
||||||
- Include Andre Lucas' fixprogs script. Forgot to "cvs add" it yesterday
|
- Include Andre Lucas' fixprogs script. Forgot to "cvs add" it yesterday
|
||||||
- OpenBSD CVS updates:
|
- OpenBSD CVS updates:
|
||||||
|
|
13
session.c
13
session.c
|
@ -1035,13 +1035,20 @@ do_child(const char *command, struct passwd * pw, const char *term,
|
||||||
else {
|
else {
|
||||||
/* Add authority data to .Xauthority if appropriate. */
|
/* Add authority data to .Xauthority if appropriate. */
|
||||||
if (auth_proto != NULL && auth_data != NULL) {
|
if (auth_proto != NULL && auth_data != NULL) {
|
||||||
if (debug_flag)
|
char *screen = strchr(display, ':');
|
||||||
|
if (debug_flag) {
|
||||||
fprintf(stderr, "Running %.100s add %.100s %.100s %.100s\n",
|
fprintf(stderr, "Running %.100s add %.100s %.100s %.100s\n",
|
||||||
XAUTH_PATH, display, auth_proto, auth_data);
|
XAUTH_PATH, display, auth_proto, auth_data);
|
||||||
|
if (screen != NULL)
|
||||||
|
fprintf(stderr, "Adding %.*s/unix%s %s %s\n",
|
||||||
|
screen-display, display, screen, auth_proto, auth_data);
|
||||||
|
}
|
||||||
f = popen(XAUTH_PATH " -q -", "w");
|
f = popen(XAUTH_PATH " -q -", "w");
|
||||||
if (f) {
|
if (f) {
|
||||||
fprintf(f, "add %s %s %s\n", display, auth_proto, auth_data);
|
fprintf(f, "add %s %s %s\n", display, auth_proto, auth_data);
|
||||||
|
if (screen != NULL)
|
||||||
|
fprintf(f, "add %.*s/unix%s %s %s\n",
|
||||||
|
screen-display, display, screen, auth_proto, auth_data);
|
||||||
pclose(f);
|
pclose(f);
|
||||||
} else
|
} else
|
||||||
fprintf(stderr, "Could not run %s -q -\n", XAUTH_PATH);
|
fprintf(stderr, "Could not run %s -q -\n", XAUTH_PATH);
|
||||||
|
|
Loading…
Reference in New Issue