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.
Created attachment 258811 [details] packet capture of trying to remove symlink with posix unlink
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.
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
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.
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