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

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