Skip to content

Commit

Permalink
server: Check SHELL only when neither --sh nor --csh is specified
Browse files Browse the repository at this point in the history
Previously C shell syntax is used for printing environment variable
setup even if --sh is given when SHELL is csh.

Reported in:
p11-glue#437

Signed-off-by: Daiki Ueno <ueno@gnu.org>
  • Loading branch information
ueno committed Nov 9, 2022
1 parent 8c917c0 commit f07dcd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p11-kit/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ main (int argc,
return 2;
}

if (!csh_opt) {
if (!opt_sh && !opt_csh) {
const char *shell = secure_getenv ("SHELL");
size_t len;
if (shell != NULL && (len = strlen (shell)) > 2 &&
Expand Down

0 comments on commit f07dcd3

Please sign in to comment.