]> git.lizzy.rs Git - plan9front.git/blob - sys/src/cmd/cifs/ChangeLog
realemu: implement IDIV, mark 0xE0000 writeable, fix DIV overfow trap
[plan9front.git] / sys / src / cmd / cifs / ChangeLog
1 Mon Jan 16 12:36:20 GMT 2012
2 sorting out UNICODE setup during negoiation for cifsd. Seems we where relying
3 on a bug in windows. reworked in such a way that we support both.
4
5 revalidated against win7, xp, samba v3.2, and cifsd.
6
7 Tue Sep 21 17:17:13 BST 2010
8 found the problem with cifs not connecting to Vista - there is a bug
9 in windows, and a hotfix to sort it out.
10
11 http://support.microsoft.com/kb/957441
12
13 also fixed a bug in UNICODE handling - I was controlling Unicode
14 enable on the server's capabilities rather than on the actual decided
15 flags. I got away with this on windows but cinap's cifsd bit me.
16
17 also, I wasn not careful to ensure the negoiate protocol list was
18 ALWAYS packed in ascii (it used to respect the Unicode flags which
19 it should not.
20
21 if the Virtual file was empty I could end up following a nil pointer,
22 we now fail on open in this case (for simplicity).
23
24 couple of error messages made a bit clearer.
25
26 Wed Jul 15 15:06:48 BST 2009
27 learning more than I wanted to about how our windows server
28 infrastructure works.
29
30 It seems we have blades called se-blade-01 se-blade-02 etc and virtual
31 servers called se-01 and se-02 etc.  the blades provide a hot spare
32 system where the two physical blades can switch places at any time.
33 You normally connect to a server, e.g.  se-01, this server will then
34 contain dfs referals to other machines.  Sadly these refereals are in
35 terms of physical blades and not in terms of virtual servers, so you
36 cannot strcmp() the connected host name with the referals.
37
38 Just to add more confusion, the IP addresses are dynamically mapped
39 too so I cannot resolve the IP addresses.  The only way to tell if two
40 names map to teh same host is to ingest the ARP table and lookup the
41 IP addresses in that.  That will show if the two IPS and thus the two
42 hosts are the same.
43
44 This works only if you are on the same physical network of course.
45
46 (sigh)
47
48
49 Wed Jul 15 14:38:37 BST 2009
50 Added case siginificance to cifs for most files this is easy, however
51 for share names its hard as T2getallinfo() seems to return with the
52 filename in lowercase for no good reason.  There is also a problem
53 that the redirected share name may not have the same name as the
54 directory it reprisents, so a simple strcmp() is not good enough.
55 Instead I assume that if the windows translated path is just "/" then
56 its a share and in that case I don't check the filename is what was
57 expected, as the share name translation is case significant and will
58 have enforced the change.
59
60 The DFS stuff is still a mess and needs a rewrite but the lack of
61 documentation from MS is a real problem.
62
63 I also tried to return an error specifying the remote path to DFS
64 links that point to another host (not currently supported), this
65 doesn't work and I cannot tell why - there is some odd code in
66 /sys/src/lib9p/srv.h:/^cloneandwalk/ which ignores errors if they
67 occur on anything after the first walk, however removing this still
68 resulted in the debug from -D (9pchatty mode) showing the walk
69 succeeding - very odd.
70
71 It would be nice one day to rework the DFS code so it tries to use the
72 current if it is on the list, however pings are rare and RTT times are
73 cached and in some topologies there might be a different host that is
74 actually closer, so long term it would be better to be unbiased about
75 it.
76
77 Fri Oct 24 13:37:51 BST 2008
78 Looked again at DFS, Microsoft have at last published the full
79 protocol spec, so we have more of a chance of a proper client.
80
81 Looking at my environment I now connect only to the root of the dfs
82 tree, i.e.  I no longer do an autoconnect to all the available shares,
83 so the connect is faster (good).  then I allow dfs to autoconnect on
84 demand.
85
86 I added some cacheing of ping RTTs so the autoconnect should be faster
87 too.
88
89 The cache doesn't fully work as expected as we only create cache
90 entries on walk at present and not on any other operations.  This
91 means cloning an existing fid and using it will not cause a
92 re-evaluation of the cache even if it has expired.
93
94 I think I can design dfs under plan9 to run in a single program -
95 perhaps cifs becomes cifssrv and I have multiple attaches as required.
96 I could also have a ctrl file which gets requests for new instances.
97 Of failing that the srv instances themselves could do the mount of new
98 sessions.  The only problem with this I see is that different hosts
99 might need different command line options.  It could get messy tryiong
100 to emulate this with attach specificers.
101
102 must look at MAC signing again too, how to do validate my work?
103
104 Tue Mar 18 14:58:30 GMT 2008
105 made MID a variable rather than a constant, Windows servers restrict
106 sessions to one per MID/user, thus a new session to a given server as
107 user fred will kick off previous sessions.  I thought this was useful
108 and seemed to be what Microsoft intended.  I have since found that in
109 a complex DFS environment two IP addresses can point to the same
110 server which supports the shares previously distributed across a pair
111 of servers.  When you try to connect to these two servers the seccond
112 connection is then hung up by the windows server as it has the same
113 MID.  Mids are now made up on the fly.
114
115 Mon Oct 30 11:03:36 GMT 2006
116 Tried to extract the password expiry date from cifs - definitely no
117 RAP call to do it, MS say its held in LDAP (sigh), it might be
118 possible with a RPC call...  we are always one technology behind.
119
120 Wed Oct 25 13:43:54 BST 2006
121
122 CVS is now quite happy - tested for several months
123
124 Fixed a bug in the linked list handling of open files (damm!)
125 if all the attaches of a cifs filesystem where closed and then
126 a new attach was made cifs(1) would suicide.
127
128 Fri Aug 11 11:52:05 BST 2006
129
130 Found another silly that caused CVS to get confused (I think this is
131 the one, need to do some more testing, but it seems saner now).
132
133 fsopen was referencing a perm member of the incomming 9p message which
134 does not exist, and getting random numbers for permissions and
135 creating readonly files somtimes.
136
137 Thu Aug 10 10:34:14 BST 2006
138
139 Bug in pdatetime() / gdatetime() - logic wrong way up for working
140 around a bug in Win95 - obvious as touch(1)ing a file would give silly
141 1907 dates.
142
143 Not sure if I have broken win95 compatability but I no longer have any
144 of them to test with.
145
146 Tue Nov  8 11:02:48 GMT 2005
147
148 Fixed a howler that prevented files in dfs mounted
149 areas from being renamed
150
151 I now attempt to automount shares that are referenced by
152 DFS links but which do not exist. This is a bodge nescessary
153 as RAP ShareEnum drops shares with names > 12 chars long.
154 If I ever implement RCP then this problem will go away.
155
156 Still have some problem with cvs updates on dfs mounted dirs,
157 CVS controlled files (CVS/Template) appears to become unexpectedly
158 readonly.
159
160 DFS implementation is a mess and should be a seperate program,
161 it makes the outrageous assumption that all the DFS links appear
162 on and point to a single machine (works for me, sorry).
163
164 MAC signing still doesn't work and I still cannot see why.
165
166
167 ------------------------------------------------------------
168 Tarted up dfsrootinfo - now works properly.
169
170 1/ I can find the domain controller (look up the domain name in dns,
171         I.E. _ldap._tcp.pdc._msdcs.snellwilcox.local).
172
173 2/ I can find the domain name by doing a referral request for "" to the domain controller
174
175 3/ I can find the DFS root servers by using these replies in another referral request
176
177 However I cannot find the name of the share at the root of DFS
178
179 I could also find the closest server by doing a DNS lookup for
180 _ldap._tcp.SITENAME._sites.dc._msdcs.snellwilcox.local where sitenameis the site.
181 Unfortunately this site name seems to come only from LDAP
182
183 On the positive side it looks like jsut a dns lookup of snellwilcox.local
184 will return entries in increasing "distance from you" order - I.E. pick the first one.
185
186 Wed Sep 28 14:49:40 BST 2005
187
188 Dfs almost works, needs to trim the requested name by the number of chars in 'used'
189
190 Still reckon dfs should be a seperate program so I can do DFS lookups of "" and "domain"
191 and do the binds of namespaces as they appear.
192
193 looks like I can find the domain controller through DNS.
194
195
196 Name mapping is starting to work but I have hit a problem. I am keeping the share pointer in the aux
197 structure and this is wrong. I need to search the share table for the correct name when I resolve names
198 I may also need to resolve a machine name table! Not sure if this is a good idea or not This would give
199 a directory of machine names with shares under it and files under that.
200 The alternative is to bind in seperate file servers on demand.
201
202 /* FIXME: path+used - in T2getdfsreferral below is wrong - unicode means you cannot add pointers */
203 T2setfilelength(Session *s, Share *sp, int fh, FInfo *fip)      /* FIXME: maybe broken, needs tested. */
204
205
206 Wed Sep 14 11:31:11 BST 2005
207
208
209 Proper support for deleting opened files added. Added a Filetable synthetic file
210 as part of the debug - probably junk this soon but I have left it in as it might
211 help with some other debugging.
212
213 Still have problems with cvs which I don't understand:
214         
215         cvs [update aborted]: cannot write <CVS/Template file>: Permission denied
216
217 Seems to be opening the file with 17 mode (truncate and write)
218 causes the problem but its intermitant.
219
220 Sept 8th
221
222 cannot delet (or probably rename) open files. probably need to keep a seperate list
223 of open file structures so all fids ont a file can be closed (and later reopened
224 for rename()) by filename
225
226 July 26
227         MAC signing still broken, only enabled with a compile option, see mkfile
228
229         mschap moved out of factotum temporarly so we can try to get MAC signing to work.
230
231         Openfile synthetic always seems to give permission denied
232
233         DFS only just started, need more info on how it is really implemented.
234
235         share enum disappointing - seems there really is no way to enumerate
236                 shares with names that are more than 13 (correct ?) chars long.
237
238
239 July 6 2005
240         new auth structure in place
241
242         NTLMv2 works fine.
243
244         MAC signing should work but doesn't.
245         
246         The lm hash I generate for those protocols is rubbish. This means MAC
247         signing will not work with LM auth.
248
249         Currently cifs uses proto=pass rather than proto=mschap in an attempt to
250         get MAC signing to work. I need the internal hashes to generate the MAC key used
251         to sign packets and this is not exposed by factotum at present. I have got to get
252         MAC signing to work first, longer term I will alter the struct comming back from
253         factotum to add a MACkey field.
254
255         need to update code to do multiple trans2 calls so I can get full user and
256         node lists.
257
258         rpc looks like its not too difficult after all - see workbench.c - this would
259         allow more stats gathering and, more importantly  SID to name mapping.
260
261         maybe need to modify the rap calls so they malloc the structures required
262         and make sure they are properly freed after use.
263
264         dfs support is not really done yet, initial stab seems to work for /n/???/Dfsroot
265
266         DFS startup attaches to the domain - how to find the very first CIFS server?
267
268         DFS failure on walk(2) should result in a new attach, maybe via plumber
269         or perhaps just forking another instance of cifs.
270
271 ----------------------------------------------------------------
272
273 aquarela fails
274         fixed server timestamp in negioate
275         bodged support of GENERRIC_READ/WRITE/EXECUTE in smb_com_open
276         added find_first+full_directory_info & find_next+full_directory_info 
277         added smb_com_write_andx
278         allow set info to change attributes
279         trans2_set_file_information
280
281 Win95 set file length using CIFSwrite won't work as that uses writeandx
282 and write and x of zero buyes doesn't truncate the file.
283
284 need to test large read and writes (IE > MTU) which
285 are enabled by CAP_LARGE_READ and CAP_LARGE_WRITE,
286 unfortunately I don't have a win32 machine with >= 2GB
287 free space.
288
289 We connect with the same multiplex ID and source machine name
290 so a given server will drop old connections when new ones are made.
291
292 There is a TRANS2 to change the name of an open file but is it
293 worth it - I cannot do anything else to an open file.
294
295 DEC Pathworks servers may add trailing whitespace to filenames. We don't
296 dare strip this at present as whitespace is a vaid filename character
297 these days. maybe we should have a commandline option for this. Experience
298 will tell.
299  
300 Known CIFS problems
301 ~~~~~~~~~~~~~~~~~~~
302 NT adds a trailing zero as part of the filename in findfirst/findnext,
303 This is not a problem for us as we treat filenames as zero terminated anyway.
304
305 Core Setattr function doesn't appear to work under Windows NT4
306
307 It isn't possible to set datestamps on directories under Win95
308
309 It is necessary to seek to EOF to get stat() to report the correct
310 size for files that are open.