Bug 112385 - VIM strips SUID bit on write (vim patch 6.0.235 needed)
VIM strips SUID bit on write (vim patch 6.0.235 needed)
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: vim (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2003-12-18 13:45 EST by Malcolm Heath
Modified: 2007-11-30 17:06 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-01-13 04:28:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

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

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):

How reproducible:

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 04:28:36 EST
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.