bin/ksh/c_sh.c
465
rv = shell(s, false);
bin/ksh/exec.c
708
char *shell;
bin/ksh/exec.c
710
shell = str_val(global("EXECSHELL"));
bin/ksh/exec.c
711
if (shell && *shell)
bin/ksh/exec.c
712
shell = search(shell, search_path, X_OK, NULL);
bin/ksh/exec.c
713
if (!shell || !*shell)
bin/ksh/exec.c
714
shell = _PATH_BSHELL;
bin/ksh/exec.c
717
*tp->args = shell;
bin/ksh/exec.c
722
errorf("%s: %s: %s", tp->str, shell, strerror(errno));
bin/ksh/main.c
452
shell(s, true); /* doesn't return */
bin/ksh/main.c
526
i = shell(s, false);
bin/ksh/main.c
547
return shell(s, false);
bin/ksh/sh.h
524
int shell(Source *volatile, int volatile);
distrib/special/more/more.c
131
char *shell; /* The name of the shell to use */
distrib/special/more/more.c
1413
if ((shell = getenv("SHELL")) == NULL)
distrib/special/more/more.c
1414
shell = _PATH_BSHELL;
libexec/ftpd/ftpd.c
676
char *cp, *shell, *style, *host;
libexec/ftpd/ftpd.c
733
shell = _PATH_BSHELL;
libexec/ftpd/ftpd.c
737
shell = pw->pw_shell;
libexec/ftpd/ftpd.c
739
if (strcmp(cp, shell) == 0)
libexec/ftpd/ftpd.c
741
shell = cp;
libexec/ftpd/ftpd.c
789
if ((!shell && !dochroot) || checkuser(_PATH_FTPUSERS, name)) {
sbin/init/init.c
494
char shell[PATH_MAX]; /* Allocate space here */
sbin/init/init.c
507
strlcpy(shell, _PATH_BSHELL, sizeof shell);
sbin/init/init.c
571
strlcpy(shell, altshell, sizeof shell);
sbin/init/init.c
599
execv(shell, argv);
sbin/init/init.c
600
emergency("can't exec %s for single user: %m", shell);
usr.bin/apply/apply.c
200
static const char *name, *shell;
usr.bin/apply/apply.c
206
if (shell == NULL) {
usr.bin/apply/apply.c
207
if ((shell = getenv("SHELL")) == NULL)
usr.bin/apply/apply.c
208
shell = _PATH_BSHELL;
usr.bin/apply/apply.c
209
if ((name = strrchr(shell, '/')) == NULL)
usr.bin/apply/apply.c
210
name = shell;
usr.bin/apply/apply.c
225
execl(shell, name, "-c", command, (char *)NULL);
usr.bin/apply/apply.c
226
err(1, "%s", shell);
usr.bin/at/at.c
187
char *mailname, *shell;
usr.bin/at/at.c
246
if ((shell = getenv("SHELL")) == NULL || *shell == '\0') {
usr.bin/at/at.c
249
shell = pass_entry->pw_shell;
usr.bin/at/at.c
251
shell = _PATH_BSHELL;
usr.bin/at/at.c
338
fprintf(fp, "%s << '_END_OF_AT_JOB'\n", shell);
usr.bin/at/at.c
365
(void)fprintf(stderr, "commands will be executed using %s\n", shell);
usr.bin/finger/finger.h
59
char *shell; /* user's shell */
usr.bin/finger/lprint.c
89
(void)printf("\tShell: %-s\n", *pn->shell ? pn->shell : _PATH_BSHELL);
usr.bin/finger/util.c
99
pn->shell = estrdup(pw->pw_shell);
usr.bin/ftp/cmds.h
50
void shell(int, char **);
usr.bin/ftp/cmdtab.c
125
{ "!", H(shellhelp), 0, 0, 0, CMPL0 shell },
usr.bin/less/lsystem.c
35
char *shell;
usr.bin/less/lsystem.c
87
if ((shell = lgetenv("SHELL")) != NULL && *shell != '\0') {
usr.bin/less/lsystem.c
89
p = estrdup(shell);
usr.bin/less/lsystem.c
93
p = easprintf("%s -c %s", shell, esccmd);
usr.bin/login/login.c
141
char *domain, *p, *ttyn, *shell, *fullname, *instance;
usr.bin/login/login.c
341
shell = strrchr(script, '/') + 1;
usr.bin/login/login.c
344
auth_call(as, script, shell, "-f", "--", username,
usr.bin/login/login.c
347
auth_call(as, script, shell, "--", username,
usr.bin/login/login.c
556
shell = login_getcapstr(lc, "shell", pwd->pw_shell, pwd->pw_shell);
usr.bin/login/login.c
557
if (*shell == '\0')
usr.bin/login/login.c
558
shell = _PATH_BSHELL;
usr.bin/login/login.c
559
else if (strlen(shell) >= PATH_MAX) {
usr.bin/login/login.c
560
syslog(LOG_ERR, "shell path too long: %s", shell);
usr.bin/login/login.c
702
(void)strlcpy(tbuf + 1, (p = strrchr(shell, '/')) ?
usr.bin/login/login.c
703
p + 1 : shell, sizeof(tbuf) - 1);
usr.bin/login/login.c
746
execlp(shell, tbuf, (char *)NULL);
usr.bin/login/login.c
747
err(1, "%s", shell);
usr.bin/mail/cmd3.c
51
char *shell;
usr.bin/mail/cmd3.c
60
shell = value("SHELL");
usr.bin/mail/cmd3.c
61
(void)run_command(shell, 0, 0, -1, "-c", cmd, NULL);
usr.bin/mail/cmd3.c
74
char *shell;
usr.bin/mail/cmd3.c
78
shell = value("SHELL");
usr.bin/mail/cmd3.c
80
(void)run_command(shell, 0, 0, -1, NULL, NULL, NULL);
usr.bin/mail/cmdtab.c
71
{ "!", { shell }, I|STRLIST, 0, 0 },
usr.bin/mail/collect.c
178
shell(&linebuf[2]);
usr.bin/mail/collect.c
461
char *shell, tempname[PATHSIZE];
usr.bin/mail/collect.c
478
shell = value("SHELL");
usr.bin/mail/collect.c
479
if (run_command(shell,
usr.bin/mail/extern.h
226
int shell(void *);
usr.bin/mail/lex.c
308
shell(cp+1);
usr.bin/mail/names.c
273
char *shell;
usr.bin/mail/names.c
283
shell = value("SHELL");
usr.bin/mail/names.c
288
pid = start_command(shell, &nset,
usr.bin/script/script.c
310
char *shell;
usr.bin/script/script.c
313
shell = getenv("SHELL");
usr.bin/script/script.c
314
if (shell == NULL)
usr.bin/script/script.c
315
shell = _PATH_BSHELL;
usr.bin/script/script.c
326
execl(shell, shell, "-i", (char *)NULL);
usr.bin/script/script.c
327
warn("%s", shell);
usr.bin/ssh/auth.c
102
char *shell = xstrdup((pw->pw_shell[0] == '\0') ?
usr.bin/ssh/auth.c
105
if (stat(shell, &st) == -1) {
usr.bin/ssh/auth.c
107
"does not exist", pw->pw_name, shell);
usr.bin/ssh/auth.c
108
free(shell);
usr.bin/ssh/auth.c
114
"is not executable", pw->pw_name, shell);
usr.bin/ssh/auth.c
115
free(shell);
usr.bin/ssh/auth.c
118
free(shell);
usr.bin/ssh/readconf.c
523
char *shell;
usr.bin/ssh/readconf.c
527
if ((shell = getenv("SHELL")) == NULL)
usr.bin/ssh/readconf.c
528
shell = _PATH_BSHELL;
usr.bin/ssh/readconf.c
530
if (access(shell, X_OK) == -1) {
usr.bin/ssh/readconf.c
532
shell, strerror(errno));
usr.bin/ssh/readconf.c
545
argv[0] = shell;
usr.bin/ssh/session.c
1192
const char *shell, *shell0;
usr.bin/ssh/session.c
1220
shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell;
usr.bin/ssh/session.c
1226
env = do_setup_env(ssh, s, shell);
usr.bin/ssh/session.c
1228
shell = login_getcapstr(lc, "shell", (char *)shell, (char *)shell);
usr.bin/ssh/session.c
1286
do_rc_files(ssh, s, shell);
usr.bin/ssh/session.c
1316
if ((shell0 = strrchr(shell, '/')) != NULL)
usr.bin/ssh/session.c
1319
shell0 = shell;
usr.bin/ssh/session.c
1335
perror(shell);
usr.bin/ssh/session.c
1342
execve(shell, argv, env);
usr.bin/ssh/session.c
1345
perror(shell);
usr.bin/ssh/session.c
1356
execve(shell, argv, env);
usr.bin/ssh/session.c
1357
perror(shell);
usr.bin/ssh/session.c
791
do_setup_env(struct ssh *ssh, Session *s, const char *shell)
usr.bin/ssh/session.c
827
child_set_env(&env, &envsize, "SHELL", shell);
usr.bin/ssh/session.c
924
do_rc_files(struct ssh *ssh, Session *s, const char *shell)
usr.bin/ssh/session.c
939
if (xasprintf(&cmd, "%s -c '%s %s'", shell, _PATH_BSHELL,
usr.bin/ssh/sftp.c
306
char *shell;
usr.bin/ssh/sftp.c
312
if ((shell = getenv("SHELL")) == NULL || *shell == '\0')
usr.bin/ssh/sftp.c
313
shell = _PATH_BSHELL;
usr.bin/ssh/sftp.c
321
debug3("Executing %s -c \"%s\"", shell, args);
usr.bin/ssh/sftp.c
322
execl(shell, shell, "-c", args, (char *)NULL);
usr.bin/ssh/sftp.c
324
debug3("Executing %s", shell);
usr.bin/ssh/sftp.c
325
execl(shell, shell, (char *)NULL);
usr.bin/ssh/sftp.c
327
fprintf(stderr, "Couldn't execute \"%s\": %s\n", shell,
usr.bin/ssh/ssh-agent.c
2232
char *homedir = NULL, *shell, *format, *pidstr, *agentsocket = NULL;
usr.bin/ssh/ssh-agent.c
2343
shell = getenv("SHELL");
usr.bin/ssh/ssh-agent.c
2344
if (shell != NULL && (len = strlen(shell)) > 2 &&
usr.bin/ssh/ssh-agent.c
2345
strncmp(shell + len - 3, "csh", 3) == 0)
usr.bin/ssh/sshconnect.c
103
char *shell;
usr.bin/ssh/sshconnect.c
105
if ((shell = getenv("SHELL")) == NULL)
usr.bin/ssh/sshconnect.c
106
shell = _PATH_BSHELL;
usr.bin/ssh/sshconnect.c
141
argv[0] = shell;
usr.bin/ssh/sshconnect.c
1669
char *shell;
usr.bin/ssh/sshconnect.c
1678
if ((shell = getenv("SHELL")) == NULL || *shell == '\0')
usr.bin/ssh/sshconnect.c
1679
shell = _PATH_BSHELL;
usr.bin/ssh/sshconnect.c
1685
debug3("Executing %s -c \"%s\"", shell, args);
usr.bin/ssh/sshconnect.c
1686
execl(shell, shell, "-c", args, (char *)NULL);
usr.bin/ssh/sshconnect.c
1688
shell, args, strerror(errno));
usr.bin/ssh/sshconnect.c
185
char *shell;
usr.bin/ssh/sshconnect.c
187
if ((shell = getenv("SHELL")) == NULL || *shell == '\0')
usr.bin/ssh/sshconnect.c
188
shell = _PATH_BSHELL;
usr.bin/ssh/sshconnect.c
224
argv[0] = shell;
usr.bin/su/su.c
113
shell = optarg;
usr.bin/su/su.c
155
if ((shell = strdup(pwd->pw_shell)) == NULL)
usr.bin/su/su.c
158
shell = _PATH_BSHELL;
usr.bin/su/su.c
246
if ((shell = strdup(pwd->pw_shell)) == NULL)
usr.bin/su/su.c
250
shell = _PATH_BSHELL;
usr.bin/su/su.c
255
if (unveil(shell, "x") == -1)
usr.bin/su/su.c
256
err(1, "unveil %s", shell);
usr.bin/su/su.c
260
if ((p = strrchr(shell, '/')))
usr.bin/su/su.c
263
avshell = shell;
usr.bin/su/su.c
308
setenv("SHELL", shell, 1) == -1)
usr.bin/su/su.c
311
if (setenv("SHELL", shell, 1) == -1)
usr.bin/su/su.c
373
execv(shell, np);
usr.bin/su/su.c
374
err(1, "%s", shell);
usr.bin/su/su.c
65
char *user, *shell = NULL, *avshell, *username, **np;
usr.bin/tmux/client.c
492
client_exec(const char *shell, const char *shellcmd)
usr.bin/tmux/client.c
496
log_debug("shell %s, command %s", shell, shellcmd);
usr.bin/tmux/client.c
497
argv0 = shell_argv0(shell, !!(client_flags & CLIENT_LOGIN));
usr.bin/tmux/client.c
498
setenv("SHELL", shell, 1);
usr.bin/tmux/client.c
507
execl(shell, argv0, "-c", shellcmd, (char *) NULL);
usr.bin/tmux/cmd-display-menu.c
395
const char *value, *shell, *shellcmd = NULL;
usr.bin/tmux/cmd-display-menu.c
456
shell = options_get_string(s->options, "default-shell");
usr.bin/tmux/cmd-display-menu.c
457
if (!checkshell(shell))
usr.bin/tmux/cmd-display-menu.c
458
shell = _PATH_BSHELL;
usr.bin/tmux/cmd-display-menu.c
459
cmd_append_argv(&argc, &argv, shell);
usr.bin/tmux/format.c
869
if (wp == NULL || wp->shell == NULL)
usr.bin/tmux/format.c
878
cmd = xstrdup(wp->shell);
usr.bin/tmux/job.c
105
shell = options_get_string(oo, "default-shell");
usr.bin/tmux/job.c
106
if (!checkshell(shell))
usr.bin/tmux/job.c
107
shell = _PATH_BSHELL;
usr.bin/tmux/job.c
109
argv0 = shell_argv0(shell, 0);
usr.bin/tmux/job.c
127
cwd == NULL ? "" : cwd, shell);
usr.bin/tmux/job.c
130
cwd == NULL ? "" : cwd, shell);
usr.bin/tmux/job.c
186
setenv("SHELL", shell, 1);
usr.bin/tmux/job.c
187
execl(shell, argv0, "-c", cmd, (char *)NULL);
usr.bin/tmux/job.c
83
const char *home, *shell;
usr.bin/tmux/job.c
99
shell = _PATH_BSHELL;
usr.bin/tmux/names.c
118
s = parse_window_name(w->active->shell);
usr.bin/tmux/popup.c
415
const char *shell;
usr.bin/tmux/popup.c
438
shell = options_get_string(s->options, "default-shell");
usr.bin/tmux/popup.c
439
if (!checkshell(shell))
usr.bin/tmux/popup.c
440
shell = _PATH_BSHELL;
usr.bin/tmux/popup.c
441
new_wp->shell = xstrdup(shell);
usr.bin/tmux/server-client.c
2500
const char *shell;
usr.bin/tmux/server-client.c
2502
shell = options_get_string(global_s_options, "default-shell");
usr.bin/tmux/server-client.c
2503
if (!checkshell(shell))
usr.bin/tmux/server-client.c
2504
shell = _PATH_BSHELL;
usr.bin/tmux/server-client.c
2505
proc_send(c->peer, MSG_SHELL, -1, shell, strlen(shell) + 1);
usr.bin/tmux/server-client.c
581
const char *shell;
usr.bin/tmux/server-client.c
589
shell = options_get_string(s->options, "default-shell");
usr.bin/tmux/server-client.c
591
shell = options_get_string(global_s_options, "default-shell");
usr.bin/tmux/server-client.c
592
if (!checkshell(shell))
usr.bin/tmux/server-client.c
593
shell = _PATH_BSHELL;
usr.bin/tmux/server-client.c
594
shellsize = strlen(shell) + 1;
usr.bin/tmux/server-client.c
598
memcpy(msg + cmdsize, shell, shellsize);
usr.bin/tmux/spawn.c
338
free(new_wp->shell);
usr.bin/tmux/spawn.c
339
new_wp->shell = xstrdup(tmp);
usr.bin/tmux/spawn.c
341
environ_set(child, "SHELL", 0, "%s", new_wp->shell);
usr.bin/tmux/spawn.c
344
log_debug("%s: shell=%s", __func__, new_wp->shell);
usr.bin/tmux/spawn.c
453
cp = strrchr(new_wp->shell, '/');
usr.bin/tmux/spawn.c
459
xasprintf(&argv0, "%s", new_wp->shell);
usr.bin/tmux/spawn.c
460
execl(new_wp->shell, argv0, "-c", tmp, (char *)NULL);
usr.bin/tmux/spawn.c
466
xasprintf(&argv0, "-%s", new_wp->shell);
usr.bin/tmux/spawn.c
467
execl(new_wp->shell, argv0, (char *)NULL);
usr.bin/tmux/tmux.c
100
if ((ptr = strrchr(shell, '/')) != NULL)
usr.bin/tmux/tmux.c
103
ptr = shell;
usr.bin/tmux/tmux.c
243
shell_argv0(const char *shell, int is_login)
usr.bin/tmux/tmux.c
248
slash = strrchr(shell, '/');
usr.bin/tmux/tmux.c
252
name = shell;
usr.bin/tmux/tmux.c
70
const char *shell;
usr.bin/tmux/tmux.c
72
shell = getenv("SHELL");
usr.bin/tmux/tmux.c
73
if (checkshell(shell))
usr.bin/tmux/tmux.c
74
return (shell);
usr.bin/tmux/tmux.c
84
checkshell(const char *shell)
usr.bin/tmux/tmux.c
86
if (shell == NULL || *shell != '/')
usr.bin/tmux/tmux.c
88
if (areshell(shell))
usr.bin/tmux/tmux.c
90
if (access(shell, X_OK) != 0)
usr.bin/tmux/tmux.c
96
areshell(const char *shell)
usr.bin/tmux/tmux.h
1238
char *shell;
usr.bin/tmux/window.c
1036
free(wp->shell);
usr.sbin/authpf/authpf.c
144
shell = login_getcapstr(lc, "shell", pw->pw_shell,
usr.sbin/authpf/authpf.c
147
shell = pw->pw_shell;
usr.sbin/authpf/authpf.c
151
if (strcmp(shell, PATH_AUTHPF_SHELL) &&
usr.sbin/authpf/authpf.c
152
strcmp(shell, PATH_AUTHPF_SHELL_NOIP)) {
usr.sbin/authpf/authpf.c
155
if (shell != pw->pw_shell)
usr.sbin/authpf/authpf.c
156
free(shell);
usr.sbin/authpf/authpf.c
160
if (shell != pw->pw_shell)
usr.sbin/authpf/authpf.c
161
free(shell);
usr.sbin/authpf/authpf.c
91
char *shell;
usr.sbin/chroot/chroot.c
133
if ((shell = getenv("SHELL")) == NULL || *shell == '\0')
usr.sbin/chroot/chroot.c
134
shell = _PATH_BSHELL;
usr.sbin/chroot/chroot.c
135
execlp(shell, shell, "-i", (char *)NULL);
usr.sbin/chroot/chroot.c
136
err(1, "%s", shell);
usr.sbin/chroot/chroot.c
55
const char *shell;
usr.sbin/cron/do_command.c
257
char *shell = env_get("SHELL", e->envp);
usr.sbin/cron/do_command.c
259
execle(shell, shell, "-c", e->cmd, (char *)NULL, e->envp);
usr.sbin/cron/do_command.c
260
warn("unable to execute %s", shell);
usr.sbin/cron/do_command.c
262
e->pwd->pw_name, shell);