Ticket #441 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: elvstone@gmail.com Assigned to: moo
Priority: normal Milestone: 1.4.9
Component: core Version: 1.4.x-svn
Severity: normal Keywords:
Cc: Blocking:
Need Feedback:

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.

Attachments

proc_open.c.diff (1.3 kB) - added by elvstone@gmail.com on 01/05/2006 04:01:15 PM.
Adds fallback to proc_open() if SHELL is not in env
proc_open.c.2.diff (1.0 kB) - added by elvstone@gmail.com on 01/05/2006 04:51:10 PM.
Better to use %WINDIR%\system32\cmd.exe than to hardcode the path

Change History

01/05/2006 04:01:15 PM changed by elvstone@gmail.com

  • attachment proc_open.c.diff added.

Adds fallback to proc_open() if SHELL is not in env

01/05/2006 04:50:28 PM changed by elvstone@gmail.com

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

01/05/2006 04:51:10 PM changed by elvstone@gmail.com

  • attachment proc_open.c.2.diff added.

Better to use %WINDIR%\system32\cmd.exe than to hardcode the path

03/28/2006 04:32:34 AM changed by moo

  • owner changed from jan to moo.
  • status changed from new to assigned.
  • milestone set to lighttpd-1.4.x.

03/28/2006 10:16:43 AM changed by moo

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

03/28/2006 10:34:59 AM changed by elvstone

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

03/30/2006 06:01:55 AM changed by moo

  • status changed from assigned to closed.
  • resolution set to fixed.

fixed in [1060]


Add/Change #441 ([PATCH] Fallback in proc_open() if SHELL not set in env)




Change Properties
Action