Download | Plain Text | No Line Numbers


  1. --- src/support/suexec.c.orig 2006-03-19 13:10:18.000000000 +0100
  2. +++ src/support/suexec.c 2006-03-19 13:09:34.000000000 +0100
  3. @@ -226,6 +226,18 @@
  4. environ = cleanenv;
  5. }
  6.  
  7. +static void addto_env(char *name, char *value)
  8. +{
  9. + char envbuf[512];
  10. + int idx;
  11. +
  12. + sprintf(envbuf, "%s=%s", name, value);
  13. + for(idx = 0; environ[idx]; idx++);
  14. + environ[idx] = strdup(envbuf);
  15. + idx++;
  16. + environ[idx] = NULL;
  17. +}
  18. +
  19. #define MY_STATE_NORMAL 0
  20. #define MY_STATE_SPACE 1
  21. #define MY_STATE_QUOTES 2
  22. @@ -890,6 +902,7 @@
  23. /*
  24. * Execute the command, replacing our image with its own.
  25. */
  26. + addto_env("USER", actual_uname);
  27. execv(passedargv[0], passedargv);
  28. #if 0
  29. #ifdef NEED_HASHBANG_EMUL
  30.