* fhandler.h (fhandler_base::hclose): New virtual method.
(fhandler_base::set_inheritance): Make this a method so that we can use the appropriate close methods. * fhandler.cc (fhandler_base::set_inheritance): Ditto. * path.cc (normalize_posix_path): Eliminate /. trailing path component.
This commit is contained in:
		| @@ -1,15 +1,24 @@ | ||||
| Thu Apr 20 00:32:03 2000  Christopher Faylor <cgf@cygnus.com> | ||||
|  | ||||
| 	* fhandler.h (fhandler_base::hclose): New virtual method. | ||||
| 	(fhandler_base::set_inheritance): Make this a method so that we can use | ||||
| 	the appropriate close methods. | ||||
| 	* fhandler.cc (fhandler_base::set_inheritance): Ditto. | ||||
| 	* path.cc (normalize_posix_path): Eliminate /.  trailing path | ||||
| 	component. | ||||
|  | ||||
| Wed Apr 20  0:19:00 2000  Corinna Vinschen <corinna@vinschen.de> | ||||
|  | ||||
|         * syscalls.cc (setuid): Allow switching user context after | ||||
|         successful call to ImpersonateLogedOnUser (NT only). | ||||
|         (setgid): Ditto. | ||||
|         (seteuid): Call setuid. | ||||
|         (setegid): Call setgid. | ||||
| 	* syscalls.cc (setuid): Allow switching user context after | ||||
| 	successful call to ImpersonateLogedOnUser (NT only). | ||||
| 	(setgid): Ditto. | ||||
| 	(seteuid): Call setuid. | ||||
| 	(setegid): Call setgid. | ||||
|  | ||||
| Wed Apr 19 22:00:00 2000  Corinna Vinschen <corinna@vinschen.de> | ||||
|  | ||||
|         * uinfo.cc (internal_getlogin): Use NetGetDCName() instead | ||||
|         of NetGetAnyDCName(). | ||||
| 	* uinfo.cc (internal_getlogin): Use NetGetDCName() instead | ||||
| 	of NetGetAnyDCName(). | ||||
|  | ||||
| Mon Apr 17 12:08:47 2000  Kazuhiro Fujieda  <fujieda@jaist.ac.jp> | ||||
|  | ||||
| @@ -55,12 +64,12 @@ Thu Apr 13  8:48:00 2000  Corinna Vinschen <corinna@vinschen.de> | ||||
|  | ||||
| 	* path.cc (conv_to_win32_path): Detect a win32 path | ||||
| 	if path contains backslashes. | ||||
|         * cygwin.din: Add symbol for `lacl'. | ||||
|         * security.cc (ReadSD): Add debug output. | ||||
|         (acl_worker):  New static function. | ||||
|         (acl): Call acl_worker now. | ||||
|         (lacl): New function. | ||||
|         (facl): Call acl_worker now. | ||||
| 	* cygwin.din: Add symbol for `lacl'. | ||||
| 	* security.cc (ReadSD): Add debug output. | ||||
| 	(acl_worker):  New static function. | ||||
| 	(acl): Call acl_worker now. | ||||
| 	(lacl): New function. | ||||
| 	(facl): Call acl_worker now. | ||||
| 	* include/cygwin/acl.h: Add prototype for `lacl'. | ||||
|  | ||||
| Wed Apr 12 18:48:33 2000  Christopher Faylor <cgf@cygnus.com> | ||||
| @@ -386,7 +395,7 @@ Fri Feb 25 19:26:42 2000  Christopher Faylor <cgf@cygnus.com> | ||||
| 2000-02-25  DJ Delorie  <dj@cygnus.com> | ||||
|  | ||||
| 	* Makefile.in: fix "make check" support and cygrun. | ||||
| 	 | ||||
|  | ||||
| Thu Feb 24 15:56:00 2000  Christopher Faylor <cgf@cygnus.com> | ||||
|  | ||||
| 	* syscalls.c (_read): Clear errno before doing any read operation. | ||||
|   | ||||
| @@ -1427,8 +1427,8 @@ fhandler_pipe::lseek (off_t offset, int whence) | ||||
|   return -1; | ||||
| } | ||||
|  | ||||
| void __stdcall | ||||
| set_inheritance (HANDLE &h, int not_inheriting, const char *name) | ||||
| void | ||||
| fhandler_base::set_inheritance (HANDLE &h, int not_inheriting, const char *name) | ||||
| { | ||||
|   HANDLE newh; | ||||
|  | ||||
| @@ -1438,16 +1438,17 @@ set_inheritance (HANDLE &h, int not_inheriting, const char *name) | ||||
| #ifndef DEBUGGING | ||||
|   else | ||||
|     { | ||||
|       CloseHandle (h); | ||||
|       hclose (h); | ||||
|       h = newh; | ||||
|     } | ||||
| #else | ||||
|   else if (!name) | ||||
|     { | ||||
|       CloseHandle (h); | ||||
|       hclose (h); | ||||
|       h = newh; | ||||
|     } | ||||
|   else | ||||
|   /* FIXME: This won't work with sockets */ | ||||
|     { | ||||
|       ForceCloseHandle2 (h, name); | ||||
|       h = newh; | ||||
|   | ||||
| @@ -235,6 +235,8 @@ public: | ||||
|   const char *get_win32_name () { return win32_path_name_; } | ||||
|   unsigned long get_namehash () { return namehash_; } | ||||
|  | ||||
|   virtual void hclose (HANDLE h) {CloseHandle (h);} | ||||
|   virtual void set_inheritance (HANDLE &h, int not_inheriting, const char *name = NULL); | ||||
|  | ||||
|   /* fixup fd possibly non-inherited handles after fork */ | ||||
|   void fork_fixup (HANDLE parent, HANDLE &h, const char *name); | ||||
| @@ -315,6 +317,7 @@ public: | ||||
|   int ioctl (unsigned int cmd, void *); | ||||
|   off_t lseek (off_t, int) { return 0; } | ||||
|   int close (); | ||||
|   void hclose (HANDLE) {close ();} | ||||
|  | ||||
|   select_record *select_read (select_record *s); | ||||
|   select_record *select_write (select_record *s); | ||||
| @@ -810,6 +813,4 @@ public: | ||||
| uid_t __stdcall get_file_owner (int, const char *); | ||||
| gid_t __stdcall get_file_group (int, const char *); | ||||
|  | ||||
| void __stdcall set_inheritance (HANDLE &h, int val, const char *name = NULL); | ||||
|  | ||||
| #endif /* _FHANDLER_H_ */ | ||||
|   | ||||
| @@ -549,7 +549,7 @@ normalize_posix_path (const char *cwd, const char *src, char *dst) | ||||
|   const char *src_start = src; | ||||
|   char *dst_start = dst; | ||||
|  | ||||
|   if (! SLASH_P (src[0])) | ||||
|   if (!SLASH_P (src[0])) | ||||
|     { | ||||
|       if (strlen (cwd) + 1 + strlen (src) >= MAX_PATH) | ||||
| 	{ | ||||
| @@ -619,6 +619,8 @@ normalize_posix_path (const char *cwd, const char *src, char *dst) | ||||
| 	  ++src; | ||||
| 	} | ||||
|     } | ||||
|   if (dst > (dst_start + 1) && dst[-1] == '.' && SLASH_P (dst[-2])) | ||||
|     dst -= 2; | ||||
|   *dst = 0; | ||||
|   debug_printf ("%s = normalize_posix_path (%s)", dst_start, src_start); | ||||
|   return 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user