Bug 150126 - Vim profile script attempts write to /etc/passwd.
Summary: Vim profile script attempts write to /etc/passwd.
Alias: None
Product: Fedora
Classification: Fedora
Component: vim
Version: rawhide
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: David Lawrence
: 147650 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2005-03-02 19:44 UTC by Ivan Gyurdiev
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2005-03-14 12:47:07 UTC

Attachments (Terms of Use)

Description Ivan Gyurdiev 2005-03-02 19:44:12 UTC
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 05:47:21 UTC
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 05:48:54 UTC
*** Bug 147650 has been marked as a duplicate of this bug. ***

Comment 5 Karsten Hopp 2005-03-14 12:47:07 UTC
fixed in 6.3.064-1.

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