Bug 383351 - samba returns success during posix unlink of symlinks, but doesn't remove the link
samba returns success during posix unlink of symlinks, but doesn't remove the...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: samba (Show other bugs)
5.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Simo Sorce
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-14 15:49 EST by Jeff Layton
Modified: 2014-06-18 03:37 EDT (History)
5 users (show)

See Also:
Fixed In Version: RHBA-2008-0372
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-21 13:26:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Jeff Layton 2007-11-14 15:49:23 EST
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 15:49:23 EST
Created attachment 258811 [details]
packet capture of trying to remove symlink with posix unlink
Comment 3 RHEL Product and Program Management 2007-12-10 10:54:23 EST
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 09:45:24 EST
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 10:52:09 EST
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 13:26:35 EDT
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.