Bug 383351 - samba returns success during posix unlink of symlinks, but doesn't remove the link
Summary: samba returns success during posix unlink of symlinks, but doesn't remove the...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: samba
Version: 5.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Simo Sorce
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-14 20:49 UTC by Jeff Layton
Modified: 2018-07-03 18:18 UTC (History)
5 users (show)

Fixed In Version: RHBA-2008-0372
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-21 17:26:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
packet capture of trying to remove symlink with posix unlink (1.48 KB, application/octet-stream)
2007-11-14 20:49 UTC, Jeff Layton
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0372 0 normal SHIPPED_LIVE samba bug fix and enhancement update 2008-05-20 13:35:36 UTC

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



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