version 1.79, 2001/06/03 14:55:39 |
version 1.80, 2001/06/04 21:59:43 |
|
|
void do_child(Session *s, const char *command); |
void do_child(Session *s, const char *command); |
void do_motd(void); |
void do_motd(void); |
int check_quietlogin(Session *s, const char *command); |
int check_quietlogin(Session *s, const char *command); |
void xauthfile_cleanup_proc(void *ignore); |
void xauthfile_cleanup_proc(void *pw); |
|
|
void do_authenticated1(Authctxt *authctxt); |
void do_authenticated1(Authctxt *authctxt); |
void do_authenticated2(Authctxt *authctxt); |
void do_authenticated2(Authctxt *authctxt); |
|
|
|
|
/* remote user's local Xauthority file and agent socket */ |
/* remote user's local Xauthority file and agent socket */ |
if (xauthfile) |
if (xauthfile) |
xauthfile_cleanup_proc(NULL); |
xauthfile_cleanup_proc(authctxt->pw); |
if (auth_get_socket_name()) |
if (auth_get_socket_name()) |
auth_sock_cleanup_proc(NULL); |
auth_sock_cleanup_proc(authctxt->pw); |
} |
} |
|
|
/* |
/* |
* Remove local Xauthority file. |
* Remove local Xauthority file. |
*/ |
*/ |
void |
void |
xauthfile_cleanup_proc(void *ignore) |
xauthfile_cleanup_proc(void *_pw) |
{ |
{ |
debug("xauthfile_cleanup_proc called"); |
struct passwd *pw = _pw; |
|
char *p; |
|
|
|
debug("xauthfile_cleanup_proc called"); |
if (xauthfile != NULL) { |
if (xauthfile != NULL) { |
char *p; |
temporarily_use_uid(pw); |
unlink(xauthfile); |
unlink(xauthfile); |
p = strrchr(xauthfile, '/'); |
p = strrchr(xauthfile, '/'); |
if (p != NULL) { |
if (p != NULL) { |
|
|
} |
} |
xfree(xauthfile); |
xfree(xauthfile); |
xauthfile = NULL; |
xauthfile = NULL; |
|
restore_uid(); |
} |
} |
} |
} |
|
|
|
|
if (fd >= 0) |
if (fd >= 0) |
close(fd); |
close(fd); |
restore_uid(); |
restore_uid(); |
fatal_add_cleanup(xauthfile_cleanup_proc, NULL); |
fatal_add_cleanup(xauthfile_cleanup_proc, s->pw); |
success = 1; |
success = 1; |
break; |
break; |
|
|
|
|
if (fd >= 0) |
if (fd >= 0) |
close(fd); |
close(fd); |
restore_uid(); |
restore_uid(); |
fatal_add_cleanup(xauthfile_cleanup_proc, s); |
fatal_add_cleanup(xauthfile_cleanup_proc, s->pw); |
return 1; |
return 1; |
} |
} |
|
|