Project

General

Profile

Actions

Bug #441

closed

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

Added by Anonymous over 18 years ago. Updated over 17 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:

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
Actions #1

Updated by Anonymous over 18 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

Actions #2

Updated by moo about 18 years ago

  • Status changed from New to Assigned
Actions #3

Updated by moo about 18 years ago

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

Actions #4

Updated by Anonymous about 18 years ago

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

-- elvstone

Actions #5

Updated by moo about 18 years ago

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

fixed in r1060

Actions

Also available in: Atom