path args to security guards can be #f

svn: r5821
This commit is contained in:
Eli Barzilay 2007-03-25 02:37:51 +00:00
parent 52a4b0f493
commit 7cdbe98749

View File

@ -94,6 +94,7 @@
(make-security-guard (make-security-guard
orig-security orig-security
(lambda (what path modes) (lambda (what path modes)
(when path
(let ([needed (let loop ([order permission-order]) (let ([needed (let loop ([order permission-order])
(cond [(null? order) (cond [(null? order)
(error 'default-sandbox-guard (error 'default-sandbox-guard
@ -106,7 +107,7 @@
(and (perm<=? needed (car perm)) (and (perm<=? needed (car perm))
(path-ok? bpath (cadr perm)))) (path-ok? bpath (cadr perm))))
(sandbox-path-permissions)) (sandbox-path-permissions))
(error what "file access denied ~a" (cons path modes))))) (error what "file access denied ~a" (cons path modes))))))
(lambda (what . xs) (error what "network access denied: ~e" xs))))) (lambda (what . xs) (error what "network access denied: ~e" xs)))))
(define sandbox-security-guard (make-parameter default-sandbox-guard)) (define sandbox-security-guard (make-parameter default-sandbox-guard))