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

Optional parameters for Gurobi #14566

Closed
nathanncohen mannequin opened this issue May 11, 2013 · 13 comments
Closed

Optional parameters for Gurobi #14566

nathanncohen mannequin opened this issue May 11, 2013 · 13 comments

Comments

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented May 11, 2013

Optional parameters for Gurobi !

Nathann

Component: linear programming

Author: Nathann Cohen

Reviewer: Volker Braun

Merged: sage-5.10.beta3

Issue created by migration from https://trac.sagemath.org/ticket/14566

@nathanncohen nathanncohen mannequin added this to the sage-5.10 milestone May 11, 2013
@nathanncohen nathanncohen mannequin self-assigned this May 11, 2013
@nathanncohen nathanncohen mannequin added the s: needs review label May 11, 2013
@vbraun
Copy link
Member

vbraun commented May 11, 2013

comment:2

Can you use sage.misc.temporary_file.tmp_filename for temporary files? Hardcoding a file in a publicly-writeable directory is almost always a security hole:

  sage: p.solver_parameter("LogFile", "/tmp/logfile.log")   # optional - Gurobi 

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented May 11, 2013

comment:3

Hmmmmm... It's really just a doctest, and nothing is actually written there. I don't even have to put a path that makes sense.

Nathann

@vbraun
Copy link
Member

vbraun commented May 11, 2013

comment:4

If you just want a nonsensical path then use something like /dev/null. The examples should demonstrate best practices, not how to shoot yourself into your foot if you follow them.

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented May 11, 2013

comment:5

O_o

I am totally free to write something to "/tmp/log" on my own computer, am I ? I often do that ! O_o

Nathann

@vbraun
Copy link
Member

vbraun commented May 11, 2013

comment:6

Thats fine if you do it on your own personal computer, but if you do it on a multiuser system then some sneaky guy might have created a symlink /tmp/log -> /home/ncohen/important_file before you write to it....

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented May 11, 2013

comment:7

Oh. I hadn't thought of that O_o

Fixed !

Nathann

@vbraun
Copy link
Member

vbraun commented May 11, 2013

comment:8

Attachment: trac_14566.patch.gz

Looks good to me

I noticed that #12973 is languishing, maybe you want to pick that one up? ;-)

@vbraun
Copy link
Member

vbraun commented May 11, 2013

Reviewer: Volker Braun

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented May 11, 2013

comment:9

What the hell is wrong with #12973 ? Looks like I set my name as the author but I was not the one who wrote the original patch. Even though both files have been uploaded by me O_o

Nathann

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented May 11, 2013

comment:10

Looks like I did some modifications to the author's patch, then uploaded a short reviewer's patch. I just set the names right, and checked that it still applies on the current dev version. If you have a couple of minutes to waste, would you be willing to give it a final check ? Looks like this patch would have been forgotten forever if not for you ^^;

Nathann

@vbraun
Copy link
Member

vbraun commented May 11, 2013

comment:11

This ticket conflicts with #12973 (fuzz 2)

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented May 11, 2013

comment:12

I rebased #12973 !

Nathann

@jdemeyer
Copy link

Merged: sage-5.10.beta3

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