* dtable.cc (dtable::build_fhandler_from_name): Set some fhandler

data on sockets to evaluate AF_LOCAL sockets correctly.
	(dtable::build_fhandler): Set unit number on sockets.
	* fhandler.h (fhandler_socket): Add unit number.
	(fhandler_socket::get_unit): New method.
	* fhandler_socket.cc (fhandler_socket::fhandler_socket): Set unit
	number.
	(fhandler_socket::fstat): Reorganize to return more Linux-like
	values.
	* net.cc: include ctype.h.
	(fdsock): Set unit number when building fhandler.
	* path.cc (path_conv::check): Set device type to FH_SOCKET if file
	is a AF_UNIX socket.
	(get_devn): Evaluate unit for virtual socket devices.
	(win32_device_name): Set windows path for sockets to unix_path with
	just backslashes to keep the different names.
	* syscalls.cc (fstat64): Don't override st_ino, st_dev and st_rdev
	for sockets.
	(stat_worker): Ditto.

From Pierre Humblet:

	* autoload.cc (AccessCheck): Add.
	(DuplicateToken): Add.
	* security.h (check_file_access): Declare.
	* syscalls.cc (access): Convert path to Windows, check existence
	and readonly attribute. Call check_file_access instead of acl_access.
	* security.cc (check_file_access): Create.
	* sec_acl (acl_access): Delete.
This commit is contained in:
Corinna Vinschen
2003-02-21 14:29:18 +00:00
parent d05ef21d4f
commit cf762b08cf
11 changed files with 180 additions and 85 deletions

View File

@ -799,10 +799,8 @@ out:
set_has_buggy_open (strcmp (fs.name, "SUNWNFS") == 0);
}
}
#if 0
if (issocket ())
devn = FH_SOCKET;
#endif
if (!(opt & PC_FULL))
{
@ -954,7 +952,10 @@ get_devn (const char *name, int &unit)
devn = FH_PIPEW;
else if (deveq ("tcp") || deveq ("udp") || deveq ("streamsocket")
|| deveq ("dgsocket"))
devn = FH_SOCKET;
{
devn = FH_SOCKET;
unit = tolower (*name) - 'a';
}
return devn;
}
@ -1118,6 +1119,12 @@ win32_device_name (const char *src_path, char *win32_path,
return false;
switch (devn)
{
case FH_SOCKET:
char *c;
strcpy (win32_path, src_path);
while (c = strchr (win32_path, '/'))
*c = '\\';
break;
case FH_RANDOM:
__small_sprintf (win32_path, devfmt, unit == 8 ? "" : "u");
break;