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
Closed

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

vicuna opened this issue Jul 9, 2013 · 4 comments

Comments

@vicuna
Copy link

vicuna 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
Copy link
Author

vicuna 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
Copy link
Author

vicuna 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
Copy link
Author

vicuna commented Aug 4, 2013

Comment author: @gasche

The patch is now committed in trunk. Thanks!

@vicuna
Copy link
Author

vicuna 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
Projects
None yet
Development

No branches or pull requests

2 participants