Diff

Differences From Artifact [41efe26087]:

To Artifact [d13d65ff1c]:


16
17
18
19
20
21
22
23

24
25
26
27
28
29
30
16
17
18
19
20
21
22

23
24
25
26
27
28
29
30







-
+







#endif

#define logevent(s) { logevent(s); \
                      if ((flags & FLAG_STDERR) && (flags & FLAG_VERBOSE)) \
                      fprintf(stderr, "%s\n", s); }

#define bombout(msg) ( ssh_state = SSH_STATE_CLOSED, \
                          (s ? sk_close(s), s = NULL : (void)0), \
                          (s ? sk_close(s), s = NULL : 0), \
                          connection_fatal msg )

#define SSH1_MSG_DISCONNECT                       1    /* 0x1 */
#define SSH1_SMSG_PUBLIC_KEY                      2    /* 0x2 */
#define SSH1_CMSG_SESSION_KEY                     3    /* 0x3 */
#define SSH1_CMSG_USER                            4    /* 0x4 */
#define SSH1_CMSG_AUTH_RSA                        6    /* 0x6 */
2854
2855
2856
2857
2858
2859
2860




2861

2862
2863
2864
2865
2866
2867
2868
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864

2865
2866
2867
2868
2869
2870
2871
2872







+
+
+
+
-
+







    }

    /*
     * Start a shell or a remote command.
     */
    ssh2_pkt_init(SSH2_MSG_CHANNEL_REQUEST);
    ssh2_pkt_adduint32(mainchan->remoteid); /* recipient channel */
    if (cfg.ssh_subsys) {
        ssh2_pkt_addstring("subsystem");
        ssh2_pkt_addbool(1);           /* want reply */
        ssh2_pkt_addstring(cfg.remote_cmd);
    if (*cfg.remote_cmd) {
    } else if (*cfg.remote_cmd) {
        ssh2_pkt_addstring("exec");
        ssh2_pkt_addbool(1);           /* want reply */
        ssh2_pkt_addstring(cfg.remote_cmd);
    } else {
        ssh2_pkt_addstring("shell");
        ssh2_pkt_addbool(1);           /* want reply */
    }