Blame SOURCES/at-3.1.10-filter-environment.patch

bd38e4
diff -up at-3.1.10/at.c.filter-environment at-3.1.10/at.c
bd38e4
--- at-3.1.10/at.c.filter-environment	2014-10-02 10:21:01.684890331 +0200
bd38e4
+++ at-3.1.10/at.c	2014-10-02 10:21:40.678770635 +0200
bd38e4
@@ -388,6 +388,22 @@ writefile(time_t runtimer, char queue)
bd38e4
 	int export = 1;
bd38e4
 	char *eqp;
bd38e4
 
bd38e4
+        /* Only accept alphanumerics and underscore in variable names.
bd38e4
+         * Also require the name to not start with a digit.
bd38e4
+         * Some shells don't like other variable names.
bd38e4
+         */
bd38e4
+        {
bd38e4
+            char *p = *atenv;
bd38e4
+            if (isdigit(*p))
bd38e4
+                export = 0;
bd38e4
+            for (; *p != '=' && *p != '\0'; ++p) {
bd38e4
+                if (!isalnum(*p) && *p != '_') {
bd38e4
+                    export = 0;
bd38e4
+                    break;
bd38e4
+                }
bd38e4
+            }
bd38e4
+        }
bd38e4
+
bd38e4
 	eqp = strchr(*atenv, '=');
bd38e4
 	if (ap == NULL)
bd38e4
 	    eqp = *atenv;