Mercurial > dropbear
comparison svr-chansession.c @ 24:469950e86d0f
switching to global vars
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 20 Jul 2004 12:05:00 +0000 |
parents | f76c9389e9e0 |
children | f789045062e6 |
comparison
equal
deleted
inserted
replaced
23:c896a4dd65da | 24:469950e86d0f |
---|---|
34 #include "ssh.h" | 34 #include "ssh.h" |
35 #include "random.h" | 35 #include "random.h" |
36 #include "utmp.h" | 36 #include "utmp.h" |
37 #include "x11fwd.h" | 37 #include "x11fwd.h" |
38 #include "agentfwd.h" | 38 #include "agentfwd.h" |
39 #include "runopts.h" | |
39 | 40 |
40 /* Handles sessions (either shells or programs) requested by the client */ | 41 /* Handles sessions (either shells or programs) requested by the client */ |
41 | 42 |
42 static int sessioncommand(struct Channel *channel, struct ChanSess *chansess, | 43 static int sessioncommand(struct Channel *channel, struct ChanSess *chansess, |
43 int iscmd, int issubsys); | 44 int iscmd, int issubsys); |
688 login_free_entry(li); | 689 login_free_entry(li); |
689 | 690 |
690 m_free(chansess->tty); | 691 m_free(chansess->tty); |
691 | 692 |
692 #ifdef DO_MOTD | 693 #ifdef DO_MOTD |
693 if (ses.opts->domotd) { | 694 if (svr_opts.domotd) { |
694 /* don't show the motd if ~/.hushlogin exists */ | 695 /* don't show the motd if ~/.hushlogin exists */ |
695 | 696 |
696 /* 11 == strlen("/hushlogin\0") */ | 697 /* 11 == strlen("/hushlogin\0") */ |
697 len = strlen(svr_ses.authstate.pw->pw_dir) + 11; | 698 len = strlen(svr_ses.authstate.pw->pw_dir) + 11; |
698 | 699 |
774 char * usershell; | 775 char * usershell; |
775 char * baseshell; | 776 char * baseshell; |
776 unsigned int i; | 777 unsigned int i; |
777 | 778 |
778 /* wipe the hostkey */ | 779 /* wipe the hostkey */ |
779 sign_key_free(ses.opts->hostkey); | 780 sign_key_free(svr_opts.hostkey); |
780 ses.opts->hostkey = NULL; | 781 svr_opts.hostkey = NULL; |
781 | 782 |
782 /* overwrite the prng state */ | 783 /* overwrite the prng state */ |
783 seedrandom(); | 784 seedrandom(); |
784 | 785 |
785 /* close file descriptors except stdin/stdout/stderr | 786 /* close file descriptors except stdin/stdout/stderr |