Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 2.1 product line. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 112385

Summary: VIM strips SUID bit on write (vim patch 6.0.235 needed)
Product: Red Hat Enterprise Linux 2.1 Reporter: Malcolm Heath <malcolm>
Component: vimAssignee: Karsten Hopp <karsten>
Status: CLOSED DEFERRED QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-01-13 09:28:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Malcolm Heath 2003-12-18 18:45:17 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1)
Gecko/20030225

Description of problem:
When editing a suid file with vim, the suid bit is lost when the file
is written.

This is fixed (I believe) by vim patch 6.0.235.  

This patch has been applied in vim versions greater than 6.0, so the
problem isn't evident in later versions of RedHat Enterprise Linux.



Version-Release number of selected component (if applicable):
vim-6.0-7.15

How reproducible:
Always

Steps to Reproduce:
1. create a SUID file
   touch foo
   chmod 4755 foo
2. edit the file with vi and cause the file to be written (i.e. :w)
3. ls -l foo shows permissions set to rwxr-xr-x
    

Expected Results:  file permissions should not be effected by the editor.

Additional info:

Comment 1 Karsten Hopp 2004-01-13 09:28:36 UTC
the suid bits on scripts are't used. Therefore I've added a patch to 
CVS to make sure this gets in when we release a erratum.