Changeset 366


Ignore:
Timestamp:
Jan 12, 2010, 7:38:34 PM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Better fix for hardcoded \lib directory in 3.0.x

Location:
branches/samba-3.0/source
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.0/source/Makefile.in

    r312 r366  
    241241          lib/interface.o lib/md4.o \
    242242          lib/interfaces.o lib/pidfile.o \
    243           lib/signal.o lib/system.o lib/os2ea.o lib/sendfile.o lib/time.o \
     243          lib/signal.o lib/system.o lib/os2ea.o lib/os2path.o lib/sendfile.o lib/time.o \
    244244          lib/ufc.o lib/genrand.o lib/username.o \
    245245          lib/util_pw.o lib/access.o lib/smbrun.o \
  • branches/samba-3.0/source/dynconfig.c

    r363 r366  
    140140 **/
    141141// we try to set the libdir based on the current running process
    142 const char* getlibdir()
     142const char * getlibdir()
    143143{
    144         static pstring buffer = "";
    145         if (!*buffer)
    146         {
    147 
    148                 if (getenv("SMB_EXE") == NULL)
    149                 {
    150                         snprintf(buffer, 260, "%s", LIBDIR);
    151                 } else {
    152                         snprintf(buffer, 260, "%s/lib", getenv("SMB_EXE"));
    153                 }
    154         }
    155 
    156         return buffer;
     144        static pstring buffer = "";
     145        if (!*buffer)
     146        {
     147                pstring exedir = "";
     148                if (os2_GetExePath(exedir) != 0)
     149                {
     150                        snprintf(buffer, 260, "%s", LIBDIR);
     151                } else {
     152                        snprintf(buffer, 260, "%s/%s", exedir, "lib");
     153                }
     154        }
     155        return buffer;
    157156}
    158157
  • branches/samba-3.0/source/lib/interface.c

    r286 r366  
    186186        /* probe the kernel for interfaces */
    187187        total_probed = get_interfaces(ifaces, MAX_INTERFACES);
    188         DEBUG(2, ("Anzahl interfaces %i ", total_probed));
     188        DEBUG(2, ("interfaces added %i\n", total_probed));
    189189
    190190        if (total_probed > 0) {
  • branches/samba-3.0/source/lib/os2ea.c

    r363 r366  
    382382                if (pfea->oNextEntryOffset > 0x10000)
    383383                {
    384                         // DEBUG(0, ("Broken Extended Attributes detected for: %s:%d\n", path ? path : "null", file));
    385                         DEBUG(0, ("Broken Extended Attributes detected for: %s:%d, Last EA:%s\n", path ? path : "null", file, pfea->szName));
     384                        DEBUG(0, ("Broken Extended Attributes detected for: %s:%d\n", path ? path : "null", file));
     385                        // DEBUG(0, ("Broken Extended Attributes detected for: %s:%d, Last EA:%s\n", path ? path : "null", file, pfea->szName));
    386386                        break;
    387387                }
  • branches/samba-3.0/source/lib/util_unistr.c

    r1 r366  
    9696                                               0x20000);
    9797        lowcase_table_use_unmap = ( lowcase_table != NULL );
     98       
    9899
    99100#ifdef HAVE_SETLOCALE
     
    113114           not available */
    114115        if (!upcase_table) {
     116#ifdef __OS2__
     117                DEBUG(1,("could not load %s",lib_path("upcase.dat")));
     118#endif         
    115119                DEBUG(1,("creating lame upcase table\n"));
     120
    116121                upcase_table = (smb_ucs2_t *)SMB_MALLOC(0x20000);
    117122                for (i=0;i<0x10000;i++) {
     
    128133
    129134        if (!lowcase_table) {
     135#ifdef __OS2__
     136                DEBUG(1,("could not load %s\n",lib_path("lowcase.dat")));
     137#endif
    130138                DEBUG(1,("creating lame lowcase table\n"));
     139
    131140                lowcase_table = (smb_ucs2_t *)SMB_MALLOC(0x20000);
    132141                for (i=0;i<0x10000;i++) {
     
    248257        /* use free rather than unmap */
    249258        valid_table_use_unmap = False;
    250 
    251         DEBUG(2,("creating default valid table\n"));
     259#ifdef __OS2__
     260        DEBUG(1,("could not load %s\n",lib_path("valid.dat")));
     261#endif 
     262        DEBUG(1,("creating default valid table\n"));
     263
    252264        valid_table = (uint8 *)SMB_MALLOC(0x10000);
    253265        for (i=0;i<128;i++) {
Note: See TracChangeset for help on using the changeset viewer.