Date: Thu, 3 Apr 1997 20:17:13 -0800 (PST) From: David Greenman <davidg> To: CVS-committers, cvs-all, cvs-sys Subject: cvs commit: src/sys/kern kern_exec.c Message-ID: <199704040417.UAA13431@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
davidg 97/04/03 20:17:12
Modified: sys/kern kern_exec.c
Log:
Various fixes:
1. imgp->image_header needs to be cleared for the bp == NULL && `goto
interpret' case, else exec_fail_dealloc would free it twice after
an error.
2. Moved the vp->v_writecount check in exec_check_permissions() to
near the end. This fixes execve("/dev/null", ...) returning the
bogus errno ETXTBSY. ETXTBSY is still returned for attempts to
exec interpreted files that are open for writing. The man page
is very old and wrong here. It says that ETXTBSY is for pure
procedure (shared text) files that are open for writing or reading.
3. Moved the setuid disabling in exec_check_permissions() to the end.
Cosmetic. It's more natural to dispose of all the error cases
first.
...plus a couple of other cosmetic changes.
Submitted by: bde
Revision Changes Path
1.55 +21 -22 src/sys/kern/kern_exec.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704040417.UAA13431>
