Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocaml (toplevel) should have a -no-init option #6071

Closed
vicuna opened this issue Jul 9, 2013 · 4 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link

commented Jul 9, 2013

Original bug ID: 6071
Reporter: kaustuv
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2015-12-11T18:25:29Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 4.00.1
Fixed in version: 4.01.1+dev
Category: ~DO NOT USE (was: OCaml general)
Tags: junior_job
Related to: #5232
Monitored by: dsheets @gasche @hcarty

Bug description

Currently if I have a visible .ocamlinit, it is loaded by default. To prevent loading it I have to run ocaml -init /dev/null (or -init some_empty_file).

Can there be a -no-init option to ocaml to avoid such hacks?

File attachments

@vicuna

This comment has been minimized.

Copy link
Author

commented Jul 31, 2013

Comment author: dsheets

Patch attached.

I put the option in lexicographic order rather than next to -init in the help text and modules. Also, I called it "-noinit" to match the other "-no*" flags.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jul 31, 2013

Comment author: @gasche

The code looks good, thanks! I'll wait a bit to see if someone complains, and otherwise probably include it in trunk.

@vicuna

This comment has been minimized.

Copy link
Author

commented Aug 4, 2013

Comment author: @gasche

The patch is now committed in trunk. Thanks!

@vicuna

This comment has been minimized.

Copy link
Author

commented Dec 16, 2013

Comment author: Camarade_Tux

.ocamlinit files in the current directory are pretty much a security issue: the files are not readily visible and can execute any code. Is this behaviour heavily relied on, does it make sense to have it as a dot-file and wouldn't it be better to have -no-init by default with a corresponding -init (or similar) flag?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.