bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue 1281 in lilypond: enhancement: lilypond-book safe mode


From: lilypond
Subject: Issue 1281 in lilypond: enhancement: lilypond-book safe mode
Date: Wed, 29 Sep 2010 07:28:57 +0000

Status: Accepted
Owner: ----
Labels: Type-Enhancement Priority-Medium

New issue 1281 by brownian.box: enhancement: lilypond-book safe mode
http://code.google.com/p/lilypond/issues/detail?id=1281

Reported by Julien Rioux,
http://lists.gnu.org/archive/html/bug-lilypond/2010-09/msg00318.html :

%-----------------8<--------------------------------
Dear list,


This is a feature request for a safe mode for lilypond-book.


One can run lilypond with the -dsafe switch to avoid a security risk when compiling .ly files including evil scheme code. There is no equivalent switch for lilypond-book, and using --process leads to errors.

I'll post below a simple example.


Thanks,
Julien


---------------------------
$ cat docu.lytex
\documentclass{article}
\begin{document}
\begin{lilypond}
{c' d' e'}
\end{lilypond}
\end{document}


$ lilypond-book --process="lilypond -dsafe -dbackend=eps" docu.lytex
lilypond-book (GNU LilyPond) 2.12.3
Reading docu.lytex...
Running latex...This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
restricted \write18 enabled.
entering extended mode
(/tmp/tmpgwVO1K.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh yphenation, french, basque, ngerman, german, german-x-2009-06-19, ngerman-x-200
9-06-19, ukenglish, loaded.

(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo))
No file tmpgwVO1K.aux.
textwidth=345.0pt
columnsep=10.0pt
(./tmpgwVO1K.aux) )
No pages of output.
Transcript written on tmpgwVO1K.log.
Dissecting...
Writing snippets...
Processing...
Running lilypond...GNU LilyPond 2.12.3
Processing `/scratch/examples/Test/snippet-map--1168004333.ly'
Parsing...
/scratch/examples/Test/snippet-map--1168004333.ly:4:1: error: GUILE signaled an error for the expression beginning here
#
(ly:add-file-name-alist '(("d6/lily-79fd5fcc.ly" . "docu.lytex")
Unbound variable: ly:add-file-name-alist
/scratch/examples/Test/snippet-map--1168004333.ly:0: warning: no \version statement found, please add

\version "2.12.3"


for future compatibility
Processing `/scratch/examples/Test/d6/lily-79fd5fcc.ly'
Parsing...
/scratch/examples/Test/d6/lily-79fd5fcc.ly:3:9: error: include files are not allowed in safe mode
\include
"lilypond-book-preamble.ly"
/scratch/examples/Test/d6/lily-79fd5fcc.ly:13:3: error: GUILE signaled an error for the expression beginning here
#
(define dump-extents #t)
Wrong type argument in position 1: #<srcprops ((breakpoint . #f) (line . 40) (column . 7) (filename . "/usr/share/lilypond/2.12.3/ly/music-functions-init.ly"))> /scratch/examples/Test/d6/lily-79fd5fcc.ly:17:22: error: GUILE signaled an error for the expression beginning here
force-assignment = #
""
Wrong type argument in position 1: #<srcprops ((breakpoint . #f) (line . 40) (column . 7) (filename . "/usr/share/lilypond/2.12.3/ly/music-functions-init.ly"))> /scratch/examples/Test/d6/lily-79fd5fcc.ly:18:16: error: GUILE signaled an error for the expression beginning here
line-width = #
(- line-width (* mm 3.000000))
Wrong type argument in position 1: #<srcprops ((breakpoint . #f) (line . 40) (column . 7) (filename . "/usr/share/lilypond/2.12.3/ly/music-functions-init.ly"))> /scratch/examples/Test/d6/lily-79fd5fcc.ly:0: warning: no \version statement found, please add

\version "2.12.3"


for future compatibility
Interpreting music...
Preprocessing graphical objects.../usr/share/lilypond/2.12.3/scm/titling.scm:9:34: In procedure ly:paper-get-number in expression (ly:paper-get-number layout (quote line-width)): /usr/share/lilypond/2.12.3/scm/titling.scm:9:34: Wrong type (expecting real number): #<unspecified> command failed: lilypond -dsafe -dbackend=eps -I "/scratch/examples/Test" --formats=eps -deps-box-padding=3.000000 -dread-file-list -dno-strip-output-dir "/scratch/examples/Test/snippet-names--1168004333.ly"
Child returned 1
%-----------------8<--------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]