Lines Matching +defs:command +defs:line
131 /* original command from peer. */
370 * This is called to fork and execute a command when we have no tty. This
375 do_exec_no_pty(struct ssh *ssh, Session *s, const char *command)
491 /* Do processing for the child (exec command etc). */
492 do_child(ssh, s, command);
527 * This is called to fork and execute a command when we have a tty. This
533 do_exec_pty(struct ssh *ssh, Session *s, const char *command)
598 do_login(ssh, s, command);
602 * the command.
604 do_child(ssh, s, command);
623 * This is called to fork and execute a command. If another command is
627 do_exec(struct ssh *ssh, Session *s, const char *command)
634 original_command = command;
635 command = options.adm_forced_command;
638 original_command = command;
639 command = auth_opts->force_command;
645 if (IS_INTERNAL_SFTP(command)) {
651 "forced-command %s '%.900s'", forced, command);
655 } else if (command == NULL) {
659 snprintf(session_type, sizeof(session_type), "command");
685 ret = do_exec_pty(ssh, s, command);
687 ret = do_exec_no_pty(ssh, s, command);
704 do_login(struct ssh *ssh, Session *s, const char *command)
723 if (check_quietlogin(s, command))
753 * Check for quiet login, either .hushlogin or command given.
756 check_quietlogin(Session *s, const char *command)
762 /* Return 1 if .hushlogin exists or a command given. */
763 if (command != NULL)
774 * Otherwise, it must consist of empty lines, comments (line starts with '#')
784 char *line = NULL, *cp, *value;
792 while (getline(&line, &linesize, f) != -1) {
795 for (cp = line; *cp == ' ' || *cp == '\t'; cp++)
804 fprintf(stderr, "Bad line %u in %.100s\n", lineno,
819 free(line);
1213 * ids, and executing the command or shell.
1217 do_child(struct ssh *ssh, Session *s, const char *command)
1332 args = xstrdup(command ? command : "sftp-server");
1351 * If we have no command, execute the shell. In this case, the shell
1355 if (!command) {
1378 * Execute the command using the user's shell. This uses the -c
1379 * option to execute the command.
1383 argv[2] = (char *) command;
1719 char *command = NULL;
1721 if ((r = sshpkt_get_cstring(ssh, &command, NULL)) != 0 ||
1725 channel_set_xtype(ssh, s->chanid, "session:command");
1727 success = do_exec(ssh, s, command) == 0;
1728 free(command);
1826 signame, s->forced ? "forced-command" : "subsystem");
1881 * a session is in LARVAL state until a shell, a command