- Timestamp:
- Mar 11, 2012, 6:19:02 PM (14 years ago)
- Location:
- branches/samba-3.0/source
- Files:
-
- 2 edited
-
build.cmd (modified) (11 diffs)
-
smbd/process.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/build.cmd
r459 r693 1 1 /* Samba build script for eCS (OS/2) */ 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 23 3 24 '@echo off' 4 25 parse upper arg cmdline 5 26 27 28 6 29 /* No parameter or HELP -> display usage */ 7 30 if pos("HELP", cmdline) > 0 | cmdline = "" then do 8 say "Samba for eCS (OS/2) build script"9 31 say 10 32 say "Valid commands are:" 11 33 say " HELP - this page" 12 say " 063 - link against libc063.dll"13 say " 064x - link against libc064x.dll"14 34 say " CONF - run configure" 15 35 say " CLEAN - clean up and recompile everything" … … 20 40 say " ZIP - create ZIP archive" 21 41 say " ALL - do just everything" 42 43 44 45 22 46 say 23 47 exit 255 … … 30 54 31 55 options = 'build.options' 56 32 57 33 58 /* defaults */ 34 59 make = "" 35 libc = "064x"36 60 brand = "No" 37 61 conf = "" … … 52 76 build_parms = "" 53 77 78 79 80 81 82 83 84 85 54 86 if pos("MAKE", cmdline) > 0 then do 55 87 make = "MAKE" … … 61 93 build_parms = build_parms||' 'make 62 94 end 63 if pos("064X", cmdline) > 0 then do 64 libc = "064X" 65 build_parms = build_parms||' 'libc 66 end 67 if pos("063", cmdline) > 0 then do 68 libc = "063" 69 build_parms = build_parms||' 'libc 70 end 95 71 96 if pos("BRAND", cmdline) > 0 then do 72 97 Brand = "YES" … … 78 103 end 79 104 105 106 107 108 109 110 111 112 113 114 80 115 /* start working */ 81 if libc = "063" then do82 address cmd "call 063.cmd"83 end84 else do85 address cmd "call 064x.cmd"86 end87 88 116 if conf = "YES" then do 89 address cmd 'SETLOCAL'90 address cmd 'SET CFLAGS=-g -Zomf -O1 -march=pentium -mtune=pentium4'91 address cmd 'SET CXXFLAGS=-g -Zomf -O1 -march=pentium -mtune=pentium4'92 address cmd 'SET LDFLAGS=-s -Zsym -Zmap -Zbin-files -Zomf -Zexe -Zargs-wild -Zargs-resp'93 address cmd 'SET AR=emxomfar'94 address cmd 'SET LIBS=-lsocket -lsyslog' 117 address cmd 'SETLOCAL' 118 address cmd 'SET CFLAGS=-g -Zomf -O1 -march=pentium -mtune=pentium4' 119 address cmd 'SET CXXFLAGS=-g -Zomf -O1 -march=pentium -mtune=pentium4' 120 address cmd 'SET LDFLAGS=-s -Zsym -Zmap -Zbin-files -Zomf -Zexe -Zargs-wild -Zargs-resp' 121 address cmd 'SET AR=emxomfar' 122 address cmd 'SET LIBS=-lsocket -lsyslog' */ 95 123 /* disabled options: 96 --enable-developer --enable-socket-wrapper124 --enable-developer --enable-socket-wrapper 97 125 */ 98 address cmd 'ksh ./configure --enable-pie=no --prefix=/samba --enable-static --disable-shared --disable-cups --disable-ldap --with-acl-support 2>&1 | tee configure.log' 99 address cmd 'ENDLOCAL' 126 127 /* we need to delete the cache file and redo it afterwards */ 128 ok = SysFileDelete(cacheFile); 129 130 /* is cups env set */ 131 sEnvVar = EnvGet('CUPS'); 132 if sEnvVar <> '' then do 133 call lineout cacheFile, "ac_cv_path_CUPS_CONFIG='" || sEnvVar || "'"; 134 end 135 136 /* is python env set */ 137 sEnvVar = EnvGet('PYTHONHOME'); 138 if sEnvVar <> '' then do 139 sPythonVersion = PythonVersion(sEnvVar); 140 if sPythonVersion <> '-1' then do 141 call lineout cacheFile, "ac_cv_path_PYTHON_CONFIG='" || sEnvVar || "/config/" || sPythonVersion || "'"; 142 call lineout cacheFile, "ac_cv_path_PYTHON='" || sEnvVar || "'"; 143 end 144 end 145 146 ok = stream(cacheFile, 'c', 'close'); 147 148 /* run configure */ 149 address cmd 'ksh ./configure --enable-pie=no --prefix=/samba --disable-shared --with-acl-support --cache-file=build.cache 2>&1 | tee configure.log' 150 address cmd 'ENDLOCAL' 100 151 end 101 152 … … 103 154 address cmd "make clean" 104 155 end 105 156 106 157 if brand = "YES" then do 107 158 svninfo = ".\svninfo" … … 115 166 say build_parms 116 167 address cmd 'make 2>&1 | tee build.log' 117 end 168 end 118 169 119 170 if pos("ZIP", cmdline) > 0 then do … … 143 194 VerFile = "VERSION.ECS" 144 195 196 197 198 199 200 201 202 145 203 /* Samba Version file */ 146 204 Version = "VERSION" … … 153 211 eCSVer.I = linein(VerFile) 154 212 if left(eCSVer.I,28) = "SAMBA_VERSION_VENDOR_SUFFIX=" then do 155 parse var eCSver.I . '='vendor_suffix156 vendor_suffix = strip(vendor_suffix,,'"')157 parse var vendor_suffix vendor suffix213 parse var eCSver.I . '='vendor_suffix 214 vendor_suffix = strip(vendor_suffix,,'"') 215 parse var vendor_suffix vendor suffix 158 216 end 159 217 end … … 193 251 verstring = suffix'-'Major'.'minor'.'release'.'revision'-'vendor'-'date('S') 194 252 say "Samba "verstring 195 return 253 return 254 255 256 /** 257 * Gets the value of sEnvVar. 258 */ 259 EnvGet: procedure 260 parse arg sEnvVar 261 if ((translate(sEnvVar) = 'BEGINLIBPATH') | (translate(sEnvVar) = 'ENDLIBPATH')) then 262 return SysQueryExtLibPath(substr(sEnvVar, 1, 1)); 263 return value(sEnvVar,, 'OS2ENVIRONMENT'); 264 265 /** 266 * try to find the pythonversion 267 */ 268 PythonVersion: procedure 269 parse arg pdir 270 271 ok = SysFileTree(pdir||"\python*.dll",pydll.,"FO") 272 rc = -1 273 if pydll.0 = 1 then do 274 dllpur = filespec("N",pydll.1) 275 parse var dllpur 'python' ver '.dll' 276 if datatype(ver) <> "NUM" then do 277 say "no valid python dll found!" 278 end 279 else do 280 major = left(ver,1) 281 minor = substr(ver,2,) 282 verstring = "python"||major||"."||minor 283 rc = verstring 284 end 285 end 286 else do 287 say "no dll found!" 288 end 289 return rc -
branches/samba-3.0/source/smbd/process.c
r468 r693 1026 1026 int msg_type = CVAL(inbuf,0); 1027 1027 uint16_t mid = SVAL(inbuf, smb_mid); 1028 1028 1029 1029 1030 chain_size = 0; … … 1033 1034 if (msg_type != 0) 1034 1035 return(reply_special(inbuf,outbuf)); 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1035 1053 1036 1054 construct_reply_common(inbuf, outbuf); … … 1162 1180 static int orig_size; 1163 1181 int smb_com1, smb_com2 = CVAL(inbuf,smb_vwv0); 1164 unsigned smb_off2 = SVAL(inbuf,smb_vwv1);1182 ; 1165 1183 char *inbuf2, *outbuf2; 1166 1184 int outsize2; … … 1181 1199 orig_outbuf = outbuf; 1182 1200 orig_size = size; 1183 } 1201 smb_off2 = 0; 1202 } 1203 1204 if (SVAL(inbuf,smb_vwv1) <= smb_off2) { 1205 DEBUG(1, ("AndX offset not increasing\n")); 1206 SCVAL(outbuf, smb_vwv0, 0xFF); 1207 return outsize; 1208 } 1209 smb_off2 = SVAL(inbuf, smb_vwv1); 1184 1210 1185 1211 /* Validate smb_off2 */
Note:
See TracChangeset
for help on using the changeset viewer.
