* cygheap.cc (cygheap_init): Add GLOBAL_PRIV to hProcToken explicitely
since hProcImpToken isn't initialized here. * shared.cc (open_shared): Always print mapname instead of name in debug output.
This commit is contained in:
		| @@ -1,3 +1,10 @@ | ||||
| 2005-09-27  Corinna Vinschen  <corinna@vinschen.de> | ||||
|  | ||||
| 	* cygheap.cc (cygheap_init): Add GLOBAL_PRIV to hProcToken explicitely | ||||
| 	since hProcImpToken isn't initialized here. | ||||
| 	* shared.cc (open_shared): Always print mapname instead of name in | ||||
| 	debug output. | ||||
|  | ||||
| 2005-09-27  Christopher Faylor  <cgf@timesys.com> | ||||
|  | ||||
| 	* strace.cc (strace::vsprntf): Avoid printing a zero pid. | ||||
|   | ||||
| @@ -170,7 +170,7 @@ cygheap_init () | ||||
|   if (!cygheap->shared_prefix) | ||||
|     cygheap->shared_prefix = cstrdup ( | ||||
| 	    wincap.has_terminal_services () | ||||
| 	    && (set_process_privilege (SE_CREATE_GLOBAL_PRIV, true) >= 0 | ||||
| 	    && (set_privilege (hProcToken, SE_CREATE_GLOBAL_PRIV, true) >= 0 | ||||
| 		|| GetLastError () == ERROR_NO_SUCH_PRIVILEGE) | ||||
| 	    ? "Global\\" : ""); | ||||
| } | ||||
|   | ||||
| @@ -89,15 +89,14 @@ open_shared (const char *name, int n, HANDLE& shared_h, DWORD size, | ||||
|       VirtualFree (addr, 0, MEM_RELEASE); | ||||
|     } | ||||
|  | ||||
|   char map_buf[CYG_MAX_PATH]; | ||||
|   char *mapname = NULL; | ||||
|  | ||||
|   if (shared_h) | ||||
|     m = SH_JUSTOPEN; | ||||
|   else | ||||
|     { | ||||
|       char *mapname; | ||||
|       char map_buf[CYG_MAX_PATH]; | ||||
|       if (!name) | ||||
| 	mapname = NULL; | ||||
|       else | ||||
|       if (name) | ||||
| 	mapname = shared_name (map_buf, name, n); | ||||
|       if (m == SH_JUSTOPEN) | ||||
| 	shared_h = OpenFileMapping (access, FALSE, mapname); | ||||
| @@ -133,7 +132,7 @@ open_shared (const char *name, int n, HANDLE& shared_h, DWORD size, | ||||
|     } | ||||
|  | ||||
|   if (!shared) | ||||
|     api_fatal ("MapViewOfFileEx '%s'(%p), %E.  Terminating.", name, shared_h); | ||||
|     api_fatal ("MapViewOfFileEx '%s'(%p), %E.  Terminating.", mapname, shared_h); | ||||
|  | ||||
|   if (m == SH_CYGWIN_SHARED && offsets[0] && wincap.needs_memory_protection ()) | ||||
|     { | ||||
| @@ -155,7 +154,7 @@ open_shared (const char *name, int n, HANDLE& shared_h, DWORD size, | ||||
| #endif | ||||
|     } | ||||
|  | ||||
|   debug_printf ("name %s, n %d, shared %p (wanted %p), h %p", name, n, shared, addr, shared_h); | ||||
|   debug_printf ("name %s, n %d, shared %p (wanted %p), h %p", mapname, n, shared, addr, shared_h); | ||||
|  | ||||
|   return shared; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user