Ignore:
Timestamp:
Jun 3, 2009, 10:15:49 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Fixes for Tickets #24 and #78 in 3.3 branch

File:
1 edited

Legend:

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

    r221 r250  
    177177
    178178        if ( strcmp( fname, "." ) == 0 ) {
     179#ifndef __OS2__
    179180                fullpath = talloc_asprintf(fenum->ctx, "C:%s", sharepath );
     181#else
     182                fullpath = talloc_asprintf(fenum->ctx, "%s%s",
     183                                                                (strchr( sharepath,':')) ? "" : "C:", sharepath );
     184#endif
    180185        } else {
     186#ifndef __OS2__
    181187                fullpath = talloc_asprintf(fenum->ctx, "C:%s/%s",
    182188                                sharepath, fname );
     189#else
     190                fullpath = talloc_asprintf(fenum->ctx, "%s%s%s",
     191                                (strchr( sharepath,':')) ? "" : "C:", sharepath, fname );
     192#endif
    183193        }
    184194        if (!fullpath) {
     
    293303                        "", remark);
    294304        }
    295         path = talloc_asprintf(p->mem_ctx,
    296                         "C:%s", lp_pathname(snum));
     305#ifdef __OS2__
     306        if (strchr( lp_pathname(snum), ':'))
     307                path = talloc_asprintf(p->mem_ctx,"%s", lp_pathname(snum));
     308        else
     309#endif 
     310        path = talloc_asprintf(p->mem_ctx,"C:%s", lp_pathname(snum));
     311
    297312
    298313        if (path) {
     
    387402                        "", remark);
    388403        }
     404#ifdef __OS2__
     405        if (strchr( lp_pathname(snum), ':'))
     406                path = talloc_asprintf(p->mem_ctx,"%s", lp_pathname(snum));
     407        else
     408#endif 
    389409        path = talloc_asprintf(ctx, "C:%s", lp_pathname(snum));
    390410        if (path) {
     
    14481468                return NULL;
    14491469        }
    1450 
     1470#ifdef __OS2__
     1471        /* Only absolute paths allowed. */
     1472        if (strlen(ptr) < 2 || ptr[1] != ':')
     1473                return NULL;
     1474#else
    14511475        /* NT is braindead - it wants a C: prefix to a pathname ! So strip it. */
    14521476        if (strlen(ptr) > 2 && ptr[1] == ':' && ptr[0] != '/')
     
    14561480        if (*ptr != '/')
    14571481                return NULL;
    1458 
     1482#endif
    14591483        return ptr;
    14601484}
     
    22622286***********************************************************************************/
    22632287
    2264 static const char *server_disks[] = {"C:"};
     2288static const char *server_disks[] = {"C:"
     2289#ifdef __OS2__
     2290        // YD we can use a better implementation (real time scan or above idea)
     2291        ,"D:","E:","F:","G:","H:","I:","J:","K:","L:","M:","N:","O:"
     2292        ,"P:","Q:","R:","S:","T:","U:","V:","W:","X:","Y:","Z:"
     2293#endif
     2294};
    22652295
    22662296static uint32 get_server_disk_count(void)
Note: See TracChangeset for help on using the changeset viewer.