Ignore:
Timestamp:
Jun 3, 2009, 8:58:02 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Fixes for Tickets #24 and #78 in 3.2 branch

File:
1 edited

Legend:

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

    r233 r249  
    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) {
     
    289299                                remark);
    290300        }
    291         path = talloc_asprintf(p->mem_ctx,
    292                         "C:%s", lp_pathname(snum));
     301#ifdef __OS2__
     302        if (strchr( lp_pathname(snum), ':'))
     303                path = talloc_asprintf(p->mem_ctx,"%s", lp_pathname(snum));
     304        else
     305#endif 
     306        path = talloc_asprintf(p->mem_ctx,"C:%s", lp_pathname(snum));
     307
    293308
    294309        if (path) {
     
    375390                remark = standard_sub_conn(ctx, p->conn, remark);
    376391        }
     392#ifdef __OS2__
     393        if (strchr( lp_pathname(snum), ':'))
     394                path = talloc_asprintf(p->mem_ctx,"%s", lp_pathname(snum));
     395        else
     396#endif 
    377397        path = talloc_asprintf(ctx, "C:%s", lp_pathname(snum));
    378398        if (path) {
     
    14321452                return NULL;
    14331453        }
    1434 
    1435 #ifndef __OS2__
     1454#ifdef __OS2__
     1455        /* Only absolute paths allowed. */
     1456        if (strlen(ptr) < 2 || ptr[1] != ':')
     1457                return NULL;
     1458#else
    14361459        /* NT is braindead - it wants a C: prefix to a pathname ! So strip it. */
    14371460        if (strlen(ptr) > 2 && ptr[1] == ':' && ptr[0] != '/')
     
    14401463        /* Only absolute paths allowed. */
    14411464        if (*ptr != '/')
    1442                 return NULL;
    1443 #else
    1444         /* Only absolute paths allowed. */
    1445         if (strlen(ptr) < 2 || ptr[1] != ':')
    14461465                return NULL;
    14471466#endif
     
    22612280***********************************************************************************/
    22622281
    2263 static const char *server_disks[] = {"C:"
    2264 #ifdef __OS2__
    2265         // YD we can use a better implementation (real time scan or above idea)
    2266         ,"D:","E:","F:","G:","H:","I:","J:","K:","L:","M:","N:","O:"
    2267         ,"P:","Q:","R:","S:","T:","U:","V:","W:","X:","Y:","Z:"
    2268 #endif
    2269 };
    2270 
     2282static const char *server_disks[] = {"C:"
     2283#ifdef __OS2__
     2284        // YD we can use a better implementation (real time scan or above idea)
     2285        ,"D:","E:","F:","G:","H:","I:","J:","K:","L:","M:","N:","O:"
     2286        ,"P:","Q:","R:","S:","T:","U:","V:","W:","X:","Y:","Z:"
     2287#endif
     2288};
    22712289
    22722290static uint32 get_server_disk_count(void)
Note: See TracChangeset for help on using the changeset viewer.