bugzilla-daemon at mindrot.org
2004-Aug-18 07:38 UTC
[Bug 915] [PATCH] Only copy basic Windows environment
http://bugzilla.mindrot.org/show_bug.cgi?id=915 Summary: [PATCH] Only copy basic Windows environment Product: Portable OpenSSH Version: -current Platform: ix86 OS/Version: Cygwin on NT/2k Status: NEW Severity: security Priority: P2 Component: sshd AssignedTo: openssh-bugs at mindrot.org ReportedBy: vinschen at redhat.com So far, the whole environment is copied over to child processes started from sshd when running under Cygwin. The attached patch restricts this to the basic environment created for all processes. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2004-Aug-18 07:39 UTC
[Bug 915] [PATCH] Only copy basic Windows environment
http://bugzilla.mindrot.org/show_bug.cgi?id=915 ------- Additional Comments From vinschen at redhat.com 2004-08-18 17:39 ------- Created an attachment (id=698) --> (http://bugzilla.mindrot.org/attachment.cgi?id=698&action=view) The patch copies only the basic Windows environment over to child processes ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2004-Aug-28 13:11 UTC
[Bug 915] [PATCH] Only copy basic Windows environment
http://bugzilla.mindrot.org/show_bug.cgi?id=915 dtucker at zip.com.au changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #698| |ok Status| | ------- Additional Comments From dtucker at zip.com.au 2004-08-28 23:11 ------- (From update of attachment 698) Looks OK to me. A few minor comments: [...]>+ p[idx] = NULL; >+ for (e = environ; *e; ++e) {style guide says to explicitly test against NULL, ie "*e != NULL">+ for (i = 0; i < WENV_SIZ; ++i) { >+ if (!strncmp(*e, wenv_arr[i].name, >+ wenv_arr[i].namelen)) { >+ p[idx] = *e; >+ p[++idx] = NULL;You could make that "p[idx++] = *e", move "p[idx] = NULL" from above the loop to below and delete "p[++idx] = NULL" from the loop. It would be nice if the array didn't need to be structs but that would mean a bit of run-time overhead and I don't think it would be any clearer anyway... ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2004-Aug-28 15:00 UTC
[Bug 915] [PATCH] Only copy basic Windows environment
http://bugzilla.mindrot.org/show_bug.cgi?id=915 ------- Additional Comments From vinschen at redhat.com 2004-08-29 00:59 ------- Created an attachment (id=706) --> (http://bugzilla.mindrot.org/attachment.cgi?id=706&action=view) Modified patch with Darren's suggestions ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2004-Aug-28 15:01 UTC
[Bug 915] [PATCH] Only copy basic Windows environment
http://bugzilla.mindrot.org/show_bug.cgi?id=915 vinschen at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #698 is|0 |1 obsolete| | ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2004-Aug-30 10:44 UTC
[Bug 915] [PATCH] Only copy basic Windows environment
http://bugzilla.mindrot.org/show_bug.cgi?id=915 dtucker at zip.com.au changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Additional Comments From dtucker at zip.com.au 2004-08-30 20:44 ------- Patch #706 applied, thanks. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
Maybe Matching Threads
- [PATCH/cygwin] reduce number of propagated environment variables
- xmalloc(foo*bar) -> xcalloc(foo, bar) for Portable
- [PATCH]: auth.c (pwcopy): Copy pw_gecos field when build for Cygwin
- Problem with ssh-copy-id when home folder contains spaces
- [PATCH] Cygwin: Change service name to cygsshd