This file is enable.def, from which is created enable.c.
It implements the builtin "enable" in Bash.
-Copyright (C) 1987, 1989, 1991 Free Software Foundation, Inc.
+Copyright (C) 1987-2002 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* Restricted shells cannot load new builtins. */
if (restricted && (flags & (FFLAG|DFLAG)))
{
- builtin_error ("restricted");
+ sh_restricted ((char *)NULL);
return (EXECUTION_FAILURE);
}
#endif
if (disable_p)
b->flags &= ~BUILTIN_ENABLED;
+#if defined (RESTRICTED_SHELL)
+ else if (restricted && ((b->flags & BUILTIN_ENABLED) == 0))
+ {
+ sh_restricted ((char *)NULL);
+ return (EXECUTION_FAILURE);
+ }
+#endif
else
b->flags |= BUILTIN_ENABLED;
using it drops to zero. */
if (ref == 1 && local_dlclose (handle) != 0)
{
- builtin_error ("cannot delete %s: %s", name, dlerror ());
+ builtin_error ("%s: cannot delete: %s", name, dlerror ());
return (EXECUTION_FAILURE);
}