mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 06:44:31 +00:00
Fixed some disordering in revs.1.194 and 1,196. Moved the exceve() syscall
function back to near the beginning of the file. Rev.1.194 moved it into the middle of auxiliary functions following kern_execve(). Moved the __mac_execve() syscall function up together with execve(). It was new in rev1.1.196 and perfectly misplaced after execve().
This commit is contained in:
parent
437ffe1823
commit
ca46e90ef4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123923
|
@ -134,6 +134,61 @@ sysctl_kern_stackprot(SYSCTL_HANDLER_ARGS)
|
|||
*/
|
||||
static const struct execsw **execsw;
|
||||
|
||||
#ifndef _SYS_SYSPROTO_H_
|
||||
struct execve_args {
|
||||
char *fname;
|
||||
char **argv;
|
||||
char **envv;
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* MPSAFE
|
||||
*/
|
||||
int
|
||||
execve(td, uap)
|
||||
struct thread *td;
|
||||
struct execve_args /* {
|
||||
char *fname;
|
||||
char **argv;
|
||||
char **envv;
|
||||
} */ *uap;
|
||||
{
|
||||
|
||||
return (kern_execve(td, uap->fname, uap->argv, uap->envv, NULL));
|
||||
}
|
||||
|
||||
#ifndef _SYS_SYSPROTO_H_
|
||||
struct __mac_execve_args {
|
||||
char *fname;
|
||||
char **argv;
|
||||
char **envv;
|
||||
struct mac *mac_p;
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* MPSAFE
|
||||
*/
|
||||
int
|
||||
__mac_execve(td, uap)
|
||||
struct thread *td;
|
||||
struct __mac_execve_args /* {
|
||||
char *fname;
|
||||
char **argv;
|
||||
char **envv;
|
||||
struct mac *mac_p;
|
||||
} */ *uap;
|
||||
{
|
||||
|
||||
#ifdef MAC
|
||||
return (kern_execve(td, uap->fname, uap->argv, uap->envv,
|
||||
uap->mac_p));
|
||||
#else
|
||||
return (ENOSYS);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* In-kernel implementation of execve(). All arguments are assumed to be
|
||||
* userspace pointers from the passed thread.
|
||||
|
@ -669,61 +724,6 @@ kern_execve(td, fname, argv, envv, mac_p)
|
|||
return (error);
|
||||
}
|
||||
|
||||
#ifndef _SYS_SYSPROTO_H_
|
||||
struct execve_args {
|
||||
char *fname;
|
||||
char **argv;
|
||||
char **envv;
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* MPSAFE
|
||||
*/
|
||||
int
|
||||
execve(td, uap)
|
||||
struct thread *td;
|
||||
struct execve_args /* {
|
||||
char *fname;
|
||||
char **argv;
|
||||
char **envv;
|
||||
} */ *uap;
|
||||
{
|
||||
|
||||
return (kern_execve(td, uap->fname, uap->argv, uap->envv, NULL));
|
||||
}
|
||||
|
||||
#ifndef _SYS_SYSPROTO_H_
|
||||
struct __mac_execve_args {
|
||||
char *fname;
|
||||
char **argv;
|
||||
char **envv;
|
||||
struct mac *mac_p;
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* MPSAFE
|
||||
*/
|
||||
int
|
||||
__mac_execve(td, uap)
|
||||
struct thread *td;
|
||||
struct __mac_execve_args /* {
|
||||
char *fname;
|
||||
char **argv;
|
||||
char **envv;
|
||||
struct mac *mac_p;
|
||||
} */ *uap;
|
||||
{
|
||||
|
||||
#ifdef MAC
|
||||
return (kern_execve(td, uap->fname, uap->argv, uap->envv,
|
||||
uap->mac_p));
|
||||
#else
|
||||
return (ENOSYS);
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
exec_map_first_page(imgp)
|
||||
struct image_params *imgp;
|
||||
|
|
Loading…
Reference in a new issue