Changeset 75
- Timestamp:
- Sep 28, 2007, 11:19:31 AM (18 years ago)
- Location:
- trunk/samba/source/ndpsmb
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/samba/source/ndpsmb/smbcd.c ¶
r70 r75 437 437 break; 438 438 } 439 callrc = smbwrp_getattr( cli, (smbwrp_fileinfo *)req->param);439 callrc = smbwrp_getattr(srv, cli, (smbwrp_fileinfo *)req->param); 440 440 res->rc = maperror(callrc); 441 441 } break; … … 542 542 break; 543 543 } 544 callrc = smbwrp_chdir( cli, req->param);544 callrc = smbwrp_chdir(srv, cli, req->param); 545 545 res->rc = maperror(callrc); 546 546 } break; -
TabularUnified trunk/samba/source/ndpsmb/smbwrp.c ¶
r69 r75 807 807 this is needed because win95 sometimes refuses the qpathinfo 808 808 *******************************************************/ 809 int _System smbwrp_getattr( cli_state * cli, smbwrp_fileinfo *finfo)809 int _System smbwrp_getattr(smbwrp_server *srv, cli_state * cli, smbwrp_fileinfo *finfo) 810 810 { 811 811 SMB_INO_T ino = 0; … … 828 828 //debuglocal(2,("getattr rc1 %d\n", os2cli_errno(cli))); 829 829 830 /* If the path is not on a share (it is a workgroup or a server), 831 * then cli_qpathinfo3 obviously fails. Return some fake information 832 * about the directory. 833 */ 834 if ( *srv->server_name == 0 835 || (strcmp(cli->dev,"IPC") == 0) 836 || *srv->share_name == 0 837 || (stricmp(srv->share_name,"IPC$") == 0) 838 || (strncmp(cli->dev,"LPT",3) == 0) 839 ) 840 { 841 debuglocal(4,"getattr not a share.\n"); 842 *(time_t *)&finfo->ctime = time (NULL); 843 *(time_t *)&finfo->atime = time (NULL); 844 *(time_t *)&finfo->mtime = time (NULL); 845 finfo->size = 0; 846 finfo->easize = 0; 847 finfo->attr = aDIR; 848 return 0; 849 } 850 830 851 /* if this is NT then don't bother with the getatr */ 831 852 if (cli->capabilities & CAP_NT_SMBS && !(cli->capabilities & CAP_NOPATHINFO2)) … … 1431 1452 a wrapper for chdir() 1432 1453 *******************************************************/ 1433 int _System smbwrp_chdir( cli_state * cli, char *fname)1454 int _System smbwrp_chdir(smbwrp_server *srv, cli_state * cli, char *fname) 1434 1455 { 1435 1456 unsigned short mode = aDIR; … … 1441 1462 1442 1463 strncpy(finfo.fname, fname, sizeof(finfo.fname) - 1); 1443 if (smbwrp_getattr( cli, &finfo))1464 if (smbwrp_getattr(srv, cli, &finfo)) 1444 1465 { 1445 1466 return os2cli_errno(cli); -
TabularUnified trunk/samba/source/ndpsmb/smbwrp.h ¶
r69 r75 129 129 int _System smbwrp_close(cli_state * cli, smbwrp_file * file); 130 130 int _System smbwrp_setattr(cli_state * cli, smbwrp_fileinfo *finfo); 131 int _System smbwrp_getattr( cli_state * cli, smbwrp_fileinfo *finfo);131 int _System smbwrp_getattr(smbwrp_server *srv, cli_state * cli, smbwrp_fileinfo *finfo); 132 132 int _System smbwrp_fgetattr(cli_state * cli, smbwrp_file *file, smbwrp_fileinfo *finfo); 133 133 int _System smbwrp_filelist(smbwrp_server *srv, cli_state * cli, filelist_state * state); 134 134 int _System smbwrp_rename(cli_state * cli, char *oldname, char *newname); 135 int _System smbwrp_chdir( cli_state * cli, char *fname);135 int _System smbwrp_chdir(smbwrp_server *srv, cli_state * cli, char *fname); 136 136 int _System smbwrp_mkdir(cli_state * cli, char *fname); 137 137 int _System smbwrp_rmdir(cli_state * cli, char *fname);
Note:
See TracChangeset
for help on using the changeset viewer.