Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 150126 - Vim profile script attempts write to /etc/passwd.
Vim profile script attempts write to /etc/passwd.
Product: Fedora
Classification: Fedora
Component: vim (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
David Lawrence
: 147650 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2005-03-02 14:44 EST by Ivan Gyurdiev
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-03-14 07:47:07 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 Ivan Gyurdiev 2005-03-02 14:44:12 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050227 Firefox/1.0.1 Fedora/1.0.1-2

Description of problem:
Why? It causes trouble with strict policy SElinux.

[ -w /etc/passwd ] && return
if [ -n "$BASH_VERSION" -o -n "$KSH_VERSION" -o -n "$ZSH_VERSION" ]; then
  # for bash, pdksh and zsh, only if no alias is already set
  alias vi >/dev/null 2>&1 || alias vi=vim

audit(1109738993.511:0): avc:  denied  { write } for  pid=2775 exe=/bin/bash name=passwd dev=dm-0 ino=669626 scontext=system_u:system_r:xdm_t tcontext=system_u:object_r:etc_t tclass=file

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

How reproducible:

Steps to Reproduce:
1. Install vim
2. Enable strict SELinux
3. Log into X 

Actual Results:  Passwd write denial 

Expected Results:  No passwd write denial.

Additional info:
Comment 1 Ivan Gyurdiev 2005-03-13 00:47:21 EST
Status? It's a simple bug to fix. 

1) If it needs to differentiate for root, it can use the id command

2) I don't see why it needs to differentiate for root

Comment 2 Ivan Gyurdiev 2005-03-13 00:48:54 EST
*** Bug 147650 has been marked as a duplicate of this bug. ***
Comment 5 Karsten Hopp 2005-03-14 07:47:07 EST
fixed in 6.3.064-1.

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