Ticket #288 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

BASH_REMATCH variable not filtered from environment

Reported by: AstralStorm Owned by: ciaranm
Priority: MinorRelease Milestone:
Component: clients/paludis Version: 0.24.2
Keywords: Cc:
Blocked By: Blocking:
Distribution:

Description

Paludis doesn't filter variable BASH_REMATCH out. It can appear in environment if someone uses bash regexp matches, for instance in bashrc or ebuild.

Sample error (due to the use of matching in bashrc):

bunzip2 < /var/db/pkg/sys-apps/paludis-0.22.2/environment.bz2 > /mnt/store/build/environment-sys-apps-paludis-0.22.2-21569 ebuild_scrub_environment /mnt/store/build/environment-sys-apps-paludis-0.22.2-21569 /mnt/store/build/environment-sys-apps-paludis-0.22.2-21569: line 11: BASH_REMATCH: readonly variable

!!! ERROR in sys-apps/paludis-0.22.2: !!! In ebuild_load_environment at line 237 !!! Can't load saved environment for cleaning

Attachments

fix_bash_rematch_variable.diff Download (1.1 KB) - added by AstralStorm 6 years ago.
Patch to fix BASH_REMATCH variable handling
fix_bash_rematch_variable_2.diff Download (530 bytes) - added by AstralStorm 6 years ago.
Second patch to fix that variable

Change History

Changed 6 years ago by AstralStorm

Patch to fix BASH_REMATCH variable handling

Changed 6 years ago by AstralStorm

Second patch to fix that variable

comment:1 Changed 6 years ago by AstralStorm

Hmm, sorry for attaching the second part of the patch twice - I thought trac didn't get the second part of the patch. It just didn't display it in the diff view.

comment:2 Changed 6 years ago by ciaranm

  • Status changed from new to closed
  • Resolution set to fixed

r3155, thanks

Note: See TracTickets for help on using tickets.