Bug 4809 - Invisible Files / Non-Removable Directory / Security
Invisible Files / Non-Removable Directory / Security
Status: NEW
Product: Samba 3.0
Classification: Unclassified
Component: File Services
3.0.9
Sparc Solaris
: P3 major
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-23 13:29 UTC by Charles Morris
Modified: 2007-07-23 13:39 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Morris 2007-07-23 13:29:06 UTC
Dead symlinks are not visible to samba (not in SMB traffic) and  
may be used to keep a directory from being removed.


12:04pm cmorris@ra  /home/cmorris/WWW/samba_test/subdir #>ln -s /dev/null .iexist
12:05pm cmorris@ra  /home/cmorris/WWW/samba_test/subdir #>ln -s /dev/null iexist
12:05pm cmorris@ra  /home/cmorris/WWW/samba_test/subdir #>ln -s /dev/nonexistant .idontexist
12:05pm cmorris@ra  /home/cmorris/WWW/samba_test/subdir #>ln -s /dev/nonexistant idontexist
12:05pm cmorris@ra  /home/cmorris/WWW/samba_test/subdir #>ls -al
total 2
drwxr-x--x    2 cmorris  staff       512 Jul 23 12:05 .
drwxr-x--x    3 cmorris  staff       512 Jul 23 12:04 ..
lrwxrwxrwx    1 cmorris  staff        16 Jul 23 12:05 .idontexist -> /dev/nonexistant
lrwxrwxrwx    1 cmorris  staff        16 Jul 23 12:05 idontexist -> /dev/nonexistant
lrwxrwxrwx    1 cmorris  staff         9 Jul 23 12:05 .iexist -> /dev/null
lrwxrwxrwx    1 cmorris  staff         9 Jul 23 12:05 iexist -> /dev/null


On my Windows XP SP2 client:
When this directory is viewed in explorer (as Z:\WWW\samba_test\subdir)
I only see the file '.iexist' and 'iexist'.

When you delete the file '.iexist'/'iexist', and the directory is "empty",
I go up one directory (to 'samba_test/') and attempt to delete the folder.

It spits the strange error:
"Cannot remove folder subdir: A file with the name you specified already exists. Specify a different file name."

If I directly try to access the file (Z:\WWW\samba_test\subdir\idontexist)
it gives the standard error: "Cannot find 'file:///Z:\WWW\samba_test\idontexist'. Make sure the path or Internet address is correct."
just like it would with a file that truly did not exist.
Comment 1 Volker Lendecke 2007-07-23 13:39:19 UTC
Can you reproduce this with 3.0.25b? 3.0.9 is quite old.

If yes, please upload your smb.conf and a debug level 10 logs of smbd under the failing attempt from Windows.

Thanks,

Volker