Ignore:
Timestamp:
Jun 5, 2009, 8:44:18 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Fix for Tickets #74 in 3.3 branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/dynconfig.c

    r206 r253  
    9595                snprintf(buffer, 260, "%s/samba/smb.conf", getenv("ETC"));
    9696        }
     97        /* Set UNIXROOT to x:\MPTN if UNIXROOT is undefined */
     98        if (getenv("UNIXROOT") == NULL) {
     99                static char unixroot[1024] = "";
     100                strncpy(unixroot,getenv("ETC"),strlen(getenv("ETC"))-4);
     101                setenv("UNIXROOT",unixroot,0);
     102        }
     103        /* Make sure TMPIR points to a proper value */
     104        static char tmpdir[1024] = "";
     105        if (getenv("TMPDIR") == NULL && getenv("TEMP") != NULL) {
     106                strncpy(tmpdir,getenv("TEMP"),strlen(getenv("TEMP")));
     107                setenv("TMPDIR",tmpdir,0);
     108        }
     109        if (getenv("TMPDIR") == NULL) {
     110                strncpy(tmpdir,getenv("ETC"),2);
     111                stpcpy(tmpdir,"/OS2/SYSTEM");
     112                setenv("TMPDIR",tmpdir,0);
     113        }
     114
    97115        if (dyn_CONFIGFILE == NULL) {
    98                
    99116                return buffer;
    100117        }
Note: See TracChangeset for help on using the changeset viewer.