comparison svr-chansession.c @ 1460:58a74cb829b8

Pointer parameter could be declared as pointing to const (callback)
author Francois Perrad <francois.perrad@gadz.org>
date Sat, 19 Aug 2017 22:39:53 +0200
parents 06d52bcb8094
children 0c16b4ccbd54
comparison
equal deleted inserted replaced
1459:06d52bcb8094 1460:58a74cb829b8
45 static int sessionpty(struct ChanSess * chansess); 45 static int sessionpty(struct ChanSess * chansess);
46 static int sessionsignal(const struct ChanSess *chansess); 46 static int sessionsignal(const struct ChanSess *chansess);
47 static int noptycommand(struct Channel *channel, struct ChanSess *chansess); 47 static int noptycommand(struct Channel *channel, struct ChanSess *chansess);
48 static int ptycommand(struct Channel *channel, struct ChanSess *chansess); 48 static int ptycommand(struct Channel *channel, struct ChanSess *chansess);
49 static int sessionwinchange(const struct ChanSess *chansess); 49 static int sessionwinchange(const struct ChanSess *chansess);
50 static void execchild(void *user_data_chansess); 50 static void execchild(const void *user_data_chansess);
51 static void addchildpid(struct ChanSess *chansess, pid_t pid); 51 static void addchildpid(struct ChanSess *chansess, pid_t pid);
52 static void sesssigchild_handler(int val); 52 static void sesssigchild_handler(int val);
53 static void closechansess(struct Channel *channel); 53 static void closechansess(const struct Channel *channel);
54 static int newchansess(struct Channel *channel); 54 static int newchansess(struct Channel *channel);
55 static void chansessionrequest(struct Channel *channel); 55 static void chansessionrequest(struct Channel *channel);
56 static int sesscheckclose(const struct Channel *channel); 56 static int sesscheckclose(const struct Channel *channel);
57 57
58 static void send_exitsignalstatus(const struct Channel *channel); 58 static void send_exitsignalstatus(const struct Channel *channel);
279 svr_ses.remotehost, chansess->tty); 279 svr_ses.remotehost, chansess->tty);
280 return li; 280 return li;
281 } 281 }
282 282
283 /* clean a session channel */ 283 /* clean a session channel */
284 static void closechansess(struct Channel *channel) { 284 static void closechansess(const struct Channel *channel) {
285 285
286 struct ChanSess *chansess; 286 struct ChanSess *chansess;
287 unsigned int i; 287 unsigned int i;
288 struct logininfo *li; 288 struct logininfo *li;
289 289
896 896
897 } 897 }
898 898
899 /* Clean up, drop to user privileges, set up the environment and execute 899 /* Clean up, drop to user privileges, set up the environment and execute
900 * the command/shell. This function does not return. */ 900 * the command/shell. This function does not return. */
901 static void execchild(void *user_data) { 901 static void execchild(const void *user_data) {
902 struct ChanSess *chansess = user_data; 902 struct ChanSess *chansess = user_data;
903 char *usershell = NULL; 903 char *usershell = NULL;
904 904
905 /* with uClinux we'll have vfork()ed, so don't want to overwrite the 905 /* with uClinux we'll have vfork()ed, so don't want to overwrite the
906 * hostkey. can't think of a workaround to clear it */ 906 * hostkey. can't think of a workaround to clear it */