Configuring NETSNMP_TEMP_FILE_PATTERN - SNMP

This is a discussion on Configuring NETSNMP_TEMP_FILE_PATTERN - SNMP ; Is there any way, how to modify NETSNMP_TEMP_FILE_PATTERN without patching net-snmp-config.h.in? Like some well-hidden argument to ../configure or so? I don't like snmptrapd putting files into /tmp (resp. SELinux does not like it, see http://danwalsh.livejournal.com/11467.html ). Jan ------------------------------------------------------------------------- This SF.Net ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Configuring NETSNMP_TEMP_FILE_PATTERN

  1. Configuring NETSNMP_TEMP_FILE_PATTERN

    Is there any way, how to modify NETSNMP_TEMP_FILE_PATTERN without
    patching net-snmp-config.h.in? Like some well-hidden argument to
    ../configure or so? I don't like snmptrapd putting files into /tmp
    (resp. SELinux does not like it, see
    http://danwalsh.livejournal.com/11467.html).

    Jan

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-coders mailing list
    Net-snmp-coders@lists.sourceforge.net
    https://lists.sourceforge.net/lists/...et-snmp-coders


  2. Re: Configuring NETSNMP_TEMP_FILE_PATTERN

    Jan Safranek wrote:
    > I've already tried this, but snmptrapd still creates files in /tmp. And
    > if I patch the net-snmp-config.h.in manually, it creates it wherever I
    > want.
    >
    > There should be some #ifndef NETSNMP_TEMP_FILE_PATTERN in the .h file to
    > make it working...


    You're right. I've realized it myself shortly after hitting 'Send'.
    The "--with-cflags=-D..." approach doesn't work for settings that are unconditionally defined in net-snmp-config.h, unfortunately. I agree there should be a way other than hacking net-snmp-config.h, though.


    +Thomas

    --
    Thomas Anders (thomas.anders at blue-cable.de)

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-coders mailing list
    Net-snmp-coders@lists.sourceforge.net
    https://lists.sourceforge.net/lists/...et-snmp-coders


  3. Re: Configuring NETSNMP_TEMP_FILE_PATTERN

    Thomas Anders wrote:
    > Jan Safranek wrote:
    >> I've already tried this, but snmptrapd still creates files in /tmp. And
    >> if I patch the net-snmp-config.h.in manually, it creates it wherever I
    >> want.
    >>
    >> There should be some #ifndef NETSNMP_TEMP_FILE_PATTERN in the .h file to
    >> make it working...

    >
    > You're right. I've realized it myself shortly after hitting 'Send'.
    > The "--with-cflags=-D..." approach doesn't work for settings that are unconditionally defined in net-snmp-config.h, unfortunately. I agree there should be a way other than hacking net-snmp-config.h, though.


    I checked in to trunk (rev. 17121) new ./configure with
    --with-temp-file-pattern option, which allows users to override the
    default /tmp/snmpdXXXXXX.

    Would anyone mind if I put it also to 5.4.x branch?

    Jan

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-coders mailing list
    Net-snmp-coders@lists.sourceforge.net
    https://lists.sourceforge.net/lists/...et-snmp-coders


  4. Re: Configuring NETSNMP_TEMP_FILE_PATTERN

    2008/7/24 Jan Safranek :
    > I checked in to trunk (rev. 17121) new ./configure with
    > --with-temp-file-pattern option, which allows users to override the
    > default /tmp/snmpdXXXXXX.
    >
    > Would anyone mind if I put it also to 5.4.x branch?


    Seems sensible.
    I've applied this patch to the three active lines,
    since it's a fairly harmless change.

    Dave

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-coders mailing list
    Net-snmp-coders@lists.sourceforge.net
    https://lists.sourceforge.net/lists/...et-snmp-coders


+ Reply to Thread