Bug 1339106 - sh profile.d improvements: don't leak $ID, don't fail on nounset
Summary: sh profile.d improvements: don't leak $ID, don't fail on nounset
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: vim
Version: rawhide
Hardware: All
OS: All
unspecified
unspecified
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-24 07:37 UTC by Ville Skyttä
Modified: 2016-05-24 11:53 UTC (History)
3 users (show)

Fixed In Version: vim-7.4.1835-1.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-24 11:53:24 UTC
Type: ---


Attachments (Terms of Use)
sh profile.d improvements: don't leak $ID, don't fail on nounset (1.67 KB, patch)
2016-05-24 07:37 UTC, Ville Skyttä
no flags Details | Diff

Description Ville Skyttä 2016-05-24 07:37:33 UTC
Avoid errors if "set -u" (or "nounset") is in effect, don't leak $ID
in the environment, drop unnecessary test for /usr/bin/id.

'git am'able patch attached, let me know if you'd like me to push and
build this for devel.

Comment 1 Ville Skyttä 2016-05-24 07:37:37 UTC
Created attachment 1160902 [details]
sh profile.d improvements: don't leak $ID, don't fail on nounset

Comment 2 Ville Skyttä 2016-05-24 07:40:00 UTC
BTW I think it'd be cleaner to have vim.sh and vim.csh as separate scripts instead of being embedded in the specfile. Suppose the only reason for the embedding is the use of %{_bindir} in vim.sh which could be replaced by "hardcoded" /usr/bin/id. vim.csh already does that so there should be no reason to embed it. I can take care of this as well, just let me know.

Comment 3 Karsten Hopp 2016-05-24 09:42:48 UTC
You're right, thanks for noticing the ID leak. No harm done by that, but it's unnecessary. I'll push a new vim package soon with these fixes and move vim.sh and vim.csh into rpm source files.


Note You need to log in before you can comment on or make changes to this bug.