_mount.c: don't check for excutable if MS_EXISTING is set
This commit is contained in:
parent
083d30afbb
commit
0908191386
@ -87,18 +87,7 @@ int mountflags;
|
|||||||
/* Tell VFS that we are passing in a 16-byte label. */
|
/* Tell VFS that we are passing in a 16-byte label. */
|
||||||
mountflags |= MS_LABEL16;
|
mountflags |= MS_LABEL16;
|
||||||
|
|
||||||
/* See if the given type is even remotely valid. */
|
|
||||||
if(strlen(FSPATH)+strlen(type) >= sizeof(path)) {
|
|
||||||
errno = E2BIG;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
strcpy(path, FSPATH);
|
|
||||||
strcat(path, type);
|
|
||||||
|
|
||||||
if(stat(path, &statbuf) != 0) {
|
|
||||||
errno = EINVAL;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sanity check on user input. */
|
/* Sanity check on user input. */
|
||||||
if(strchr(args, '\'')) {
|
if(strchr(args, '\'')) {
|
||||||
@ -107,6 +96,19 @@ int mountflags;
|
|||||||
}
|
}
|
||||||
/* start the fs-server if not using existing one */
|
/* start the fs-server if not using existing one */
|
||||||
if (!use_existing) {
|
if (!use_existing) {
|
||||||
|
/* See if the given type is even remotely valid. */
|
||||||
|
if(strlen(FSPATH)+strlen(type) >= sizeof(path)) {
|
||||||
|
errno = E2BIG;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
strcpy(path, FSPATH);
|
||||||
|
strcat(path, type);
|
||||||
|
|
||||||
|
if(stat(path, &statbuf) != 0) {
|
||||||
|
errno = EINVAL;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if(strlen(_PATH_SERVICE)+strlen(path)+strlen(label)+
|
if(strlen(_PATH_SERVICE)+strlen(path)+strlen(label)+
|
||||||
strlen(args)+50 >= sizeof(cmd)) {
|
strlen(args)+50 >= sizeof(cmd)) {
|
||||||
errno = E2BIG;
|
errno = E2BIG;
|
||||||
@ -132,7 +134,7 @@ int mountflags;
|
|||||||
m.m1_p3 = label;
|
m.m1_p3 = label;
|
||||||
r = _syscall(VFS_PROC_NR, MOUNT, &m);
|
r = _syscall(VFS_PROC_NR, MOUNT, &m);
|
||||||
|
|
||||||
if(r != OK) {
|
if(r != OK && !use_existing) {
|
||||||
/* If mount() failed, tell RS to shutdown MFS process.
|
/* If mount() failed, tell RS to shutdown MFS process.
|
||||||
* No error check - won't do anything with this error anyway.
|
* No error check - won't do anything with this error anyway.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user