Apparently, both load_image() and exec*() support running scripts. We do that
now as well.
Also, both functions will now test if the executable exists and is valid; that
way, load_image()/exec*() can catch many errors without having to create a new
team (or erase the current one - an exec*("my invalid app") might now return
with an error).
The runtime linker now exports a function to test executables that is aware
of the search paths, and will also check user permissions upfront.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13113 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
/*
|
||||
** Copyright 2002, Manuel J. Petit. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
* Copyright 2003-2005, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2002, Manuel J. Petit. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
#ifndef KERNEL_USER_RUNTIME_H_
|
||||
#define KERNEL_USER_RUNTIME_H_
|
||||
|
||||
|
||||
#include <image.h>
|
||||
#include <OS.h>
|
||||
|
||||
|
||||
#define MAGIC_APP_NAME "_APP_"
|
||||
|
||||
struct rld_export {
|
||||
@@ -18,6 +23,8 @@ struct rld_export {
|
||||
int32 symbolType, void **_location);
|
||||
status_t (*get_nth_image_symbol)(image_id imageID, int32 num, char *symbolName,
|
||||
int32 *nameLength, int32 *symbolType, void **_location);
|
||||
status_t (*test_executable)(const char *path, uid_t user, gid_t group,
|
||||
char *starter);
|
||||
};
|
||||
|
||||
struct uspace_program_args {
|
||||
@@ -34,6 +41,4 @@ struct uspace_program_args {
|
||||
struct rld_export *rld_export;
|
||||
};
|
||||
|
||||
typedef void (libinit_f)(unsigned, struct uspace_program_args const *);
|
||||
|
||||
#endif /* KERNEL_USER_RUNTIME_H_ */
|
||||
|
||||
Reference in New Issue
Block a user