Bug 383351

Summary: samba returns success during posix unlink of symlinks, but doesn't remove the link
Product: Red Hat Enterprise Linux 5 Reporter: Jeff Layton <jlayton>
Component: sambaAssignee: Simo Sorce <ssorce>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.1CC: azelinka, gdeschner, gpp, jplans, steved
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0372 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 17:26:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
packet capture of trying to remove symlink with posix unlink none

Description Jeff Layton 2007-11-14 20:49:23 UTC
Description of problem:

From a recent upstream version of CIFS (something of rawhide vintage -- needs
the patch that added CIFSPOSIXDelFile function). Mount samba share with unix
extensions enabled. On it do:

# ln -s foo bar
# rm foo ; echo $?
# ls -l foo

...the unlink() call returns 0, but the file isn't actually removed. The call
goes out on the wire and samba returns STATUS_SUCCESS to the client, but never
unlinks the file (strace confirms that smbd never calls unlink() on the server).

F8's samba (samba-3.0.26a-6.fc8) works correctly, so this appears to have
already been patched upstream.

Comment 1 Jeff Layton 2007-11-14 20:49:23 UTC
Created attachment 258811 [details]
packet capture of trying to remove symlink with posix unlink

Comment 3 RHEL Program Management 2007-12-10 15:54:23 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 5 Jeff Layton 2008-01-16 14:45:24 UTC
Looks like the new RHEL5 packages fix this. The reproducer I posted here is
bogus though. It should be:

# ln -s bar foo
# rm -f foo ; echo $?
# ls -l foo



Comment 8 Gerry Pregent 2008-02-20 15:52:09 UTC
This problem persists with a server described by...

Red Hat Enterprise Linux Server release 5.1 (Tikanga)
cifs.ko version 1.48aRH
samba-3.0.25b-1.el5_1.4
samba-client-3.0.25b-1.el5_1.4
samba-common-3.0.25b-1.el5_1.4

and a client described by...

kernel-2.6.23.12-52.fc7 
cifs.ko version 1.50
samba-client-3.0.28-0.fc7.i386
samba-common-3.0.28-0.fc7.i386

When the client falls back to kernel-2.6.21-1.3228.fc7
which includes cifs.ko version 1.48, the symlink bug goes 
away.

With the same server configuration described above and
a more up to date client described by...

kernel-2.6.23.15-137.fc8
cifs.ko version 1.50
samba-client-3.0.28-0.fc8
samba-common-3.0.28-0.fc8

...the symlink bug still exists.

Comment 10 errata-xmlrpc 2008-05-21 17:26:35 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0372.html