* mount.cc (mount_commands): Ensure user mode is actually user mode and not the
default system mode.
This commit is contained in:
parent
e550f4d980
commit
e48feef96a
|
@ -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.
|
||||||
|
|
|
@ -406,48 +406,54 @@ 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");
|
{
|
||||||
if (p->mnt_type[0] == 'u')
|
strcpy(opts, " -f");
|
||||||
strcat (opts, " -u");
|
if (p->mnt_type[0] == 'u')
|
||||||
else if (p->mnt_type[0] == 's')
|
strcat (opts, " -u");
|
||||||
strcat (opts, " -s");
|
else if (p->mnt_type[0] == 's')
|
||||||
if (p->mnt_opts[0] == 'b')
|
strcat (opts, " -s");
|
||||||
strcat (opts, " -b");
|
if (p->mnt_opts[0] == 'b')
|
||||||
else if (p->mnt_opts[0] == 't')
|
strcat (opts, " -b");
|
||||||
strcat (opts, " -t");
|
else if (p->mnt_opts[0] == 't')
|
||||||
if (strstr (p->mnt_opts, ",exec"))
|
strcat (opts, " -t");
|
||||||
strcat (opts, " -x");
|
if (strstr (p->mnt_opts, ",exec"))
|
||||||
if (strstr (p->mnt_opts, ",noexec"))
|
strcat (opts, " -x");
|
||||||
strcat (opts, " -E");
|
if (strstr (p->mnt_opts, ",noexec"))
|
||||||
while ((c = strchr (p->mnt_fsname, '\\')) != NULL)
|
strcat (opts, " -E");
|
||||||
*c = '/';
|
if (strstr (p->mnt_opts, ",managed"))
|
||||||
printf (format_mnt, opts, p->mnt_fsname, p->mnt_dir);
|
strcat (opts, " -o managed");
|
||||||
}
|
while ((c = strchr (p->mnt_fsname, '\\')) != NULL)
|
||||||
}
|
*c = '/';
|
||||||
|
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)
|
||||||
if (user_flags[0] == 'b')
|
{
|
||||||
strcat (opts, " -b");
|
strcpy (opts, " -u");
|
||||||
else if (user_flags[0] == 't')
|
if (user_flags[0] == 'b')
|
||||||
strcat (opts, " -t");
|
strcat (opts, " -b");
|
||||||
printf (format_cyg, opts, user);
|
else if (user_flags[0] == 't')
|
||||||
}
|
strcat (opts, " -t");
|
||||||
if (strlen (system) > 0) {
|
printf (format_cyg, opts, user);
|
||||||
strcpy (opts, " -s");
|
}
|
||||||
if (system_flags[0] == 'b')
|
|
||||||
strcat (opts, " -b");
|
if (strlen (system) > 0)
|
||||||
else if (system_flags[0] == 't')
|
{
|
||||||
strcat (opts, " -t");
|
strcpy (opts, " -s");
|
||||||
printf (format_cyg, opts, system);
|
if (system_flags[0] == 'b')
|
||||||
}
|
strcat (opts, " -b");
|
||||||
|
else if (system_flags[0] == 't')
|
||||||
|
strcat (opts, " -t");
|
||||||
|
printf (format_cyg, opts, system);
|
||||||
|
}
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue