summaryrefslogtreecommitdiff
path: root/sys/lib/libsa/exec.c
diff options
context:
space:
mode:
authorTobias Weingartner <weingart@cvs.openbsd.org>1997-09-28 22:46:03 +0000
committerTobias Weingartner <weingart@cvs.openbsd.org>1997-09-28 22:46:03 +0000
commit1a53fa0d312417db8d3f384adf6a1fcb7e4a604d (patch)
tree299c65781ea92696c997ac483c5914b0e14773fc /sys/lib/libsa/exec.c
parent23376d0a8b9d0937f2335dd9f74343f696530d9b (diff)
Kill non-secure blip.
Diffstat (limited to 'sys/lib/libsa/exec.c')
-rw-r--r--sys/lib/libsa/exec.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/lib/libsa/exec.c b/sys/lib/libsa/exec.c
index 6b02d9f5657..9d769d496a9 100644
--- a/sys/lib/libsa/exec.c
+++ b/sys/lib/libsa/exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.17 1997/04/11 19:17:03 weingart Exp $ */
+/* $OpenBSD: exec.c,v 1.18 1997/09/28 22:46:02 weingart Exp $ */
/* $NetBSD: exec.c,v 1.15 1996/10/13 02:29:01 christos Exp $ */
/*-
@@ -68,15 +68,9 @@ exec(path, loadaddr, howto)
if (io < 0)
return;
-#ifndef INSECURE
(void) fstat(io, &sb);
- if (sb.st_uid || (sb.st_mode & 2)) {
- printf("non-secure file, will not load\n");
- close(io);
- errno = EPERM;
- return;
- }
-#endif
+ if (sb.st_mode & 2)
+ printf("non-secure file, check permissions!\n");
i = read(io, (char *)&x, sizeof(x));
if (i != sizeof(x) ||