diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-07-24 18:25:52 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-07-24 18:25:52 +0000 |
commit | 520fcc974702602a1a3b246346e726492bad52e6 (patch) | |
tree | d57b580ba4493d8f1e886548044b4771544905fd /winsup/cygwin/shared_info.h | |
parent | 410c1d122d8c65b747d55138f00d32d5c1b607bc (diff) | |
download | cygnal-520fcc974702602a1a3b246346e726492bad52e6.tar.gz cygnal-520fcc974702602a1a3b246346e726492bad52e6.tar.bz2 cygnal-520fcc974702602a1a3b246346e726492bad52e6.zip |
* shared.cc (user_shared_initialize): Fetch potentially changed Cygwin
username from /etc/passwd before loading mount table.
(shared_info::init_installation_root): New function fetching Cygwin's
installation root dir and storing as native NT path in global shared
memory.
(shared_info::initialize): Call init_installation_root exactly once at
first startup.
* shared_info.h (SHARED_INFO_CB): Accommodate change to shared_info.
(CURR_SHARED_MAGIC): Ditto.
(class shared_info): Add installation_root member.
(shared_info::init_installation_root): Declare.
* grp.cc (pwdgrp::read_group): Call pwdgrp::load with native WCHAR path.
* passwd.cc (pwdgrp::read_passwd): Ditto. Avoid recursion.
(etc::init): Take POBJECT_ATTRIBUTES instead of path_conv.
* path.h (etc::init): Change prototype accordingly.
* pwdgrp.h (class pwdgrp): Store path as UNICODE_STRING/PWCHAR instead
of as path_conv.
(pwdgrp::load): Accommodate prototype.
* uinfo.cc (pwdgrp::load): Change argument type from char to wchar_t.
Create native NT path here instead of calling path_conv.
* mount.cc (find_root_from_cygwin_dll): Drop in favor of global
initializaion in shared_info.
(mount_info::init): Fetch native NT root dir from cygwin_shared.
(mount_info::from_fstab): Expect native NT path and use native NT
functions to access file. Convert username part in user fstab path
according to special char transformation rules.
* path.cc (tfx_chars): Convert slash to backslash.
(transform_chars): Implement for path given as PWCHAR.
(transform_chars): PUNICODE_STRING version calls PWCHAR version.
Remove useless commented code.
Diffstat (limited to 'winsup/cygwin/shared_info.h')
-rw-r--r-- | winsup/cygwin/shared_info.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/winsup/cygwin/shared_info.h b/winsup/cygwin/shared_info.h index 3b0036286..684a84a66 100644 --- a/winsup/cygwin/shared_info.h +++ b/winsup/cygwin/shared_info.h @@ -11,6 +11,7 @@ details. */ #include "tty.h" #include "security.h" #include "mtinfo.h" +#include "limits.h" /* Mount table entry */ @@ -117,9 +118,9 @@ public: cygwin_version.api_minor) #define SHARED_VERSION_MAGIC CYGWIN_VERSION_MAGIC (SHARED_MAGIC, SHARED_VERSION) -#define SHARED_INFO_CB 31136 +#define SHARED_INFO_CB 39328 -#define CURR_SHARED_MAGIC 0x18da899eU +#define CURR_SHARED_MAGIC 0x22f9ff0bU /* NOTE: Do not make gratuitous changes to the names or organization of the below class. The layout is checksummed to determine compatibility between @@ -135,10 +136,12 @@ class shared_info DWORD sys_mount_table_counter; tty_list tty; LONG last_used_bindresvport; + WCHAR installation_root[PATH_MAX]; DWORD obcaseinsensitive; mtinfo mt; void initialize (); + void init_installation_root (); void init_obcaseinsensitive (); unsigned heap_chunk_size (); unsigned heap_slop_size (); |