Changeset 169 for branches


Ignore:
Timestamp:
Apr 14, 2009, 3:41:40 PM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Fix for Ticket #74

File:
1 edited

Legend:

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

    r158 r169  
    5252        {
    5353                snprintf(buffer, 260, "%s/samba/smb.conf", getenv("ETC"));
     54
     55                /* Set UNIXROOT to x:\MPTN if UNIXROOT is undefined */
     56                if (getenv("UNIXROOT") == NULL) {
     57                        static pstring unixroot = "";
     58                        strncpy(unixroot,getenv("ETC"),strlen(getenv("ETC"))-4);
     59                        setenv("UNIXROOT",unixroot,0);
     60                }
     61                /* Make sure TMPIR points to a proper value */
     62                static pstring tmpdir = "";
     63                if (getenv("TMPDIR") == NULL && getenv("TEMP") != NULL) {
     64                        strncpy(tmpdir,getenv("TEMP"),strlen(getenv("TEMP")));
     65                        setenv("TMPDIR",tmpdir,0);
     66                }
     67                if (getenv("TMPDIR") == NULL) {
     68                        strncpy(tmpdir,getenv("ETC"),2);
     69                        stpcpy(tmpdir,"/OS2/SYSTEM");
     70                        setenv("TMPDIR",tmpdir,0);
     71                }
    5472        }
    5573        return buffer;
Note: See TracChangeset for help on using the changeset viewer.