Mikael Brandström Durling <[email protected]> writes:

> David, how are your q*_{command,daemon} parameters set in the
> configuration?

I'm using builtin remote startup.

> I'm using the rshd-wrapper and pam_sge-qrsh-setup.so. However, now
> after the upgrade I noticed that the rshd-wrapper will just create an
> empty file in /var/run as SGE_JOB_SPOOL_DIR is not set in the
> environment where the wrapper is run. Is there some flag to the execd
> to till it to expose that variable?

Bother; I guess it's a result of this change in 8.1.1.  I'd forgotten
about the implementation of the pam module and I'm surprised the problem
hasn't come to light before.  Thanks.

  * Don't pass any user environment to remote startup daemons -- better
    fix for half of CVE-2012-0208

I think this change should fix it, but I can't test it immediately.

Fri Mar  8 22:04:13 GMT 2013  Dave Love <[email protected]>
  * Always pass SGE_... in environment for non-builtin remote startup
diff -rN -u -u old-sge/source/daemons/shepherd/builtin_starter.c new-sge/source/daemons/shepherd/builtin_starter.c
--- old-sge/source/daemons/shepherd/builtin_starter.c	2013-03-08 22:19:22.000000000 +0000
+++ new-sge/source/daemons/shepherd/builtin_starter.c	2013-03-08 22:19:22.000000000 +0000
@@ -954,7 +954,8 @@
 *     written out by the execd and stores each entry in the environment.
 *
 *  INPUTS
-*     bool user_env - True means set variables from the user's environment
+*     bool user_env - True means set variables from the user's environment,
+*                     false means just include the SGE_... variables
 *
 *  RESULTS
 *     int - error code: 0: good, 1: bad
@@ -983,8 +984,6 @@
    }
 #endif
 
-   if (!user_env) return 0;
-
    if (!(fp = fopen(filename, "r"))) {
       shepherd_error(1, "can't open environment file: %s", strerror(errno));
    }
@@ -1002,7 +1001,8 @@
          shepherd_error(1, "error reading environment file: line=%d, contents:%s",
                         line, buf);
       }
-
+      if (!user_env && strncmp(name, "SGE_", 4) != 0)
+         continue;
       value = strtok(NULL, "\n");
       if (value == NULL) {
          value = "";
-- 
Community Grid Engine:  http://arc.liv.ac.uk/SGE/
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to