Bug 112385 - VIM strips SUID bit on write (vim patch 6.0.235 needed)
Summary: VIM strips SUID bit on write (vim patch 6.0.235 needed)
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: vim
Version: 2.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-12-18 18:45 UTC by Malcolm Heath
Modified: 2007-11-30 22:06 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-01-13 09:28:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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. 


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