Bug 848929 - groupadd fails to rename group file across filesystem boundary
Summary: groupadd fails to rename group file across filesystem boundary
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: shadow-utils
Version: 16
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-16 20:39 UTC by Michael Dale Long
Modified: 2012-08-17 06:47 UTC (History)
2 users (show)

Fixed In Version:
Clone Of: 702172
Environment:
Last Closed: 2012-08-17 06:47:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael Dale Long 2012-08-16 20:39:47 UTC
I was able to reproduce this bug in Fedora 16 with current updates (as of this writing).



+++ This bug was initially created as a clone of Bug #702172 +++

Description of problem:

Attempting to add a group fails because the call to rename /etc/group+ to /path/on/other/fs/group fails.


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

shadow-utils-4.1.4.2-11.fc14.x86_64


How reproducible:

100%

Steps to Reproduce:
1.  Move /etc/group to another filesystem (e.g. /mnt/group).
2.  Symlink /etc/group to /mnt/group
3.  Attempt to add a group with 'groupadd test'
  
Actual results:

Groupadd fails to add a group:
"groupadd: failure while writing changes to /etc/group"

Expected results:

Groupadd should add the group successfully.

Additional info:

From strace output, it appears that the call to rename('/etc/group+', '/mnt/etc/group') is the failure point.  A possible solution would be to ensure group+ is created in the same directory as group.

--- Additional comment from nikarul on 2011-05-04 20:24:25 EDT ---

This appears to happen to passwd, shadow, and gshadow as well, probably for similar reasons.

Comment 1 Tomas Mraz 2012-08-17 06:47:29 UTC
Please report the issue upstream. I don't think this use-case is really important and useful.


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