Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Julien,

On Sat, 2011-04-30 at 16:46 -0700, Julien Chaffraix wrote:
Attached is a patch should solve this.

        Lovely - thanks :-)

Ouch, good catch! Attached is another patch for this.

        Great stuff. Incidentally - best to remove 'PUSHED' from the Subject -
I nearly forgot this - but I've pushed this pair :-)

       Otherwise this is nice :-) It would be sexy to have someone (when this
is all fixed), to isolate and unify all the temp file creation code that
is used all over the place; not all of it is best practise, and there is
a lot of dangerous duplication.

Sounds like a worthy goal, do you have some pointers to areas that
duplicate the code?

        Oh ! sure; so - poking about:

        osl_getTempDirURL - should prolly not exist, and be a:
                rtl::OUString osl_createTempDirectory();

        that gets the permissions right inside sal/osl/ itself - I guess
checking the (only) caller from vcl/

        Then I guess I would git grep for anything that looks like a temp impl.

        ./g grep '"TEMP' eg. shows:

        tools/source/fsys/

        doing some duplicate temp file stuff - probably that code should all be
removed, and all uses audited to check they are safe / sane.

        The easy hacks page has:

tools/source/fsys/tempfile.cxx vs.
unotools/source/ucbhelper/tempfile.cxx - cf. CreateTemplName_Impl vs.
filter/source/placeware/tempfile.cxx etc.

        vs. of course the (right place for it) osl/ version.

        I imagine there is more copy/paste fluff of this sort ;-) The only
trick of course is to ~ignore it in the build code: dmake, rsc, etc. and
clean it up in the runtime code.

        Clearly, we want to be safe creating temp-files, particularly for
document data - so they are only user read/write-able and not visible to
the world :-)

        HTH,

                Michael.

-- 
 michael.meeks@novell.com  <><, Pseudo Engineer, itinerant idiot



Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.