Changeset 250 for branches/samba-3.3.x/source/rpc_server
- Timestamp:
- Jun 3, 2009, 10:15:49 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/rpc_server/srv_srvsvc_nt.c
r221 r250 177 177 178 178 if ( strcmp( fname, "." ) == 0 ) { 179 #ifndef __OS2__ 179 180 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 180 185 } else { 186 #ifndef __OS2__ 181 187 fullpath = talloc_asprintf(fenum->ctx, "C:%s/%s", 182 188 sharepath, fname ); 189 #else 190 fullpath = talloc_asprintf(fenum->ctx, "%s%s%s", 191 (strchr( sharepath,':')) ? "" : "C:", sharepath, fname ); 192 #endif 183 193 } 184 194 if (!fullpath) { … … 293 303 "", remark); 294 304 } 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 297 312 298 313 if (path) { … … 387 402 "", remark); 388 403 } 404 #ifdef __OS2__ 405 if (strchr( lp_pathname(snum), ':')) 406 path = talloc_asprintf(p->mem_ctx,"%s", lp_pathname(snum)); 407 else 408 #endif 389 409 path = talloc_asprintf(ctx, "C:%s", lp_pathname(snum)); 390 410 if (path) { … … 1448 1468 return NULL; 1449 1469 } 1450 1470 #ifdef __OS2__ 1471 /* Only absolute paths allowed. */ 1472 if (strlen(ptr) < 2 || ptr[1] != ':') 1473 return NULL; 1474 #else 1451 1475 /* NT is braindead - it wants a C: prefix to a pathname ! So strip it. */ 1452 1476 if (strlen(ptr) > 2 && ptr[1] == ':' && ptr[0] != '/') … … 1456 1480 if (*ptr != '/') 1457 1481 return NULL; 1458 1482 #endif 1459 1483 return ptr; 1460 1484 } … … 2262 2286 ***********************************************************************************/ 2263 2287 2264 static const char *server_disks[] = {"C:"}; 2288 static 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 }; 2265 2295 2266 2296 static uint32 get_server_disk_count(void)
Note:
See TracChangeset
for help on using the changeset viewer.