* mount.cc (mount_commands): Ensure user mode is actually user mode and not the

default system mode.
This commit is contained in:
Christopher Faylor 2003-09-04 01:04:57 +00:00
parent e550f4d980
commit e48feef96a
2 changed files with 47 additions and 36 deletions

View File

@ -1,3 +1,8 @@
2003-09-01 AJ Reins <reinsaj@yahoo.com>
* mount.cc (mount_commands): Ensure user mode is actually user mode and
not the default system mode.
2003-08-31 Christopher Faylor <cgf@redhat.com> 2003-08-31 Christopher Faylor <cgf@redhat.com>
* kill.cc (forcekill): Silence some compiler warnings. * kill.cc (forcekill): Silence some compiler warnings.

View File

@ -406,9 +406,10 @@ mount_commands (void)
char system_flags[MAX_PATH]; char system_flags[MAX_PATH];
// write mount commands for user and system mount points // write mount commands for user and system mount points
while ((p = getmntent (m)) != NULL) { while ((p = getmntent (m)) != NULL)
// Only list non-cygdrives // Only list non-cygdrives
if (!strstr (p->mnt_opts, ",noumount")) { if (!strstr (p->mnt_opts, ",noumount"))
{
strcpy(opts, " -f"); strcpy(opts, " -f");
if (p->mnt_type[0] == 'u') if (p->mnt_type[0] == 'u')
strcat (opts, " -u"); strcat (opts, " -u");
@ -422,25 +423,30 @@ mount_commands (void)
strcat (opts, " -x"); strcat (opts, " -x");
if (strstr (p->mnt_opts, ",noexec")) if (strstr (p->mnt_opts, ",noexec"))
strcat (opts, " -E"); strcat (opts, " -E");
if (strstr (p->mnt_opts, ",managed"))
strcat (opts, " -o managed");
while ((c = strchr (p->mnt_fsname, '\\')) != NULL) while ((c = strchr (p->mnt_fsname, '\\')) != NULL)
*c = '/'; *c = '/';
printf (format_mnt, opts, p->mnt_fsname, p->mnt_dir); printf (format_mnt, opts, p->mnt_fsname, p->mnt_dir);
} }
}
endmntent (m); endmntent (m);
// write mount commands for cygdrive prefixes // write mount commands for cygdrive prefixes
cygwin_internal (CW_GET_CYGDRIVE_INFO, user, system, user_flags, cygwin_internal (CW_GET_CYGDRIVE_INFO, user, system, user_flags,
system_flags); system_flags);
if (strlen (user) > 0) {
strcpy (opts, " "); if (strlen (user) > 0)
{
strcpy (opts, " -u");
if (user_flags[0] == 'b') if (user_flags[0] == 'b')
strcat (opts, " -b"); strcat (opts, " -b");
else if (user_flags[0] == 't') else if (user_flags[0] == 't')
strcat (opts, " -t"); strcat (opts, " -t");
printf (format_cyg, opts, user); printf (format_cyg, opts, user);
} }
if (strlen (system) > 0) {
if (strlen (system) > 0)
{
strcpy (opts, " -s"); strcpy (opts, " -s");
if (system_flags[0] == 'b') if (system_flags[0] == 'b')
strcat (opts, " -b"); strcat (opts, " -b");