Project

General

Profile

Bug #441

[PATCH] Fallback in proc_open() if SHELL not set in env

Added by Anonymous about 14 years ago. Updated over 13 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
core
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

Description

proc_open() fails if SHELL is not set in the environment. The attached patch creates a fallback to /bin/sh (Unix) or C:\WINNT\system32\cmd.exe (Windows) instead.

-- elvstone


Files

proc_open.c.diff (1.27 KB) proc_open.c.diff Adds fallback to proc_open() if SHELL is not in env -- elvstone Anonymous, 2006-01-05 16:01
proc_open.c.2.diff (1.04 KB) proc_open.c.2.diff Better to use %WINDIR%\system32\cmd.exe than to hardcode the path -- elvstone Anonymous, 2006-01-05 16:51
#1

Updated by Anonymous about 14 years ago

Better to fallback to WINDIR\system32\cmd.exe instead of a hardcoded path. Attaching a new patch. Thanks for the tip Robe. The patch is only tested on Unix since I don't have a Windows machine. Make sure to test before applying.

Best regards,
Aron

-- elvstone

#2

Updated by moo almost 14 years ago

  • Status changed from New to Assigned
#3

Updated by moo almost 14 years ago

"strcat(shell.." is, however buffer overflow, in the proc_open.c.2.diff patch, i'll write one myself.

#4

Updated by Anonymous almost 14 years ago

Oops, clumsy me. Anyway you get what I mean ;)

-- elvstone

#5

Updated by moo almost 14 years ago

  • Status changed from Assigned to Fixed
  • Resolution set to fixed

fixed in r1060

Also available in: Atom