Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions winsup/cygwin/mm/shared.cc
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ void
user_info::create (bool reinit)
{
WCHAR name[UNLEN + 1] = L""; /* Large enough for SID */
bool created = false;

if (reinit)
{
Expand All @@ -236,11 +237,12 @@ user_info::create (bool reinit)

user_shared = (user_info *) open_shared (name, USER_VERSION,
cygwin_user_h, sizeof (user_info),
SH_USER_SHARED, &sec_none);
debug_printf ("opening user shared for '%W' at %p", name, user_shared);
SH_USER_SHARED, created, &sec_none);
debug_printf ("opening user shared for '%W' at %p, created %d",
name, user_shared, created);
ProtectHandleINH (cygwin_user_h);
debug_printf ("user shared version %x", user_shared->version);
if (reinit)
if (reinit || created)
user_shared->initialize ();
cygheap->shared_regions.user_shared_addr = user_shared;
}
Expand Down
3 changes: 2 additions & 1 deletion winsup/cygwin/mount.cc
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,8 @@ mount_info::create_root_entry (const PWCHAR root)
sys_wcstombs (native_root, PATH_MAX, root);
assert (*native_root != '\0');
if (add_item (native_root, "/",
MOUNT_SYSTEM | MOUNT_IMMUTABLE | MOUNT_AUTOMATIC | MOUNT_NOACL)
MOUNT_SYSTEM | MOUNT_IMMUTABLE | MOUNT_AUTOMATIC | MOUNT_NOACL
| MOUNT_OVERRIDE)
< 0)
api_fatal ("add_item (\"%s\", \"/\", ...) failed, errno %d", native_root, errno);
/* Create a default cygdrive entry. Note that this is a user entry.
Expand Down