I just ran into this as well. The following patch, in the style
of how unsetenv() is handled in LPRng and ifhp.c, will fix it.
- todd
--- src/monitor.c.DIST Sat Oct 14 15:37:18 2000
+++ src/monitor.c Fri Oct 20 12:27:29 2000
@@ -57,7 +57,16 @@
/* make sure that the NSLPATH cannot be use to compromisze root
* run executables
*/
- if( getuid() == 0 || geteuid() == 0) unsetenv("NLSPATH");
+ if( getuid() == 0 || geteuid() == 0)
+#if defined(HAVE_UNSETENV)
+ unsetenv("NLSPATH");
+#elif defined(HAVE_SETENV)
+ setenv("NLSPATH","",1);
+#elif defined(HAVE_PUTENV)
+ putenv("NLSPATH=");
+#else
+#error need to have one of unsetenv(), setenv(), or putenv()
+#endif
if( argc != 2 ){
FPRINTF(STDERR, "usage: monitor port\n" );
--- src/textps.c.DIST Sat Oct 14 15:37:18 2000
+++ src/textps.c Fri Oct 20 12:27:38 2000
@@ -260,7 +260,16 @@
/* make sure that the NSLPATH cannot be use to compromisze root
* run executables
*/
- if( getuid() == 0 || geteuid() == 0) unsetenv("NLSPATH");
+ if( getuid() == 0 || geteuid() == 0)
+#if defined(HAVE_UNSETENV)
+ unsetenv("NLSPATH");
+#elif defined(HAVE_SETENV)
+ setenv("NLSPATH","",1);
+#elif defined(HAVE_PUTENV)
+ putenv("NLSPATH=");
+#else
+#error need to have one of unsetenv(), setenv(), or putenv()
+#endif
if( (s = strrchr( prog, '/' )) ){
++s;
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------