Changeset 528 for trunk/client/src/smbwrp.c
- Timestamp:
- Jan 24, 2011, 12:04:13 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/src/smbwrp.c
r521 r528 174 174 175 175 if (!lp_load(get_dyn_CONFIGFILE(),true,false,false,true)) { 176 debuglocal(0,("The initial smb.conf is missing, please reinstall the plugin!")); 177 } 178 176 debuglocal(0,("The initial smb.conf is missing, defaults are used!\n")); 177 } 179 178 180 179 load_interfaces(); … … 959 958 if (cli->capabilities & CAP_NT_SMBS && !(cli->capabilities & CAP_NOPATHINFO2)) 960 959 { 961 int r c = os2cli_errno(cli);960 int ret = cli_errno(cli); 962 961 // cli_qpathinfo* reports EINVAL when path of given file not exists 963 962 // thus there is no real situation when EINVAL should be returned to 964 963 // client at this point, we just replace it to ENOTDIR 965 if (r c== EINVAL)966 { 967 r c = maperror(ENOTDIR);968 } 969 return rc;964 if (ret == EINVAL) 965 { 966 ret = ENOTDIR; 967 } 968 return maperror(ret); 970 969 } 971 970 … … 1031 1030 { 1032 1031 filelist_state * st = (filelist_state *)state; 1033 char fullname[ _MAX_PATH] ;1032 char fullname[ _MAX_PATH] = {0}; 1034 1033 debuglocal(8,"adding <%s> %d %d %d\n", finfo->fname, sizeof(st->finfo), st->datalen, sizeof(st->finfo.fname)); 1035 1034 memcpy(&st->finfo, finfo, sizeof(st->finfo)); … … 1099 1098 ****************************************************************************/ 1100 1099 // YD from libsmb\clilist.c 1101 // @todo who frees fname, as clistr_pull_talloc allocs it1102 1100 static size_t _os2_interpret_long_filename(TALLOC_CTX *ctx, struct cli_state *cli, 1103 1101 int level,const char *p, const char *pdata_end, smbwrp_fileinfo *finfo, … … 1249 1247 } 1250 1248 strncpy(finfo->fname, fname, sizeof(finfo->fname) -1); 1249 1251 1250 /* To be robust in the face of unicode conversion failures 1252 1251 we need to copy the raw bytes of the last name seen here.
Note:
See TracChangeset
for help on using the changeset viewer.