jvdias 86b663
--- at-3.1.8/at.1.in.fix_no_export	2004-10-05 13:34:39.524060000 -0400
jvdias 86b663
+++ at-3.1.8/at.1.in	2004-10-05 13:36:12.930550000 -0400
jvdias 86b663
@@ -49,8 +49,7 @@
jvdias 86b663
 and
jvdias 86b663
 .B batch
jvdias 86b663
 read commands from standard input or a specified file which are to
jvdias 86b663
-be executed at a later time, using
jvdias 86b663
-.BR /bin/sh .
jvdias 86b663
+be executed at a later time .
jvdias 86b663
 .TP 8
jvdias 86b663
 .BR at
jvdias 86b663
 executes commands at a specified time.
jvdias 86b663
@@ -252,8 +251,56 @@
jvdias 86b663
 option argument, which must have the same format as specified for the 
jvdias 86b663
 .BR touch(1)
jvdias 86b663
 utility's 
jvdias 86b663
-.B -t
jvdias 86b663
+.B \-t
jvdias 86b663
 time option argument ([[CC]YY]MMDDhhmm).
jvdias 86b663
+.SH ENVIRONMENT
jvdias 86b663
+.P
jvdias 86b663
+.TP 8
jvdias 86b663
+.B SHELL
jvdias 86b663
+The value of the SHELL environment variable at the time of 
jvdias 86b663
+.B at
jvdias 86b663
+invocation will determine which shell is used to execute the 
jvdias 86b663
+.B at 
jvdias 86b663
+job commands. If SHELL is unset when 
jvdias 86b663
+.B at
jvdias 86b663
+is invoked, the user's login shell will be used; otherwise, 
jvdias 86b663
+if SHELL is set when 
jvdias 86b663
+.B at 
jvdias 86b663
+is invoked, it must contain the path of a shell interpreter
jvdias 86b663
+executable that will be used to run the commands at the specified time.
jvdias 86b663
+.P
jvdias 86b663
+.B at 
jvdias 86b663
+will record the values of 
jvdias 86b663
+environment variables present at time of 
jvdias 86b663
+.B at
jvdias 86b663
+invocation. When the commands are run at the  specified time, 
jvdias 86b663
+.B at
jvdias 86b663
+will restore these variables to their recorded values .
jvdias 86b663
+These variables are excluded from this processing and are never
jvdias 86b663
+set by
jvdias 86b663
+.B at
jvdias 86b663
+when the commands are run :
jvdias 86b663
+.br
jvdias 86b663
+.BI TERM,
jvdias 86b663
+.BI DISPLAY,
jvdias 86b663
+.BI SHELLOPTS,
jvdias 86b663
+.BI _,
jvdias 86b663
+.BI PPID,
jvdias 86b663
+.BI BASH_VERSINFO,
jvdias 86b663
+.BI EUID,
jvdias 86b663
+.BI UID,
jvdias 86b663
+.BI GROUPS.
jvdias 86b663
+.br
jvdias 86b663
+If the user submitting the 
jvdias 86b663
+.B at 
jvdias 86b663
+job is not the super-user, variables that alter the behaviour of the
jvdias 86b663
+loader
jvdias 86b663
+.BR ld.so(8),
jvdias 86b663
+such as 
jvdias 86b663
+.B LD_LIBRARY_PATH
jvdias 86b663
+, cannot be recorded and restored by 
jvdias 86b663
+.B at . 
jvdias 86b663
+.P
jvdias 86b663
 .SH FILES
jvdias 86b663
 .I @ATJBD@
jvdias 86b663
 .br
jvdias 86b663
--- at-3.1.8/at.c.fix_no_export	2004-10-05 13:34:39.538036000 -0400
jvdias 86b663
+++ at-3.1.8/at.c	2004-10-05 13:34:39.629944000 -0400
jvdias 86b663
@@ -358,8 +358,8 @@
jvdias 86b663
     for (atenv = environ; *atenv != NULL; atenv++) {
jvdias 86b663
 	int export = 1;
jvdias 86b663
 	char *pch;
jvdias 86b663
-       char * eqp = *atenv;
jvdias 86b663
-       char * valp = *atenv;
jvdias 86b663
+	char * eqp = *atenv;
jvdias 86b663
+	char * valp = *atenv;
jvdias 86b663
 
jvdias 86b663
 	if ((pch = strchr(*atenv, '=')) != 0) {
jvdias 86b663
 	    unsigned int i;
jvdias 86b663
@@ -368,8 +368,9 @@
jvdias 86b663
             valp = pch + 1;
jvdias 86b663
 	    for (i = 0; i < sizeof(no_export) / sizeof(no_export[0]); i++) {
jvdias 86b663
 		export = export
jvdias 86b663
-		    && (strncmp(*atenv, no_export[i],
jvdias 86b663
-				(size_t) (eqp - *atenv)) != 0);
jvdias 86b663
+		    && (  (((size_t) (eqp - *atenv)) != strlen(no_export[i]))
jvdias 86b663
+		        ||(strncmp(*atenv, no_export[i],(size_t) (eqp - *atenv)) != 0)
jvdias 86b663
+		       );
jvdias 86b663
 	    }
jvdias 86b663
 	} else {
jvdias 86b663
             continue; /* no '=', so bail on this one */