[BACK]Return to env.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / doas

Diff for /src/usr.bin/doas/env.c between version 1.8 and 1.9

version 1.8, 2019/06/17 16:01:26 version 1.9, 2019/06/17 19:51:23
Line 28 
Line 28 
   
 #include "doas.h"  #include "doas.h"
   
   const char *formerpath;
   
 struct envnode {  struct envnode {
         RB_ENTRY(envnode) node;          RB_ENTRY(envnode) node;
         const char *key;          const char *key;
Line 198 
Line 200 
                 /* assign value or inherit from environ */                  /* assign value or inherit from environ */
                 if (eq) {                  if (eq) {
                         val = eq + 1;                          val = eq + 1;
                         if (*val == '$')                          if (*val == '$') {
                                 val = getenv(val + 1);                                  if (strcmp(val + 1, "PATH") == 0)
                                           val = formerpath;
                                   else
                                           val = getenv(val + 1);
                           }
                 } else {                  } else {
                         val = getenv(name);                          val = getenv(name);
                 }                  }

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9