Ticket #145: setpag.txt

File setpag.txt, 20.8 KB (added by adehnert, 11 years ago)

setpag discussion

Line 
1Class: [asa-internal] Instance: db Opcode: crypt
2Time: Mon Sep 10 21:55:41 2012 Host: NOVGOROD.MIT.EDU
3From: Alex Dehnert <adehnert>
4
5The current constitution-gatherer is vulnerable to somebody
6supplying, say, /mit/asa-db/.my.cnf and, once the gatherer sticks
7stuff in an asa-internal-readable directory, getting the sql
8password. This seems undesirable. Does getting daemon.asa-db-deputy
9and using Popen("pagsh", "cat", "constitution") seem like a good
10solution to this?
11
12
13Class: [asa-internal] Instance: db Opcode: crypt
14Time: Mon Sep 10 21:56:47 2012 Host: TEAM-ROCKET.MIT.EDU
15From: Wobbuffet! <geofft>
16
17Hrm. Why do you need a separate daemon principal? We don't allow
18non-public automatically-gathered constitutions, do we?
19
20
21Class: [asa-internal] Instance: db Opcode: crypt
22Time: Mon Sep 10 21:57:01 2012 Host: NOVGOROD.MIT.EDU
23From: Alex Dehnert <adehnert>
24
25We do. Or rather, we will.
26
27
28Class: [asa-internal] Instance: db Opcode: crypt
29Time: Mon Sep 10 21:57:02 2012 Host: TEAM-ROCKET.MIT.EDU
30From: Wobbuffet! <geofft>
31
32You should just be able to pagsh and drop privs and do the gathering
33anonymously
34
35
36Class: [asa-internal] Instance: db Opcode: crypt
37Time: Mon Sep 10 21:57:10 2012 Host: TEAM-ROCKET.MIT.EDU
38From: Wobbuffet! <geofft>
39
40Lame.
41
42
43Class: [asa-internal] Instance: db Opcode: crypt
44Time: Mon Sep 10 21:57:25 2012 Host: NOVGOROD.MIT.EDU
45From: Alex Dehnert <adehnert>
46
47See http://asa.scripts.mit.edu/trac/ticket/60.
48
49
50Class: [asa-internal] Instance: db Opcode: crypt
51Time: Mon Sep 10 21:57:32 2012 Host: TEAM-ROCKET.MIT.EDU
52From: Wobbuffet! <geofft>
53
54Is the worry escalation from asa-internal to asa-db?
55
56
57Class: [asa-internal] Instance: db Opcode: crypt
58Time: Mon Sep 10 21:57:37 2012 Host: NOVGOROD.MIT.EDU
59From: Alex Dehnert <adehnert>
60
61There are people who think private constitutions should be a thing.
62
63
64Class: [asa-internal] Instance: db Opcode: crypt
65Time: Mon Sep 10 21:57:56 2012 Host: NOVGOROD.MIT.EDU
66From: Alex Dehnert <adehnert>
67
68Yes (or, rather, -internal to -db-root).
69
70
71Class: [asa-internal] Instance: db Opcode: crypt
72Time: Mon Sep 10 21:58:19 2012 Host: TEAM-ROCKET.MIT.EDU
73From: Wobbuffet! <geofft>
74
75Because it also seems that it's pretty likely that group A can attack
76group B's private constitution by listing it, and then asking the ASA
77DB for a copy of their own constitution, or whatever
78
79
80Class: [asa-internal] Instance: db Opcode: crypt
81Time: Mon Sep 10 21:58:43 2012 Host: TEAM-ROCKET.MIT.EDU
82From: Wobbuffet! <geofft>
83
84What daemon principal do you currently intend to use?
85
86
87Class: [asa-internal] Instance: db Opcode: crypt
88Time: Mon Sep 10 22:01:58 2012 Host: TEAM-ROCKET.MIT.EDU
89From: Wobbuffet! <geofft>
90
91The constraints listed in that ticket don't imply non-public
92_automatically gathered_ constitutions.
93
94
95Class: [asa-internal] Instance: db Opcode: crypt
96Time: Mon Sep 10 22:03:25 2012 Host: NOVGOROD.MIT.EDU
97From: Alex Dehnert <adehnert>
98
99I want to gather all constitutions.
100
101
102Class: [asa-internal] Instance: db Opcode: crypt
103Time: Mon Sep 10 22:04:00 2012 Host: NOVGOROD.MIT.EDU
104From: Alex Dehnert <adehnert>
105
106I was thinking daemon.asa-db-deputy. daemon.asa-db could work, but it
107would some rearchitecting to remove some bits it has.
108
109
110Class: [asa-internal] Instance: db Opcode: crypt
111Time: Mon Sep 10 22:04:14 2012 Host: NOVGOROD.MIT.EDU
112From: Alex Dehnert <adehnert>
113
114I don't intend to make the DB serve up constitutions.
115
116
117Class: [asa-internal] Instance: db Opcode: crypt
118Time: Mon Sep 10 22:04:32 2012 Host: TEAM-ROCKET.MIT.EDU
119From: Wobbuffet! <geofft>
120
121I suspect you are safer deciding that you only want to gather
122publicly-readable constitutions.
123
124
125Class: [asa-internal] Instance: db Opcode: crypt
126Time: Mon Sep 10 22:04:55 2012 Host: TEAM-ROCKET.MIT.EDU
127From: Wobbuffet! <geofft>
128
129In particular, you want to not use something called "-deputy", because
130you'll be tempted to use it for some other purpose
131
132
133Class: [asa-internal] Instance: db Opcode: crypt
134Time: Mon Sep 10 22:05:03 2012 Host: TEAM-ROCKET.MIT.EDU
135From: Wobbuffet! <geofft>
136
137and then you get into the classic UNIX "nobody" account problem
138
139
140Class: [asa-internal] Instance: db Opcode: crypt
141Time: Mon Sep 10 22:05:22 2012 Host: TEAM-ROCKET.MIT.EDU
142From: Wobbuffet! <geofft>
143
144daemon.asa-db-constitution-gatherer would be reasonable, but it seems
145like it's less effort to ...  not.
146
147
148Class: [asa-internal] Instance: db Opcode: crypt
149Time: Mon Sep 10 22:05:23 2012 Host: NOVGOROD.MIT.EDU
150From: Alex Dehnert <adehnert>
151
152I mean, I could grab daemon.asa-db-const or something instead.
153
154
155Class: [asa-internal] Instance: db Opcode: crypt
156Time: Mon Sep 10 22:06:02 2012 Host: BIOHAZARD-CAFE.MIT.EDU
157From: Lemur Rowlands (Please use "it/its/it".) <rowlands>
158
159"nobody" account problem?
160
161
162Class: [asa-internal] Instance: db Opcode: crypt
163Time: Mon Sep 10 22:06:03 2012 Host: NOVGOROD.MIT.EDU
164From: Alex Dehnert <adehnert>
165
166(Using it for other things is not an issue assuming it's used for
167similarly-privileged stuff.)
168
169
170Class: [asa-internal] Instance: db Opcode: crypt
171Time: Mon Sep 10 22:09:40 2012 Host: TEAM-ROCKET.MIT.EDU
172From: Wobbuffet! <geofft>
173
174Lemur: Every single UNIX application has the brilliant idea of "this
175is unprivileged, so it should run as the user named 'nobody'"
176
177
178Class: [asa-internal] Instance: db Opcode: crypt
179Time: Mon Sep 10 22:09:58 2012 Host: TEAM-ROCKET.MIT.EDU
180From: Wobbuffet! <geofft>
181
182The end result is that... any one application can attack any of the
183several other applications that also had the same brilliant idea
184
185
186Class: [asa-internal] Instance: db Opcode: crypt
187Time: Mon Sep 10 22:11:33 2012 Host: BIOHAZARD-CAFE.MIT.EDU
188From: Lemur Rowlands (Please use "it/its/it".) <rowlands>
189
190Ah.
191
192
193Class: [asa-internal] Instance: db Opcode: crypt
194Time: Mon Sep 10 22:12:11 2012 Host: TEAM-ROCKET.MIT.EDU
195From: Wobbuffet! <geofft>
196
197(i.e., if you find a vulnerability in one you can attack the rest,
198which somewhat defeats the point)
199
200
201Class: [asa-internal] Instance: db Opcode: crypt
202Time: Mon Sep 10 22:13:10 2012 Host: NOVGOROD.MIT.EDU
203From: Alex Dehnert <adehnert>
204
205Hmm. I guess ptrace (pre-child restrictions) means you can't even say
206"yeah, they run as the same UID, but own no files".
207
208
209Class: [asa-internal] Instance: db Opcode: crypt
210Time: Mon Sep 10 22:13:28 2012 Host: TEAM-ROCKET.MIT.EDU
211From: Wobbuffet! <geofft>
212
213Yeah
214
215
216Class: [asa-internal] Instance: db Opcode: crypt
217Time: Mon Sep 10 22:46:51 2012 Host: NOVGOROD.MIT.EDU
218From: Alex Dehnert <adehnert>
219
220I think I do want to gather non-public constitutions. I think there
221are going to be enough of them.
222
223
224Class: [asa-internal] Instance: db Opcode: crypt
225Time: Mon Sep 10 22:47:40 2012 Host: NOVGOROD.MIT.EDU
226From: Alex Dehnert <adehnert>
227
228(The plan, FWIW, is to tell people "system:asa-constitution-access
229needs to have access if it's in AFS", so I can rename the principal
230later.)
231
232
233Class: [asa-internal] Instance: db Opcode: crypt
234Time: Mon Sep 10 22:47:50 2012 Host: TEAM-ROCKET.MIT.EDU
235From: Zoobar Foundation for Disciplined Discourse: Supporting the brave minds of the new world order <geofft>
236
237Oh, yeah, I'd assume so
238
239
240Class: [asa-internal] Instance: db Opcode: crypt
241Time: Mon Sep 10 22:48:13 2012 Host: NOVGOROD.MIT.EDU
242From: Alex Dehnert <adehnert>
243
244Err, assume what?
245
246
247Class: [asa-internal] Instance: db Opcode: crypt
248Time: Mon Sep 10 22:48:19 2012 Host: TEAM-ROCKET.MIT.EDU
249From: Zoobar Foundation for Patriotic Learning: Supporting the leading representatives of the counterinsurgency <geofft>
250
251that you were doing that.
252
253
254Class: [asa-internal] Instance: db Opcode: crypt
255Time: Mon Sep 10 22:49:06 2012 Host: NOVGOROD.MIT.EDU
256From: Alex Dehnert <adehnert>
257
258Oh.
259
260Class: [asa-internal] Instance: db Opcode: crypt
261Time: Sat Sep 15 22:51:43 2012 Host: NOVGOROD.MIT.EDU
262From: Alex Dehnert <adehnert>
263
264Yo, anybody want to do some code review?
265
266
267Class: [asa-internal] Instance: db Opcode: crypt
268Time: Sat Sep 15 22:52:51 2012 Host: NOVGOROD.MIT.EDU
269From: Alex Dehnert <adehnert>
270
271(Yes, I think there's one and some variably sized fractional people
272on this class qualified to review DB code, and one of them is me...)
273
274
275Class: [asa-internal] Instance: db Opcode: crypt
276Time: Sat Sep 15 22:55:50 2012 Host: TEAM-ROCKET.MIT.EDU
277From: Zoobar Foundation for Awesome Advocacy: Supporting the leading researchers of the United States <geofft>
278
279Why do I feel like I'm being looked at
280
281
282Class: [asa-internal] Instance: db Opcode: crypt
283Time: Sat Sep 15 22:56:11 2012 Host: TEAM-ROCKET.MIT.EDU
284From: Zoobar Foundation for Ethical Learning: Supporting the loyal representatives of the United States <geofft>
285
286Send me a list of commits or a pull request or something? (-> getting
287laundry, be back in a few minutes)
288
289
290Class: [asa-internal] Instance: db Opcode: crypt
291Time: Sat Sep 15 23:00:39 2012 Host: NOVGOROD.MIT.EDU
292From: Alex Dehnert <adehnert>
293
294/mit/asa/Scripts/django/db2.0/ pag, top two commits
295(08d4fa6744d2785023666d10a1936460811fcdb2 and
296cf4b7f41af8c34c64e5330e7f0e82be75522991d)
297
298
299Class: [asa-internal] Instance: db Opcode: crypt
300Time: Sat Sep 15 23:00:44 2012 Host: NOVGOROD.MIT.EDU
301From: Alex Dehnert <adehnert>
302
303<_< >_>
304
305
306Class: [asa-internal] Instance: db Opcode: crypt
307Time: Sat Sep 15 23:02:59 2012 Host: NOVGOROD.MIT.EDU
308From: Alex Dehnert <adehnert>
309
310It occurs to me that there *are* other people ~qualified --- pweaver
311and kkb, at least? --- but I think you are the only person besides
312Rachel and I to have commits...
313
314
315Class: [asa-internal] Instance: db Opcode: crypt
316Time: Sun Sep 16 00:12:37 2012 Host: TEAM-ROCKET.MIT.EDU
317From: Zoobar Foundation for Patriotic Learning: Supporting the shrewd thinkers of the 21st-century <geofft>
318
319You're going to hate me for this:
320
321team-rocket:/tmp geofft$ cat pagpy
322import os, struct, fcntl
323os.system("tokens")
324fcntl.ioctl(open("/proc/fs/openafs/afs_ioctl"), 0x40084301, struct.pack("lllll", 0, 0, 0, 0, 21));
325os.system("tokens")
326team-rocket:/tmp geofft$ python pagpy
327
328Tokens held by the Cache Manager:
329
330User's (AFS ID 40490) tokens for afs@sipb.mit.edu [Expires Sep 16 17:59]
331User's (AFS ID 40490) tokens for afs@athena.mit.edu [Expires Sep 16 17:59]
332   --End of list--
333
334Tokens held by the Cache Manager:
335
336   --End of list--
337
338
339Class: [asa-internal] Instance: db Opcode: crypt
340Time: Sun Sep 16 00:17:39 2012 Host: TEAM-ROCKET.MIT.EDU
341From: Zoobar Foundation for Sensible Discourse: Supporting the brightest students of the information superhighway <geofft>
342
343I, uh, think it's actually safer than pagsh, having looked at pagsh's
344code.
345
346
347Class: [asa-internal] Instance: db Opcode: crypt
348Time: Sun Sep 16 00:22:38 2012 Host: NOVGOROD.MIT.EDU
349From: Alex Dehnert <adehnert>
350
351Does that... let you change your PAG using an ioctl?
352
353
354Class: [asa-internal] Instance: db Opcode: crypt
355Time: Sun Sep 16 00:22:44 2012 Host: TEAM-ROCKET.MIT.EDU
356From: Zoobar Foundation for Disciplined Research: Supporting the leading advocates of the new world order <geofft>
357
358Yes.
359
360
361Class: [asa-internal] Instance: db Opcode: crypt
362Time: Sun Sep 16 00:23:00 2012 Host: NOVGOROD.MIT.EDU
363From: Alex Dehnert <adehnert>
364
365Oh, it lets you drop your PAG using an ioctl. Can you get it back?
366
367
368Class: [asa-internal] Instance: db Opcode: crypt
369Time: Sun Sep 16 00:23:17 2012 Host: NOVGOROD.MIT.EDU
370From: Alex Dehnert <adehnert>
371
372(AFZ dinner.)
373
374
375Class: [asa-internal] Instance: db Opcode: crypt
376Time: Sun Sep 16 00:23:20 2012 Host: TEAM-ROCKET.MIT.EDU
377From: Zoobar Foundation for Awesome Learning: Supporting the leading soldiers of the counterinsurgency <geofft>
378
379No, it's just the setpag() ~system call.
380
381
382Class: [asa-internal] Instance: db Opcode: crypt
383Time: Sun Sep 16 00:23:37 2012 Host: TEAM-ROCKET.MIT.EDU
384From: Zoobar Foundation for Sustainable Policy: Supporting the leading soldiers of the next generation <geofft>
385
386pagsh boils down to
387proc_afs_syscall(AFSCALL_SETPAG,0,0,0,0,&errcode);
388exec(some mangling of argv);
389
390
391Class: [asa-internal] Instance: db Opcode: crypt
392Time: Sun Sep 16 00:25:50 2012 Host: TEAM-ROCKET.MIT.EDU
393From: Zoobar Foundation for Objective Dialogue: Supporting the important researchers of the next generation <geofft>
394
395Well, I guess it has some fallbacks past proc_afs_syscall: on Linux,
396it used to use an actual syscall named afs_syscall (which is reserved
397by Linux proper), but apparently sketching on Linux's syscall tables
398became hard, so the preferred implementation is to use an ioctl on
399that proc node. It does fall back to syscall(AFS_SYSCALL,
400AFSCALL_SETPAG) eventually, but that doesn't work on at least the
401machine I'm on
402
403
404Class: [asa-internal] Instance: db Opcode: crypt
405Time: Sun Sep 16 00:26:33 2012 Host: TEAM-ROCKET.MIT.EDU
406From: Zoobar Foundation for Patriotic Dialogue: Supporting the best minds of the next generation <geofft>
407
408Anyway, I'm not sure why you're asking "can you get it back" -- you
409really want to have Python fork and do this, because you don't want to
410change the running pag of the DB itself...
411
412
413Class: [asa-internal] Instance: db Opcode: crypt
414Time: Sun Sep 16 00:30:09 2012 Host: TEAM-ROCKET.MIT.EDU
415From: Zoobar Foundation for Ethical Discourse: Supporting the best researchers of the 21st-century <geofft>
416
417Apparently there's another AFS syscall that lets you restore pags. Hrm
418
419
420Class: [asa-internal] Instance: db Opcode: crypt
421Time: Sun Sep 16 00:35:47 2012 Host: TEAM-ROCKET.MIT.EDU
422From: Zoobar Foundation for Trustworthy Thinking: Supporting the important soldiers of the information superhighway <geofft>
423
424Your code itself looks sane. pagsh on the other hand not so much.
425
426
427Class: [asa-internal] Instance: db Opcode: crypt
428Time: Sun Sep 16 01:27:02 2012 Host: NOVGOROD.MIT.EDU
429From: Alex Dehnert <adehnert>
430
431Yeah, I'm not really a fan of pagsh. Though, the code itself doesn't
432look *that* bad? Though I'll admit to being rather confused by the
433getuid/setuid bit and why it is using getpwuid() and such. I'm not
434really sure that running some other Python script that does much the
435same thing but nobody else wants to maintain is really an improvement.
436
437
438Class: [asa-internal] Instance: db Opcode: crypt
439Time: Sun Sep 16 01:28:58 2012 Host: NOVGOROD.MIT.EDU
440From: Alex Dehnert <adehnert>
441
442I really don't get why pagexec isn't a thing, but...
443
444
445Class: [asa-internal] Instance: db Opcode: crypt
446Time: Sun Sep 16 01:44:01 2012 Host: TEAM-ROCKET.MIT.EDU
447From: Zoobar Foundation for Awesome Advocacy: Supporting the brave students of the information superhighway <geofft>
448
449Well, my point is that it's one line of python, and you're guaranteed
450ABI stability for a long while to come.
451
452
453Class: [asa-internal] Instance: db Opcode: crypt
454Time: Sun Sep 16 02:25:24 2012 Host: NOVGOROD.MIT.EDU
455From: Alex Dehnert <adehnert>
456
457I guess I could... open a pipe, fork, do the ioctl, aklog (once that
458becomes useful), and copy the file over the pipe?
459
460Really, I think I'm partially sad about the prospect of killing off
461this cleverness... <_< >_>
462
463
464Class: [asa-internal] Instance: db Opcode: crypt
465Time: Sun Sep 16 02:44:42 2012 Host: TEAM-ROCKET.MIT.EDU
466From: Zoobar Foundation for Inquisitive Dialogue: Supporting the foremost representatives of the next generation <geofft>
467
468You might find multiprocessing more palatable than forking and piping
469yourself:
470
471>>> import os, struct, fcntl, multiprocessing
472>>> def setpag():
473...     fcntl.ioctl(open("/proc/fs/openafs/afs_ioctl"), 0x40084301, struct.pack("lllll", 0, 0, 0, 0, 21))
474...
475>>> def pagopen(file, queue):
476...     setpag()
477...     queue.put(open(file).read())
478...
479>>> p = multiprocessing.Process(target=pagopen, args=("/etc/mailname", q))
480>>> p.run()
481>>> q.get()
482'team-rocket.mit.edu\n'
483>>> p = multiprocessing.Process(target=pagopen, args=("/mit/geofft/.my.cnf", q))
484>>> p.run()
485Traceback (most recent call last):
486  File "<stdin>", line 1, in <module>
487  File "/usr/lib/python2.6/multiprocessing/process.py", line 88, in run
488    self._target(*self._args, **self._kwargs)
489  File "<stdin>", line 3, in pagopen
490IOError: [Errno 13] Permission denied: '/mit/geofft/.my.cnf'
491
492
493Class: [asa-internal] Instance: db Opcode: crypt
494Time: Sun Sep 16 02:46:20 2012 Host: TEAM-ROCKET.MIT.EDU
495From: Zoobar Foundation for Vigilant Dialogue: Supporting the proven minds of the 21st-century <geofft>
496
497Sadly, it appears you can't proxy the file object itself with the
498batteries that are included, and I didn't feel like writing a proxy.
499You might be able to persuade me to.
500
501
502Class: [asa-internal] Instance: db Opcode: crypt
503Time: Sun Sep 16 02:46:35 2012 Host: TEAM-ROCKET.MIT.EDU
504From: Zoobar Foundation for Principled Policy: Supporting the brightest advocates of the counterinsurgency <geofft>
505
506I do agree that one way or another this is useful functionality that
507should live in the mit module.
508
509
510Class: [asa-internal] Instance: db Opcode: crypt
511Time: Sun Sep 16 02:52:08 2012 Host: NOVGOROD.MIT.EDU
512From: Alex Dehnert <adehnert>
513
514Does multiprocessing useprocesses, not threads? (Is a PAG
515per-process, not per-thread?)
516
517
518Class: [asa-internal] Instance: db Opcode: crypt
519Time: Sun Sep 16 02:52:46 2012 Host: TEAM-ROCKET.MIT.EDU
520From: Zoobar Foundation for Sustainable Thinking: Supporting the skillful minds of the information superhighway <geofft>
521
522Multiprocessing uses processes. PAGs are per-thread, nonetheless.
523
524
525Class: [asa-internal] Instance: db Opcode: crypt
526Time: Sun Sep 16 02:52:54 2012 Host: NOVGOROD.MIT.EDU
527From: Alex Dehnert <adehnert>
528
529Ah, that does look better.
530
531
532Class: [asa-internal] Instance: db Opcode: crypt
533Time: Sun Sep 16 02:53:37 2012 Host: TEAM-ROCKET.MIT.EDU
534From: Zoobar Foundation for Patriotic Advocacy: Supporting the meritorious soldiers of the counterinsurgency <geofft>
535
536You could use the threading module, but my understanding is that it's
537more annoying. The multiprocessing module docs imply the GIL gets in
538your way for _actual_ parallelism, which is irrelevant here
539
540
541Class: [asa-internal] Instance: db Opcode: crypt
542Time: Sun Sep 16 02:54:00 2012 Host: NOVGOROD.MIT.EDU
543From: Alex Dehnert <adehnert>
544
545I vaguely wonder if I want an mit.afs...
546
547
548Class: [asa-internal] Instance: db Opcode: crypt
549Time: Sun Sep 16 02:54:03 2012 Host: TEAM-ROCKET.MIT.EDU
550From: Zoobar Foundation for Patriotic Policy: Supporting the skillful advocates of the United States <geofft>
551
552Oh hrm, given that threads share FDs...
553
554
555Class: [asa-internal] Instance: db Opcode: crypt
556Time: Sun Sep 16 02:54:31 2012 Host: NOVGOROD.MIT.EDU
557From: Alex Dehnert <adehnert>
558
559This thing is going to be full of awesome quasi-hacks, isn't it...
560
561
562Class: [asa-internal] Instance: db Opcode: crypt
563Time: Sun Sep 16 03:01:31 2012 Host: TEAM-ROCKET.MIT.EDU
564From: Zoobar Foundation for Ethical Advocacy: Supporting the brightest minds of the counterinsurgency <geofft>
565
566Yeah, this Just Works.
567
568>>> def pagopen(file):
569...     setpag()
570...     l.append(open(file))
571...
572>>> t = threading.Thread(target=pagopen, args=("/etc/mailname",))
573>>> t.start()
574>>> t.join()
575>>> l
576[<open file '/etc/mailname', mode 'r' at 0x7f65fb692270>]
577>>> l[0].read()
578'team-rocket.mit.edu\n'
579>>> t = threading.Thread(target=pagopen, args=("/mit/geofft/.my.cnf",))
580>>> t.start()
581>>> Exception in thread Thread-3:
582Traceback (most recent call last):
583  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
584    self.run()
585  File "/usr/lib/python2.6/threading.py", line 484, in run
586    self.__target(*self.__args, **self.__kwargs)
587  File "<stdin>", line 3, in pagopen
588IOError: [Errno 13] Permission denied: '/mit/geofft/.my.cnf'
589
590
591Class: [asa-internal] Instance: db Opcode: crypt
592Time: Sun Sep 16 03:02:43 2012 Host: TEAM-ROCKET.MIT.EDU
593From: Zoobar Foundation for Inquisitive Learning: Supporting the meritorious thinkers of the 21st-century <geofft>
594
595Oh, there's an
596>>> l = []
597at the top
598
599
600Class: [asa-internal] Instance: db Opcode: crypt
601Time: Sun Sep 16 03:04:08 2012 Host: TEAM-ROCKET.MIT.EDU
602From: Zoobar Foundation for Responsible Policy: Supporting the shrewd students of the counterinsurgency <geofft>
603
604You may want to do something like
605try:
606    l.append((True, open(file)))
607except Exception as e:
608    l.append((False, e))
609
610and then something like
611   if l[0][0]:
612      return l[0][1]
613   else:
614      raise l[0][1]
615
616
617Class: [asa-internal] Instance: db Opcode: crypt
618Time: Sun Sep 16 03:07:26 2012 Host: NOVGOROD.MIT.EDU
619From: Alex Dehnert <adehnert>
620
621Want to go put this into the DB code, either based on the
622scripts-db2.0/pag branch or on origin/master?
623
624
625Class: [asa-internal] Instance: db Opcode: crypt
626Time: Sun Sep 16 03:09:29 2012 Host: TEAM-ROCKET.MIT.EDU
627From: Zoobar Foundation for Ethical Dialogue: Supporting the foremost students of the United States <geofft>
628
629I mean, honestly, the pagsh solution seems fine to me, this was just
630curiosity. :)
631
632
633Class: [asa-internal] Instance: db Opcode: crypt
634Time: Sun Sep 16 03:47:35 2012 Host: NOVGOROD.MIT.EDU
635From: Alex Dehnert <adehnert>
636
637I'm conflicted. This solution is so cute/elegant...