Re: [Python-Dev] [Python-3000] Issues with PEP 3101 (string formatting)

2007-06-23 Thread Talin
I haven't responded to this thread because I was hoping some of the original proponents of the feature would come out to defend it. (Remember, 3101 is a synthesis of a lot of people's ideas gleaned from many forum postings - In some cases I am willing to defend particular aspects of the PEP, an

[Python-Dev] Summary of Tracker Issues

2007-06-23 Thread Tracker
ACTIVITY SUMMARY (06/17/07 - 06/24/07) Tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue number. Do NOT respond to this message. 1645 open ( +0) / 8584 closed ( +0) / 10229 total ( +0) Average duration of open issues: 836 days. Medi

Re: [Python-Dev] Proposal for a new function "open_noinherit" to avoid problems with subprocesses and security risks

2007-06-23 Thread Martin v. Löwis
> I think the complaint is not so much about simplicity, but correctness. > close_fd also closes stdin/stdout/stderr, which might be undesirable > and differs from POSIX. > > > According to the docs, stdin/stdout and stderr are not closed ( > http://docs.python.org/lib/node529.html)

Re: [Python-Dev] Proposal for a new function "open_noinherit" to avoid problems with subprocesses and security risks

2007-06-23 Thread Matthieu Brucher
Hi, I think the complaint is not so much about simplicity, but correctness. close_fd also closes stdin/stdout/stderr, which might be undesirable and differs from POSIX. According to the docs, stdin/stdout and stderr are not closed ( http://docs.python.org/lib/node529.html) Matthieu ___

Re: [Python-Dev] Proposal for a new function "open_noinherit" to avoid problems with subprocesses and security risks

2007-06-23 Thread Martin v. Löwis
> One fix is to always use subprocess.Popen and specify that > close_fd=True, which wasn't difficult for me, but I can imagine that > an easy way to set close-on-exec would be simpler in other cases. I think the complaint is not so much about simplicity, but correctness. close_fd also closes stdin

Re: [Python-Dev] Proposal for a new function "open_noinherit" to avoid problems with subprocesses and security risks

2007-06-23 Thread A.M. Kuchling
On Sat, Jun 23, 2007 at 08:39:38AM -0700, Stephen Hansen wrote: > I just wanted to express to the group at large that these experiences aren't > just Henning's; we spent a *tremendous* amount of time and effort debugging > serious problems that arose from file handles getting shared to subprocesses

Re: [Python-Dev] Proposal for a new function "open_noinherit" to avoid problems with subprocesses and security risks

2007-06-23 Thread Martin v. Löwis
> As you can see, at the C level, basically "fopen" is "open" with a > little code around it to parse flags etc. It's the same kind of hackish code. "little code" is quite an understatement. In Microsoft's C library (which we would have to emulate), the argument parsing of fopen is 120 lines of co

Re: [Python-Dev] Proposal for a new function "open_noinherit" to avoid problems with subprocesses and security risks

2007-06-23 Thread Henning von Bargen
Stephen, thank you for speaking it out loud on python-dev. And you know better english words like "tremendous" and "obtuse" (whatever that means:-) that express what a PITA this really is. When I said it took me two weeks, that's actually not the truth. It was even more. The first problem was wit

Re: [Python-Dev] Proposal for a new function "open_noinherit" to avoid problems with subprocesses and security risks

2007-06-23 Thread Stephen Hansen
The kind of errors I mentioned ("permission denied" errors that seem to occur without an obvious reason) have cost me at least two weeks of debugging the hard way (with ProcessExplorer etc) and caused my manager to loose his trust in Python at all... I think it is well worth the effort to keep th

Re: [Python-Dev] Proposal for a new function "open_noinherit" to avoid problems with subprocesses and security risks

2007-06-23 Thread Henning von Bargen
> "Martin v. Löwis" wrote: >> Yes, I have a patch implemented in pure Python. >> >> I got the code on my workplace PC (now I am writing from home, >> that's why I said I'll post the code later). >> >> The patch uses os.fdopen ( os.open (..., ...), ...). >> It translates IOError into OSError then

Re: [Python-Dev] bzr on dinsdale

2007-06-23 Thread Martin v. Löwis
> Bzr allow kind changes only starting from version 0.15, for old versions > you should first remove file from version control with 'bzr rm' and then > add again with 'bzr add'. Thanks! that worked fine. Regards, Martin ___ Python-Dev mailing list Pyth

Re: [Python-Dev] bzr on dinsdale

2007-06-23 Thread Dmitry Vasiliev
Martin v. Löwis wrote: > If I do "bzr status" in dinsdale:/etc/apache2, I get > > BzrCheckError: Internal check failed: file u'/etc/init.d/stop-bootlogd' > entered as kind 'symlink' id > 'stopbootlogd-20070303140018-fe340b888f6e9c69', now of kind 'file' > > bzr 0.11.0 on python 2.4.4.final.0 (lin

Re: [Python-Dev] Proposal for a new function "open_noinherit" to avoid problems with subprocesses and security risks

2007-06-23 Thread Martin v. Löwis
> Yes, I have a patch implemented in pure Python. > > I got the code on my workplace PC (now I am writing from home, > that's why I said I'll post the code later). > > The patch uses os.fdopen ( os.open (..., ...), ...). > It translates IOError into OSError then to raise the same class > of excep

Re: [Python-Dev] Proposal for a new function "open_noinherit" to avoid problems with subprocesses and security risks

2007-06-23 Thread Henning von Bargen
""" OT: Argh - my email address is visible in the posting - I am doomed! """ - Original Message - > Martin v. Löwis wrote: > > Do you have a patch implementing that feature? I believe > it's unimplementable in Python 2.x: open() is mapped > to fopen(), which does not support O_NOINHERIT.

[Python-Dev] bzr on dinsdale

2007-06-23 Thread Martin v. Löwis
If I do "bzr status" in dinsdale:/etc/apache2, I get bzr: ERROR: bzrlib.errors.BzrCheckError: Internal check failed: file u'/etc/init.d/stop-bootlogd' entered as kind 'symlink' id 'stopbootlogd-20070303140018-fe340b888f6e9c69', now of kind 'file' Traceback (most recent call last): File "/usr/li