Boost logo

Boost-Build :

Subject: [Boost-build] security: install rule links target in destination?
From: Roman Neuhauser (neuhauser+boost-build_at_[hidden])
Date: 2009-12-23 13:07:58


Hello,

learning Boost.Build, I have the following simple Jamroot:

project maildirs
    : default-build release
;

install install
    : maildirs
    : <location>/usr/local/bin
;

exe maildirs
    : maildirs.cpp bfs
    : <include>/usr/local/include
;

lib bfs
    :
    : <name>boost_filesystem
    : <search>/usr/local/lib
;

Running "bjam install" with insufficient privileges revealed interesting
behavior: it appears bjam runs ld on /usr/local/bin/maildirs:

gcc.link /usr/local/bin/maildirs
/usr/bin/ld: cannot open output file /usr/local/bin/maildirs: Permission denied

    "g++" -L"/usr/local/lib" -Wl,-rpath-link -Wl,"/usr/local/lib" -o "/usr/local/bin/maildirs" -Wl,--start-group "bin/gcc-4.2.1/release/maildirs.o" -Wl,-Bstatic -Wl,-Bdynamic -lboost_filesystem -Wl,--end-group -Wl,--strip-all

...failed gcc.link /usr/local/bin/maildirs...

Security-wise, this is really undesirable. The install stage must not
do more than copy files. Am I doing something wrong in the Jamroot, or
is this "normal"? Either way, how can I achieve the desired behavior?

TIA

-- 
Roman Neuhauser

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk