fixes for tight-security guard

svn: r838
This commit is contained in:
Eli Barzilay 2005-09-12 16:51:25 +00:00
parent 8ebf009e18
commit 57e6e0c2b5

View File

@ -139,7 +139,9 @@
(string-append (string-append
"^(?:" "^(?:"
(apply string-append (apply string-append
(cdr (apply append (map (lambda (p) (list "|" (regexp-quote p))) (cdr (apply append
(map (lambda (p)
(list "|" (regexp-quote (path->string p))))
(current-library-collection-paths))))) (current-library-collection-paths)))))
")(?:/|$)"))) ")(?:/|$)")))
@ -150,7 +152,7 @@
(when (or (memq 'write modes) (when (or (memq 'write modes)
(memq 'execute modes) (memq 'execute modes)
(memq 'delete modes) (memq 'delete modes)
(not (regexp-match ok-path-re (path->string path)))) (and path (not (regexp-match ok-path-re (path->string path)))))
(error what "file access denied (~a)" path))) (error what "file access denied (~a)" path)))
(lambda (what host port mode) (error what "network access denied")))) (lambda (what host port mode) (error what "network access denied"))))