Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F158198020
D16565.id46179.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
646 B
Referenced Files
None
Subscribers
None
D16565.id46179.diff
View Options
Index: sbin/init/init.c
===================================================================
--- sbin/init/init.c
+++ sbin/init/init.c
@@ -1086,6 +1086,17 @@
#ifdef LOGIN_CAP
setprocresources(RESOURCE_RC);
#endif
+
+ /*
+ * Try to directly execute the script first. If it
+ * fails, try the old method of passing the script path
+ * to sh(1). Don't complain if it fails because of
+ * the missing execute bit.
+ */
+ execv(script, argv + 1);
+ if (errno != EACCES)
+ warning("can't exec %s: %m", script);
+
execv(shell, argv);
stall("can't exec %s for %s: %m", shell, script);
_exit(1); /* force single user mode */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 30, 4:38 PM (15 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33637115
Default Alt Text
D16565.id46179.diff (646 B)
Attached To
Mode
D16565: Make it possible for init to execute any executable
Attached
Detach File
Event Timeline
Log In to Comment