- Timestamp:
- Jul 2, 2010, 2:38:45 PM (15 years ago)
- Location:
- branches/client-1.6/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/client-1.6/src/Makefile.kmk
r449 r472 37 37 # YD -O2/O3 triggers stack variable alignment bug in gcc 4.3.2/4.4.0! 38 38 ndpsmb_CFLAGS.release = -g -O1 -march=pentium -mtune=pentium4 39 # SCS when building with gcc 3.3.5 use the below cflags40 #ndpsmb_CFLAGS.release = -s -O3 -march=pentium -mcpu=pentium341 39 42 40 ndpsmb_CFLAGS.debug = -g -O0 -DDEBUG_PRINTF -
branches/client-1.6/src/ndpsmb.c
r401 r472 630 630 unsigned long action; 631 631 cli_state* cli = NULL; 632 smbwrp_file file;633 632 634 633 debug_printf("checkMountResource in tid#%d\n", _gettid()); … … 810 809 int rc = NO_ERROR, rc1; 811 810 unsigned long action = 0; 812 smbwrp_file file;813 811 cli_state* cli = NULL; 814 812 FSALLOCATE fsa; -
branches/client-1.6/src/smbwrp.c
r448 r472 1085 1085 ****************************************************************************/ 1086 1086 // YD from libsmb\clilist.c 1087 // @todo 1088 // in the longrun we should switch to file_info struct instead of our own smbwrp_fileinfo 1089 1087 // @todo who frees fname, as clistr_pull_talloc allocs it 1090 1088 static size_t _os2_interpret_long_filename(TALLOC_CTX *ctx, struct cli_state *cli, 1091 1089 int level,const char *p, const char *pdata_end, smbwrp_fileinfo *finfo, … … 1095 1093 const char *base = p; 1096 1094 size_t ret; 1095 char *fname; 1097 1096 1098 1097 data_blob_free(p_last_name_raw); … … 1102 1101 } 1103 1102 1104 //ZERO_STRUCTP(finfo);1103 ZERO_STRUCTP(finfo); 1105 1104 debuglocal(9,"fname %s (serverzone %d, level %d)\n",finfo->fname, cli->serverzone, level); 1106 1105 … … 1139 1138 between win2000 and win9x for this call 1140 1139 (tridge) */ 1141 ret = clistr_pull_talloc(ctx, cli, &f info->fname, p,1140 ret = clistr_pull_talloc(ctx, cli, &fname, p, 1142 1141 len+2, 1143 1142 STR_TERMINATE); … … 1147 1146 p += ret; 1148 1147 finfo->easize = -1; 1148 strncpy(finfo->fname, fname, sizeof(finfo->fname) -1); 1149 1149 return PTR_DIFF(p, base); 1150 1150 … … 1167 1167 return pdata_end - base; 1168 1168 } 1169 ret = clistr_pull_talloc(ctx, cli, &f info->fname, p,1169 ret = clistr_pull_talloc(ctx, cli, &fname, p, 1170 1170 len, 1171 1171 STR_NOALIGN); … … 1174 1174 } 1175 1175 p += ret; 1176 strncpy(finfo->fname, fname, sizeof(finfo->fname) -1); 1176 1177 return PTR_DIFF(p, base) + 1; 1177 1178 … … 1229 1230 return pdata_end - base; 1230 1231 } 1231 ret = clistr_pull_talloc(ctx, cli, &f info->fname, p,1232 ret = clistr_pull_talloc(ctx, cli, &fname, p, 1232 1233 namelen, 0); 1233 1234 if (ret == (size_t)-1) { 1234 1235 return pdata_end - base; 1235 1236 } 1236 1237 strncpy(finfo->fname, fname, sizeof(finfo->fname) -1); 1237 1238 /* To be robust in the face of unicode conversion failures 1238 1239 we need to copy the raw bytes of the last name seen here. -
branches/client-1.6/src/smbwrp.h
r444 r472 103 103 unsigned long atime; 104 104 int easize; 105 // char fname[261]; 106 char *fname; 105 char fname[261]; 107 106 } smbwrp_fileinfo; 108 107
Note:
See TracChangeset
for help on using the changeset viewer.