Changeset 249
- Timestamp:
- Jun 3, 2009, 8:58:02 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/rpc_server/srv_srvsvc_nt.c
r233 r249 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) { … … 289 299 remark); 290 300 } 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 293 308 294 309 if (path) { … … 375 390 remark = standard_sub_conn(ctx, p->conn, remark); 376 391 } 392 #ifdef __OS2__ 393 if (strchr( lp_pathname(snum), ':')) 394 path = talloc_asprintf(p->mem_ctx,"%s", lp_pathname(snum)); 395 else 396 #endif 377 397 path = talloc_asprintf(ctx, "C:%s", lp_pathname(snum)); 378 398 if (path) { … … 1432 1452 return NULL; 1433 1453 } 1434 1435 #ifndef __OS2__ 1454 #ifdef __OS2__ 1455 /* Only absolute paths allowed. */ 1456 if (strlen(ptr) < 2 || ptr[1] != ':') 1457 return NULL; 1458 #else 1436 1459 /* NT is braindead - it wants a C: prefix to a pathname ! So strip it. */ 1437 1460 if (strlen(ptr) > 2 && ptr[1] == ':' && ptr[0] != '/') … … 1440 1463 /* Only absolute paths allowed. */ 1441 1464 if (*ptr != '/') 1442 return NULL;1443 #else1444 /* Only absolute paths allowed. */1445 if (strlen(ptr) < 2 || ptr[1] != ':')1446 1465 return NULL; 1447 1466 #endif … … 2261 2280 ***********************************************************************************/ 2262 2281 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 2282 static 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 }; 2271 2289 2272 2290 static uint32 get_server_disk_count(void)
Note:
See TracChangeset
for help on using the changeset viewer.