components/ksh93/patches/020-CR6919590.patch
author Norm Jacobs <Norm.Jacobs@Oracle.COM>
Mon, 27 Apr 2015 10:19:50 -0500
changeset 4196 d697072a92f5
parent 789 components/ksh93/patches/CR6919590.patch@5f074ca23733
permissions -rw-r--r--
19782029 userland should be able to build from SCM repositories

--- a/src/cmd/ksh93/sh/args.c	Thu Sep  2 22:38:27 2010
+++ b/src/cmd/ksh93/sh/args.c	Tue Sep 27 10:48:45 2011
@@ -26,6 +26,9 @@
  * AT&T Labs
  *
  */
+/*
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+ */
 
 #include	"defs.h"
 #include	"path.h"
@@ -302,6 +305,11 @@
 		}
 		else
 		{
+			if ((o == SH_RESTRICTED) &&
+			    sh_isoption(SH_RESTRICTED)) {
+				errormsg(SH_DICT, ERROR_exit(1),
+				    e_restricted, "r");
+			}
 			if(o==SH_XTRACE)
 				trace = 0;
 			off_option(&newflags,o);