call to writeable_directory in _unlink: Do we need it?

Corinna Vinschen corinna@vinschen.de
Wed May 24 10:20:00 GMT 2000


I have a problem with the function writable_directory()
On one hand it's a nice add-on to simulate UNIX permissions
as near as possible but on the other hand that function
disallows many functions on (writable!) samba shares if you are
using ntsec. You can't

	unlink
	rename
	mkdir

The reason is the usage of access() in writable_directory().
The access function itself takes the complete ACL of a
file into account when computing the users permissions.
Unfortunately, you don't have a clean mapping between
NT account and UNIX account across samba if you are not
using NT domain logon authentication. The result is that
you typically don't have write permission on your samba
directory. Nevertheless you may do nearly everything
via Cygwin, except of chown, of course, but Cygwin itself
disallows removing a file regardless of your _real_
permissions to do so. The same is true for mkdir()

Personally I would plead for elininating the function
writable_directory() since I'm sure that it's going a
step too far in simulating permissions because it
disallows what is allowed, actually.

Objections?

It's a bit urgent for me because I want to check in
some other changes which clean up the permission
settings in ACLs for a better co-working between
Samba and Cygwin+ntsec before the next net release.

Corinna


More information about the Cygwin-developers mailing list