This is a discussion on Configuring NETSNMP_TEMP_FILE_PATTERN within the SNMP Coders forums, part of the Networking and Network Related category; Is there any way, how to modify NETSNMP_TEMP_FILE_PATTERN without patching net-snmp-config.h.in? Like some well-hidden argument ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
Jan Safranek schrieb:
> 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). The generic approach through configure is something like: ./configure --with-cflags=-DNETSNMP_TEMP_FILE_PATTERN=xxx Not sexy, but powerful. :-) +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 |
|
|||
|
Thomas Anders wrote:
> Jan Safranek schrieb: >> 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). > > The generic approach through configure is something like: > > ./configure --with-cflags=-DNETSNMP_TEMP_FILE_PATTERN=xxx > > Not sexy, but powerful. :-) 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... 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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
2008/7/24 Jan Safranek <jsafrane@redhat.com>:
> 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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|