2014-09-05 13:20:59 +04:00
|
|
|
/* $NetBSD: exec_script.c,v 1.74 2014/09/05 09:20:59 matt Exp $ */
|
1994-06-29 10:29:24 +04:00
|
|
|
|
1994-01-16 06:09:59 +03:00
|
|
|
/*
|
1996-10-01 03:18:43 +04:00
|
|
|
* Copyright (c) 1993, 1994, 1996 Christopher G. Demetriou
|
1994-01-16 06:09:59 +03:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
|
|
* must display the following acknowledgement:
|
|
|
|
* This product includes software developed by Christopher G. Demetriou.
|
|
|
|
* 4. The name of the author may not be used to endorse or promote products
|
1994-01-29 02:43:26 +03:00
|
|
|
* derived from this software without specific prior written permission
|
1994-01-16 06:09:59 +03:00
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
2001-11-12 18:25:01 +03:00
|
|
|
#include <sys/cdefs.h>
|
2014-09-05 13:20:59 +04:00
|
|
|
__KERNEL_RCSID(0, "$NetBSD: exec_script.c,v 1.74 2014/09/05 09:20:59 matt Exp $");
|
2001-11-12 18:25:01 +03:00
|
|
|
|
1994-01-16 06:09:59 +03:00
|
|
|
#if defined(SETUIDSCRIPTS) && !defined(FDSCRIPTS)
|
|
|
|
#define FDSCRIPTS /* Need this for safe set-id scripts. */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <sys/param.h>
|
|
|
|
#include <sys/systm.h>
|
|
|
|
#include <sys/proc.h>
|
2008-01-02 22:44:36 +03:00
|
|
|
#include <sys/kmem.h>
|
1994-01-16 06:09:59 +03:00
|
|
|
#include <sys/vnode.h>
|
|
|
|
#include <sys/namei.h>
|
|
|
|
#include <sys/file.h>
|
1997-07-08 06:32:02 +04:00
|
|
|
#ifdef SETUIDSCRIPTS
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#endif
|
1994-01-16 06:09:59 +03:00
|
|
|
#include <sys/filedesc.h>
|
|
|
|
#include <sys/exec.h>
|
|
|
|
#include <sys/resourcevar.h>
|
2008-11-19 21:35:57 +03:00
|
|
|
#include <sys/module.h>
|
1994-01-16 06:09:59 +03:00
|
|
|
#include <sys/exec_script.h>
|
2004-11-05 02:55:28 +03:00
|
|
|
#include <sys/exec_elf.h>
|
1994-01-16 06:09:59 +03:00
|
|
|
|
2013-09-19 22:50:35 +04:00
|
|
|
MODULE(MODULE_CLASS_EXEC, exec_script, NULL);
|
2008-11-19 21:35:57 +03:00
|
|
|
|
2014-03-07 05:33:43 +04:00
|
|
|
static struct execsw exec_script_execsw = {
|
|
|
|
.es_hdrsz = SCRIPT_HDR_SIZE,
|
|
|
|
.es_makecmds = exec_script_makecmds,
|
|
|
|
.u = {
|
|
|
|
.elf_probe_func = NULL,
|
|
|
|
},
|
|
|
|
.es_emul = NULL,
|
|
|
|
.es_prio = EXECSW_PRIO_ANY,
|
|
|
|
.es_arglen = 0,
|
|
|
|
.es_copyargs = NULL,
|
|
|
|
.es_setregs = NULL,
|
|
|
|
.es_coredump = NULL,
|
|
|
|
.es_setup_stack = exec_setup_stack,
|
2008-11-19 21:35:57 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
static int
|
|
|
|
exec_script_modcmd(modcmd_t cmd, void *arg)
|
|
|
|
{
|
|
|
|
|
|
|
|
switch (cmd) {
|
|
|
|
case MODULE_CMD_INIT:
|
2014-03-07 05:33:43 +04:00
|
|
|
return exec_add(&exec_script_execsw, 1);
|
2008-11-19 21:35:57 +03:00
|
|
|
|
|
|
|
case MODULE_CMD_FINI:
|
2014-03-07 05:33:43 +04:00
|
|
|
return exec_remove(&exec_script_execsw, 1);
|
2008-11-19 21:35:57 +03:00
|
|
|
|
|
|
|
case MODULE_CMD_AUTOUNLOAD:
|
|
|
|
/*
|
|
|
|
* We don't want to be autounloaded because our use is
|
|
|
|
* transient: no executables with p_execsw equal to
|
|
|
|
* exec_script_execsw will exist, so FINI will never
|
|
|
|
* return EBUSY. However, the system will run scripts
|
|
|
|
* often. Return EBUSY here to prevent this module from
|
|
|
|
* ping-ponging in and out of the kernel.
|
|
|
|
*/
|
|
|
|
return EBUSY;
|
|
|
|
|
|
|
|
default:
|
|
|
|
return ENOTTY;
|
2014-02-17 23:29:46 +04:00
|
|
|
}
|
2008-11-19 21:35:57 +03:00
|
|
|
}
|
|
|
|
|
1994-01-16 06:09:59 +03:00
|
|
|
/*
|
|
|
|
* exec_script_makecmds(): Check if it's an executable shell script.
|
|
|
|
*
|
|
|
|
* Given a proc pointer and an exec package pointer, see if the referent
|
|
|
|
* of the epp is in shell script. If it is, then set thing up so that
|
|
|
|
* the script can be run. This involves preparing the address space
|
|
|
|
* and arguments for the shell which will run the script.
|
|
|
|
*
|
|
|
|
* This function is ultimately responsible for creating a set of vmcmds
|
|
|
|
* which can be used to build the process's vm space and inserting them
|
|
|
|
* into the exec package.
|
|
|
|
*/
|
|
|
|
int
|
2005-12-11 15:16:03 +03:00
|
|
|
exec_script_makecmds(struct lwp *l, struct exec_package *epp)
|
1994-01-16 06:09:59 +03:00
|
|
|
{
|
|
|
|
int error, hdrlinelen, shellnamelen, shellarglen;
|
|
|
|
char *hdrstr = epp->ep_hdr;
|
2010-05-02 09:30:20 +04:00
|
|
|
char *cp, *shellname, *shellarg;
|
2008-01-02 22:44:36 +03:00
|
|
|
size_t shellargp_len;
|
|
|
|
struct exec_fakearg *shellargp;
|
|
|
|
struct exec_fakearg *tmpsap;
|
2010-11-19 09:44:33 +03:00
|
|
|
struct pathbuf *shell_pathbuf;
|
1994-01-16 06:09:59 +03:00
|
|
|
struct vnode *scriptvp;
|
|
|
|
#ifdef SETUIDSCRIPTS
|
1997-07-08 06:32:02 +04:00
|
|
|
/* Gcc needs those initialized for spurious uninitialized warning */
|
|
|
|
uid_t script_uid = (uid_t) -1;
|
|
|
|
gid_t script_gid = NOGROUP;
|
1994-01-16 06:09:59 +03:00
|
|
|
u_short script_sbits;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* if the magic isn't that of a shell script, or we've already
|
|
|
|
* done shell script processing for this exec, punt on it.
|
|
|
|
*/
|
|
|
|
if ((epp->ep_flags & EXEC_INDIR) != 0 ||
|
|
|
|
epp->ep_hdrvalid < EXEC_SCRIPT_MAGICLEN ||
|
|
|
|
strncmp(hdrstr, EXEC_SCRIPT_MAGIC, EXEC_SCRIPT_MAGICLEN))
|
|
|
|
return ENOEXEC;
|
|
|
|
|
|
|
|
/*
|
2014-06-30 21:31:15 +04:00
|
|
|
* Check that the shell spec is terminated by a newline, and that
|
|
|
|
* it isn't too large.
|
1994-01-16 06:09:59 +03:00
|
|
|
*/
|
2003-04-02 04:58:56 +04:00
|
|
|
hdrlinelen = min(epp->ep_hdrvalid, SCRIPT_HDR_SIZE);
|
1994-01-16 06:09:59 +03:00
|
|
|
for (cp = hdrstr + EXEC_SCRIPT_MAGICLEN; cp < hdrstr + hdrlinelen;
|
|
|
|
cp++) {
|
|
|
|
if (*cp == '\n') {
|
|
|
|
*cp = '\0';
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (cp >= hdrstr + hdrlinelen)
|
|
|
|
return ENOEXEC;
|
|
|
|
|
|
|
|
/* strip spaces before the shell name */
|
|
|
|
for (cp = hdrstr + EXEC_SCRIPT_MAGICLEN; *cp == ' ' || *cp == '\t';
|
|
|
|
cp++)
|
|
|
|
;
|
2014-06-30 21:22:32 +04:00
|
|
|
if (*cp == '\0')
|
|
|
|
return ENOEXEC;
|
1994-01-16 06:09:59 +03:00
|
|
|
|
2014-06-30 21:31:15 +04:00
|
|
|
shellarg = NULL;
|
|
|
|
shellarglen = 0;
|
|
|
|
|
|
|
|
/* collect the shell name; remember its length for later */
|
1994-01-16 06:09:59 +03:00
|
|
|
shellname = cp;
|
|
|
|
shellnamelen = 0;
|
|
|
|
for ( /* cp = cp */ ; *cp != '\0' && *cp != ' ' && *cp != '\t'; cp++)
|
|
|
|
shellnamelen++;
|
|
|
|
if (*cp == '\0')
|
|
|
|
goto check_shell;
|
|
|
|
*cp++ = '\0';
|
|
|
|
|
|
|
|
/* skip spaces before any argument */
|
|
|
|
for ( /* cp = cp */ ; *cp == ' ' || *cp == '\t'; cp++)
|
|
|
|
;
|
|
|
|
if (*cp == '\0')
|
|
|
|
goto check_shell;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* collect the shell argument. everything after the shell name
|
|
|
|
* is passed as ONE argument; that's the correct (historical)
|
|
|
|
* behaviour.
|
|
|
|
*/
|
|
|
|
shellarg = cp;
|
|
|
|
for ( /* cp = cp */ ; *cp != '\0'; cp++)
|
|
|
|
shellarglen++;
|
|
|
|
*cp++ = '\0';
|
|
|
|
|
|
|
|
check_shell:
|
|
|
|
#ifdef SETUIDSCRIPTS
|
|
|
|
/*
|
2001-06-15 21:24:19 +04:00
|
|
|
* MNT_NOSUID has already taken care of by check_exec,
|
|
|
|
* so we don't need to worry about it now or later. We
|
2007-02-10 00:55:00 +03:00
|
|
|
* will need to check PSL_TRACED later, however.
|
1994-01-16 06:09:59 +03:00
|
|
|
*/
|
1997-05-08 14:19:10 +04:00
|
|
|
script_sbits = epp->ep_vap->va_mode & (S_ISUID | S_ISGID);
|
1994-01-16 06:09:59 +03:00
|
|
|
if (script_sbits != 0) {
|
|
|
|
script_uid = epp->ep_vap->va_uid;
|
|
|
|
script_gid = epp->ep_vap->va_gid;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#ifdef FDSCRIPTS
|
|
|
|
/*
|
|
|
|
* if the script isn't readable, or it's set-id, then we've
|
|
|
|
* gotta supply a "/dev/fd/..." for the shell to read.
|
|
|
|
* Note that stupid shells (csh) do the wrong thing, and
|
|
|
|
* close all open fd's when the start. That kills this
|
|
|
|
* method of implementing "safe" set-id and x-only scripts.
|
|
|
|
*/
|
1998-03-01 05:20:01 +03:00
|
|
|
vn_lock(epp->ep_vp, LK_EXCLUSIVE | LK_RETRY);
|
2007-12-14 19:48:24 +03:00
|
|
|
error = VOP_ACCESS(epp->ep_vp, VREAD, l->l_cred);
|
2010-06-24 16:58:48 +04:00
|
|
|
VOP_UNLOCK(epp->ep_vp);
|
1996-10-01 03:18:43 +04:00
|
|
|
if (error == EACCES
|
1994-07-24 06:38:20 +04:00
|
|
|
#ifdef SETUIDSCRIPTS
|
|
|
|
|| script_sbits
|
|
|
|
#endif
|
|
|
|
) {
|
1994-01-16 06:09:59 +03:00
|
|
|
struct file *fp;
|
|
|
|
|
2014-06-23 22:06:32 +04:00
|
|
|
KASSERT(!(epp->ep_flags & EXEC_HASFD));
|
1994-01-16 06:09:59 +03:00
|
|
|
|
2008-03-22 00:54:58 +03:00
|
|
|
if ((error = fd_allocfile(&fp, &epp->ep_fd)) != 0) {
|
1997-07-08 06:32:02 +04:00
|
|
|
scriptvp = NULL;
|
|
|
|
shellargp = NULL;
|
1994-02-16 04:21:00 +03:00
|
|
|
goto fail;
|
1997-07-08 06:32:02 +04:00
|
|
|
}
|
1994-01-16 06:09:59 +03:00
|
|
|
epp->ep_flags |= EXEC_HASFD;
|
|
|
|
fp->f_type = DTYPE_VNODE;
|
|
|
|
fp->f_ops = &vnops;
|
2014-09-05 13:20:59 +04:00
|
|
|
fp->f_vnode = epp->ep_vp;
|
1994-01-16 06:09:59 +03:00
|
|
|
fp->f_flag = FREAD;
|
2008-03-22 00:54:58 +03:00
|
|
|
fd_affix(curproc, fp, epp->ep_fd);
|
1994-01-16 06:09:59 +03:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2010-05-02 09:30:20 +04:00
|
|
|
/* set up the fake args list */
|
2008-01-02 22:44:36 +03:00
|
|
|
shellargp_len = 4 * sizeof(*shellargp);
|
|
|
|
shellargp = kmem_alloc(shellargp_len, KM_SLEEP);
|
1994-01-16 06:09:59 +03:00
|
|
|
tmpsap = shellargp;
|
2008-01-02 22:44:36 +03:00
|
|
|
tmpsap->fa_len = shellnamelen + 1;
|
|
|
|
tmpsap->fa_arg = kmem_alloc(tmpsap->fa_len, KM_SLEEP);
|
|
|
|
strlcpy(tmpsap->fa_arg, shellname, tmpsap->fa_len);
|
|
|
|
tmpsap++;
|
1994-01-16 06:09:59 +03:00
|
|
|
if (shellarg != NULL) {
|
2008-01-02 22:44:36 +03:00
|
|
|
tmpsap->fa_len = shellarglen + 1;
|
|
|
|
tmpsap->fa_arg = kmem_alloc(tmpsap->fa_len, KM_SLEEP);
|
|
|
|
strlcpy(tmpsap->fa_arg, shellarg, tmpsap->fa_len);
|
|
|
|
tmpsap++;
|
1994-01-16 06:09:59 +03:00
|
|
|
}
|
2008-01-02 22:44:36 +03:00
|
|
|
tmpsap->fa_len = MAXPATHLEN;
|
|
|
|
tmpsap->fa_arg = kmem_alloc(tmpsap->fa_len, KM_SLEEP);
|
1994-01-16 06:09:59 +03:00
|
|
|
#ifdef FDSCRIPTS
|
|
|
|
if ((epp->ep_flags & EXEC_HASFD) == 0) {
|
|
|
|
#endif
|
|
|
|
/* normally can't fail, but check for it if diagnostic */
|
2010-05-02 09:30:20 +04:00
|
|
|
error = copystr(epp->ep_kname, tmpsap->fa_arg, MAXPATHLEN,
|
2014-06-23 22:06:32 +04:00
|
|
|
NULL);
|
|
|
|
KASSERT(error == 0);
|
2008-01-02 22:44:36 +03:00
|
|
|
tmpsap++;
|
1994-01-16 06:09:59 +03:00
|
|
|
#ifdef FDSCRIPTS
|
2008-01-02 22:44:36 +03:00
|
|
|
} else {
|
|
|
|
snprintf(tmpsap->fa_arg, MAXPATHLEN, "/dev/fd/%d", epp->ep_fd);
|
|
|
|
tmpsap++;
|
|
|
|
}
|
1994-01-16 06:09:59 +03:00
|
|
|
#endif
|
2008-01-02 22:44:36 +03:00
|
|
|
tmpsap->fa_arg = NULL;
|
1994-01-16 06:09:59 +03:00
|
|
|
|
2010-05-02 09:30:20 +04:00
|
|
|
/* Save the old vnode so we can clean it up later. */
|
|
|
|
scriptvp = epp->ep_vp;
|
|
|
|
epp->ep_vp = NULL;
|
|
|
|
|
|
|
|
/* Note that we're trying recursively. */
|
|
|
|
epp->ep_flags |= EXEC_INDIR;
|
|
|
|
|
1994-01-16 06:09:59 +03:00
|
|
|
/*
|
|
|
|
* mark the header we have as invalid; check_exec will read
|
|
|
|
* the header from the new executable
|
|
|
|
*/
|
|
|
|
epp->ep_hdrvalid = 0;
|
|
|
|
|
2010-05-02 09:30:20 +04:00
|
|
|
/* try loading the interpreter */
|
2010-11-19 09:44:33 +03:00
|
|
|
shell_pathbuf = pathbuf_create(shellname);
|
|
|
|
if (shell_pathbuf == NULL) {
|
|
|
|
error = ENOMEM;
|
|
|
|
} else {
|
|
|
|
error = check_exec(l, epp, shell_pathbuf);
|
|
|
|
pathbuf_destroy(shell_pathbuf);
|
|
|
|
}
|
1994-01-16 06:09:59 +03:00
|
|
|
|
2007-04-22 12:29:55 +04:00
|
|
|
/* note that we've clobbered the header */
|
|
|
|
epp->ep_flags |= EXEC_DESTR;
|
2010-05-02 09:30:20 +04:00
|
|
|
|
2007-04-22 12:29:55 +04:00
|
|
|
if (error == 0) {
|
1994-01-16 06:09:59 +03:00
|
|
|
/*
|
|
|
|
* It succeeded. Unlock the script and
|
|
|
|
* close it if we aren't using it any more.
|
1994-02-16 04:21:00 +03:00
|
|
|
* Also, set things up so that the fake args
|
1994-01-16 06:09:59 +03:00
|
|
|
* list will be used.
|
|
|
|
*/
|
1996-10-01 03:18:43 +04:00
|
|
|
if ((epp->ep_flags & EXEC_HASFD) == 0) {
|
1999-02-27 02:38:55 +03:00
|
|
|
vn_lock(scriptvp, LK_EXCLUSIVE | LK_RETRY);
|
2007-11-26 22:01:26 +03:00
|
|
|
VOP_CLOSE(scriptvp, FREAD, l->l_cred);
|
1999-02-27 02:38:55 +03:00
|
|
|
vput(scriptvp);
|
1996-10-01 03:18:43 +04:00
|
|
|
}
|
1994-01-16 06:09:59 +03:00
|
|
|
|
|
|
|
epp->ep_flags |= (EXEC_HASARGL | EXEC_SKIPARG);
|
|
|
|
epp->ep_fa = shellargp;
|
2008-01-02 22:44:36 +03:00
|
|
|
epp->ep_fa_len = shellargp_len;
|
1994-01-16 06:09:59 +03:00
|
|
|
#ifdef SETUIDSCRIPTS
|
|
|
|
/*
|
|
|
|
* set thing up so that set-id scripts will be
|
2007-02-10 00:55:00 +03:00
|
|
|
* handled appropriately. PSL_TRACED will be
|
2001-06-15 21:24:19 +04:00
|
|
|
* checked later when the shell is actually
|
|
|
|
* exec'd.
|
1994-01-16 06:09:59 +03:00
|
|
|
*/
|
|
|
|
epp->ep_vap->va_mode |= script_sbits;
|
1997-05-08 14:19:10 +04:00
|
|
|
if (script_sbits & S_ISUID)
|
1994-01-16 06:09:59 +03:00
|
|
|
epp->ep_vap->va_uid = script_uid;
|
1997-05-08 14:19:10 +04:00
|
|
|
if (script_sbits & S_ISGID)
|
1994-01-16 06:09:59 +03:00
|
|
|
epp->ep_vap->va_gid = script_gid;
|
|
|
|
#endif
|
1994-02-16 04:21:00 +03:00
|
|
|
return (0);
|
|
|
|
}
|
1994-01-16 06:09:59 +03:00
|
|
|
|
1996-02-04 05:15:01 +03:00
|
|
|
#ifdef FDSCRIPTS
|
1994-02-16 04:21:00 +03:00
|
|
|
fail:
|
1996-02-04 05:15:01 +03:00
|
|
|
#endif
|
1994-02-16 04:21:00 +03:00
|
|
|
|
|
|
|
/* kill the opened file descriptor, else close the file */
|
2014-02-17 23:29:46 +04:00
|
|
|
if (epp->ep_flags & EXEC_HASFD) {
|
|
|
|
epp->ep_flags &= ~EXEC_HASFD;
|
|
|
|
fd_close(epp->ep_fd);
|
|
|
|
} else if (scriptvp) {
|
1999-02-27 02:38:55 +03:00
|
|
|
vn_lock(scriptvp, LK_EXCLUSIVE | LK_RETRY);
|
2007-11-26 22:01:26 +03:00
|
|
|
VOP_CLOSE(scriptvp, FREAD, l->l_cred);
|
1999-02-27 02:38:55 +03:00
|
|
|
vput(scriptvp);
|
1996-10-01 03:18:43 +04:00
|
|
|
}
|
1994-02-16 04:21:00 +03:00
|
|
|
|
|
|
|
/* free the fake arg list, because we're not returning it */
|
1997-07-08 06:32:02 +04:00
|
|
|
if ((tmpsap = shellargp) != NULL) {
|
2008-01-02 22:44:36 +03:00
|
|
|
while (tmpsap->fa_arg != NULL) {
|
|
|
|
kmem_free(tmpsap->fa_arg, tmpsap->fa_len);
|
1997-07-08 06:32:02 +04:00
|
|
|
tmpsap++;
|
|
|
|
}
|
2008-01-02 22:44:36 +03:00
|
|
|
kmem_free(shellargp, shellargp_len);
|
1994-01-16 06:09:59 +03:00
|
|
|
}
|
1994-02-16 04:21:00 +03:00
|
|
|
|
2014-02-17 23:29:46 +04:00
|
|
|
/*
|
|
|
|
* free any vmspace-creation commands,
|
|
|
|
* and release their references
|
|
|
|
*/
|
|
|
|
kill_vmcmds(&epp->ep_vmcmds);
|
1994-01-16 06:09:59 +03:00
|
|
|
|
2014-02-17 23:29:46 +04:00
|
|
|
return error;
|
1994-01-16 06:09:59 +03:00
|
|
|
}
|