* [9fans] cifsd @ 2010-09-21 3:34 cinap_lenrek 2010-09-22 0:35 ` Akshat 0 siblings, 1 reply; 8+ messages in thread From: cinap_lenrek @ 2010-09-21 3:34 UTC (permalink / raw) To: 9fans after doing some patching on aquarela, wrote a cifs/smb server from scratch and got it down to 3350 lines of code. it uses binary regular expressions to unpack and pack the various nested sub-structures in the packets. /n/sources/cinap_lenrek/cifsd.tgz http://9hal.ath.cx/usr/cinap_lenrek/cifsd.tgz features include: run from listen(8) as none, so more secure. uses syslog() for informational logging (auth/share accesses/errors/warnings). debug tracing can be done with a separate debug trace file. open/read/write/close/rename/delete files and directories. fixed auth so it doesnt fail half the time. the trick was to delay the auth failure to the TREE_CONNECT_ANDX, otherwise windows will try over and over again with wrong password and username combinations. moving files/directories works by returning a special error code to instruct the client to do a recursive copy. impements/pretends enougth IPC$/rap to get the local share listed. not implemented: oplocks wildcard matching (will do (again)) netbios nameservice named pipes/mailslots setting file attributes NT_TRANSACT / acls anything i'v not seen while testing with w2k and wxp i'm interested in feedback. expecially tests with vista or w7. -- cinap ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] cifsd 2010-09-21 3:34 [9fans] cifsd cinap_lenrek @ 2010-09-22 0:35 ` Akshat 2010-09-22 15:05 ` David Leimbach 0 siblings, 1 reply; 8+ messages in thread From: Akshat @ 2010-09-22 0:35 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Just for the official record: cifsd works perfectly fine with Windows 7. Cinap's approach to the problem of packet-based protocols is elegant, efficient, and through the invent of printf-alike functions, fits well with the Plan 9 programming suite/style. Well done. ak On Sep 20, 2010, at 20:34, cinap_lenrek@gmx.de wrote: > after doing some patching on aquarela, wrote a cifs/smb server > from scratch and got it down to 3350 lines of code. > > it uses binary regular expressions to unpack and pack the > various nested sub-structures in the packets. > > /n/sources/cinap_lenrek/cifsd.tgz > http://9hal.ath.cx/usr/cinap_lenrek/cifsd.tgz > > features include: > > run from listen(8) as none, so more secure. > > uses syslog() for informational logging (auth/share > accesses/errors/warnings). debug tracing can be done with a separate > debug trace file. > > open/read/write/close/rename/delete files and directories. > > fixed auth so it doesnt fail half the time. the trick was to delay the > auth failure to the TREE_CONNECT_ANDX, otherwise windows > will try over and over again with wrong password and username > combinations. > > moving files/directories works by returning a special error code to > instruct the client to do a recursive copy. > > impements/pretends enougth IPC$/rap to get the local share listed. > > not implemented: > > oplocks > wildcard matching (will do (again)) > netbios nameservice > named pipes/mailslots > setting file attributes > NT_TRANSACT / acls > anything i'v not seen while testing with w2k and wxp > > i'm interested in feedback. expecially tests with vista or w7. > > -- > cinap > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] cifsd 2010-09-22 0:35 ` Akshat @ 2010-09-22 15:05 ` David Leimbach 2011-04-13 9:54 ` Sergey Kornilovich 0 siblings, 1 reply; 8+ messages in thread From: David Leimbach @ 2010-09-22 15:05 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs [-- Attachment #1: Type: text/plain, Size: 2145 bytes --] On Tue, Sep 21, 2010 at 5:35 PM, Akshat <akumar@mail.nanosouffle.net> wrote: > Just for the official record: cifsd works perfectly fine with Windows 7. > > Cinap's approach to the problem of packet-based protocols is elegant, > efficient, and through the invent of printf-alike functions, fits well with > the Plan 9 programming suite/style. > Looks like a LinkedIn recommendation! I would use this but I've been happily windows free for years now. Windows 7 seems to be drawing people back in, but I'm not sure I want to make the leap yet. Depends if Apple turns Mac OS X into the iOS developer platform only or not I suppose. Dave > > Well done. > ak > > On Sep 20, 2010, at 20:34, cinap_lenrek@gmx.de wrote: > > after doing some patching on aquarela, wrote a cifs/smb server >> from scratch and got it down to 3350 lines of code. >> >> it uses binary regular expressions to unpack and pack the >> various nested sub-structures in the packets. >> >> /n/sources/cinap_lenrek/cifsd.tgz >> http://9hal.ath.cx/usr/cinap_lenrek/cifsd.tgz >> >> features include: >> >> run from listen(8) as none, so more secure. >> >> uses syslog() for informational logging (auth/share >> accesses/errors/warnings). debug tracing can be done with a separate >> debug trace file. >> >> open/read/write/close/rename/delete files and directories. >> >> fixed auth so it doesnt fail half the time. the trick was to delay the >> auth failure to the TREE_CONNECT_ANDX, otherwise windows >> will try over and over again with wrong password and username >> combinations. >> >> moving files/directories works by returning a special error code to >> instruct the client to do a recursive copy. >> >> impements/pretends enougth IPC$/rap to get the local share listed. >> >> not implemented: >> >> oplocks >> wildcard matching (will do (again)) >> netbios nameservice >> named pipes/mailslots >> setting file attributes >> NT_TRANSACT / acls >> anything i'v not seen while testing with w2k and wxp >> >> i'm interested in feedback. expecially tests with vista or w7. >> >> -- >> cinap >> >> >> > [-- Attachment #2: Type: text/html, Size: 2899 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] cifsd 2010-09-22 15:05 ` David Leimbach @ 2011-04-13 9:54 ` Sergey Kornilovich 2011-04-13 13:39 ` cinap_lenrek [not found] ` <127c3a0c5e2e64da53701bf15949aa08@gmx.de> 0 siblings, 2 replies; 8+ messages in thread From: Sergey Kornilovich @ 2011-04-13 9:54 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs [-- Attachment #1: Type: text/plain, Size: 2772 bytes --] Trying to connect the vac file through cifsd. net use Y: \ \ 192.168.0.190 \ 1.vac (/ lib/vac/1.vac exist and "9fs 1.vac" command mount 1.vac in / n / 1) But on the windows client receives: C: \> net use Y: \ \ 192.168.0.190 \ 1.vac pause for 1 minute System error 64 has occurred. The specified network name is no longer available. Show you how to do it right? P.S. Local connection works fine. C: \> net use Y: \ \ 192.168.0.190 \ local The command completed successfully. 2010/9/22 David Leimbach <leimy2k@gmail.com> > > > On Tue, Sep 21, 2010 at 5:35 PM, Akshat <akumar@mail.nanosouffle.net>wrote: > >> Just for the official record: cifsd works perfectly fine with Windows 7. >> >> Cinap's approach to the problem of packet-based protocols is elegant, >> efficient, and through the invent of printf-alike functions, fits well with >> the Plan 9 programming suite/style. >> > > Looks like a LinkedIn recommendation! I would use this but I've been > happily windows free for years now. Windows 7 seems to be drawing people > back in, but I'm not sure I want to make the leap yet. Depends if Apple > turns Mac OS X into the iOS developer platform only or not I suppose. > > Dave > > >> >> Well done. >> ak >> >> On Sep 20, 2010, at 20:34, cinap_lenrek@gmx.de wrote: >> >> after doing some patching on aquarela, wrote a cifs/smb server >>> from scratch and got it down to 3350 lines of code. >>> >>> it uses binary regular expressions to unpack and pack the >>> various nested sub-structures in the packets. >>> >>> /n/sources/cinap_lenrek/cifsd.tgz >>> http://9hal.ath.cx/usr/cinap_lenrek/cifsd.tgz >>> >>> features include: >>> >>> run from listen(8) as none, so more secure. >>> >>> uses syslog() for informational logging (auth/share >>> accesses/errors/warnings). debug tracing can be done with a separate >>> debug trace file. >>> >>> open/read/write/close/rename/delete files and directories. >>> >>> fixed auth so it doesnt fail half the time. the trick was to delay the >>> auth failure to the TREE_CONNECT_ANDX, otherwise windows >>> will try over and over again with wrong password and username >>> combinations. >>> >>> moving files/directories works by returning a special error code to >>> instruct the client to do a recursive copy. >>> >>> impements/pretends enougth IPC$/rap to get the local share listed. >>> >>> not implemented: >>> >>> oplocks >>> wildcard matching (will do (again)) >>> netbios nameservice >>> named pipes/mailslots >>> setting file attributes >>> NT_TRANSACT / acls >>> anything i'v not seen while testing with w2k and wxp >>> >>> i'm interested in feedback. expecially tests with vista or w7. >>> >>> -- >>> cinap >>> >>> >>> >> > [-- Attachment #2: Type: text/html, Size: 3793 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] cifsd 2011-04-13 9:54 ` Sergey Kornilovich @ 2011-04-13 13:39 ` cinap_lenrek [not found] ` <127c3a0c5e2e64da53701bf15949aa08@gmx.de> 1 sibling, 0 replies; 8+ messages in thread From: cinap_lenrek @ 2011-04-13 13:39 UTC (permalink / raw) To: root81; +Cc: 9fans [-- Attachment #1: Type: text/plain, Size: 531 bytes --] cifsd expetcts that the 9fs $foo command mounts the filesystem to /n/$foo where $foo is derived from the smb share name by turning all upper case characters to lower case. so if 9fs vac.1 mounts to /n/1 instead of /n/vac.1 you will get a empty directory in cifsd because it will look in /n/vac.1. but this does not explain the error 64... do you logon to the cifsd server with the right plan9 user name? have you tried running the 9fs command as the same user? do you see anything in /sys/log/cifsd? -- cinap [-- Attachment #2: Type: message/rfc822, Size: 10263 bytes --] [-- Attachment #2.1.1: Type: text/plain, Size: 2772 bytes --] Trying to connect the vac file through cifsd. net use Y: \ \ 192.168.0.190 \ 1.vac (/ lib/vac/1.vac exist and "9fs 1.vac" command mount 1.vac in / n / 1) But on the windows client receives: C: \> net use Y: \ \ 192.168.0.190 \ 1.vac pause for 1 minute System error 64 has occurred. The specified network name is no longer available. Show you how to do it right? P.S. Local connection works fine. C: \> net use Y: \ \ 192.168.0.190 \ local The command completed successfully. 2010/9/22 David Leimbach <leimy2k@gmail.com> > > > On Tue, Sep 21, 2010 at 5:35 PM, Akshat <akumar@mail.nanosouffle.net>wrote: > >> Just for the official record: cifsd works perfectly fine with Windows 7. >> >> Cinap's approach to the problem of packet-based protocols is elegant, >> efficient, and through the invent of printf-alike functions, fits well with >> the Plan 9 programming suite/style. >> > > Looks like a LinkedIn recommendation! I would use this but I've been > happily windows free for years now. Windows 7 seems to be drawing people > back in, but I'm not sure I want to make the leap yet. Depends if Apple > turns Mac OS X into the iOS developer platform only or not I suppose. > > Dave > > >> >> Well done. >> ak >> >> On Sep 20, 2010, at 20:34, cinap_lenrek@gmx.de wrote: >> >> after doing some patching on aquarela, wrote a cifs/smb server >>> from scratch and got it down to 3350 lines of code. >>> >>> it uses binary regular expressions to unpack and pack the >>> various nested sub-structures in the packets. >>> >>> /n/sources/cinap_lenrek/cifsd.tgz >>> http://9hal.ath.cx/usr/cinap_lenrek/cifsd.tgz >>> >>> features include: >>> >>> run from listen(8) as none, so more secure. >>> >>> uses syslog() for informational logging (auth/share >>> accesses/errors/warnings). debug tracing can be done with a separate >>> debug trace file. >>> >>> open/read/write/close/rename/delete files and directories. >>> >>> fixed auth so it doesnt fail half the time. the trick was to delay the >>> auth failure to the TREE_CONNECT_ANDX, otherwise windows >>> will try over and over again with wrong password and username >>> combinations. >>> >>> moving files/directories works by returning a special error code to >>> instruct the client to do a recursive copy. >>> >>> impements/pretends enougth IPC$/rap to get the local share listed. >>> >>> not implemented: >>> >>> oplocks >>> wildcard matching (will do (again)) >>> netbios nameservice >>> named pipes/mailslots >>> setting file attributes >>> NT_TRANSACT / acls >>> anything i'v not seen while testing with w2k and wxp >>> >>> i'm interested in feedback. expecially tests with vista or w7. >>> >>> -- >>> cinap >>> >>> >>> >> > [-- Attachment #2.1.2: Type: text/html, Size: 3793 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <127c3a0c5e2e64da53701bf15949aa08@gmx.de>]
* Re: [9fans] cifsd [not found] ` <127c3a0c5e2e64da53701bf15949aa08@gmx.de> @ 2011-04-13 19:13 ` Sergey Kornilovich [not found] ` <8a63b9e03865e2e31f270437530f46a8@gmx.de> 0 siblings, 1 reply; 8+ messages in thread From: Sergey Kornilovich @ 2011-04-13 19:13 UTC (permalink / raw) To: cinap_lenrek; +Cc: Fans of the OS Plan 9 from Bell Labs [-- Attachment #1: Type: text/plain, Size: 4274 bytes --] You are right. To test, I changed the file 9fs adding: case vac vacfs /lib/vac/1.vac but C: \> net use Y: \\192.168.1.200\vac pause for 1 minute System error 64 has occurred. The specified network name is no longer available. I run cifsd -t /sys/log/cifsd server Apr 13 22:43:45 (<nil>\<nil>) started [908] server Apr 13 22:43:45 (<nil>\bootes) auth successfull server Apr 13 22:43:45 (<nil>\bootes) mapshare \\192.168.1.200\IPC$ -> IPC IPC$ /dev/null server Apr 13 22:43:45 (<nil>\bootes) mapshare \\192.168.1.200\VAC -> A: vac /n/vac 2011/4/13 <cinap_lenrek@gmx.de> > cifsd expetcts that the 9fs $foo command mounts the filesystem to > /n/$foo where $foo is derived from the smb share name by turning all > upper case characters to lower case. > > so if 9fs vac.1 mounts to /n/1 instead of /n/vac.1 you will get a > empty directory in cifsd because it will look in /n/vac.1. > > but this does not explain the error 64... > > do you logon to the cifsd server with the right plan9 user name? have > you tried running the 9fs command as the same user? > > do you see anything in /sys/log/cifsd? > > -- > cinap > > > ---------- Пересылаемое сообщение ---------- > From: Sergey Kornilovich <root81@gmail.com> > To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> > Date: Wed, 13 Apr 2011 13:54:34 +0400 > Subject: Re: [9fans] cifsd > > Trying to connect the vac file through cifsd. > net use Y: \ \ 192.168.0.190 \ 1.vac (/ lib/vac/1.vac exist and "9fs 1.vac" > command mount 1.vac in / n / 1) > But on the windows client receives: > C: \> net use Y: \ \ 192.168.0.190 \ 1.vac > pause for 1 minute > System error 64 has occurred. > > The specified network name is no longer available. > > Show you how to do it right? > > P.S. Local connection works fine. > C: \> net use Y: \ \ 192.168.0.190 \ local > The command completed successfully. > > 2010/9/22 David Leimbach <leimy2k@gmail.com> > >> >> >> On Tue, Sep 21, 2010 at 5:35 PM, Akshat <akumar@mail.nanosouffle.net>wrote: >> >>> Just for the official record: cifsd works perfectly fine with Windows 7. >>> >>> Cinap's approach to the problem of packet-based protocols is elegant, >>> efficient, and through the invent of printf-alike functions, fits well with >>> the Plan 9 programming suite/style. >>> >> >> Looks like a LinkedIn recommendation! I would use this but I've been >> happily windows free for years now. Windows 7 seems to be drawing people >> back in, but I'm not sure I want to make the leap yet. Depends if Apple >> turns Mac OS X into the iOS developer platform only or not I suppose. >> >> Dave >> >> >>> >>> Well done. >>> ak >>> >>> On Sep 20, 2010, at 20:34, cinap_lenrek@gmx.de wrote: >>> >>> after doing some patching on aquarela, wrote a cifs/smb server >>>> from scratch and got it down to 3350 lines of code. >>>> >>>> it uses binary regular expressions to unpack and pack the >>>> various nested sub-structures in the packets. >>>> >>>> /n/sources/cinap_lenrek/cifsd.tgz >>>> http://9hal.ath.cx/usr/cinap_lenrek/cifsd.tgz >>>> >>>> features include: >>>> >>>> run from listen(8) as none, so more secure. >>>> >>>> uses syslog() for informational logging (auth/share >>>> accesses/errors/warnings). debug tracing can be done with a separate >>>> debug trace file. >>>> >>>> open/read/write/close/rename/delete files and directories. >>>> >>>> fixed auth so it doesnt fail half the time. the trick was to delay the >>>> auth failure to the TREE_CONNECT_ANDX, otherwise windows >>>> will try over and over again with wrong password and username >>>> combinations. >>>> >>>> moving files/directories works by returning a special error code to >>>> instruct the client to do a recursive copy. >>>> >>>> impements/pretends enougth IPC$/rap to get the local share listed. >>>> >>>> not implemented: >>>> >>>> oplocks >>>> wildcard matching (will do (again)) >>>> netbios nameservice >>>> named pipes/mailslots >>>> setting file attributes >>>> NT_TRANSACT / acls >>>> anything i'v not seen while testing with w2k and wxp >>>> >>>> i'm interested in feedback. expecially tests with vista or w7. >>>> >>>> -- >>>> cinap >>>> >>>> >>>> >>> >> > > [-- Attachment #2: Type: text/html, Size: 5650 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <8a63b9e03865e2e31f270437530f46a8@gmx.de>]
* Re: [9fans] cifsd [not found] ` <8a63b9e03865e2e31f270437530f46a8@gmx.de> @ 2011-04-13 19:54 ` Sergey Kornilovich [not found] ` <44c6348b3cbf2ea7573e33e6013a21c0@gmx.de> 0 siblings, 1 reply; 8+ messages in thread From: Sergey Kornilovich @ 2011-04-13 19:54 UTC (permalink / raw) To: cinap_lenrek; +Cc: Fans of the OS Plan 9 from Bell Labs [-- Attachment #1: Type: text/plain, Size: 6107 bytes --] cat /bin/service/tcp445 #!/bin/rc exec /bin/ip/cifsd -t -d -f /sys/log/cifsd.debug ps|grep cifsd bootes 374 0:00 0:00 212K Pread cifsd bootes 908 0:00 0:00 212K Pread cifsd bootes 1391 0:00 0:00 212K Pread cifsd none 2332 0:00 0:00 212K Pread cifsd none 2527 0:00 0:00 212K Pread cifsd tail -f /sys/log/cifsd.debug started [2527] [72] SMB_COM_NEGOTIATE [0] PC NETWORK PROGRAM 1.0 [1] LANMAN1.0 [2] Windows for Workgroups 3.1a [3] LM1.2X002 [4] LANMAN2.1 [5] NT LM 0.12 [6] SMB 2.002 [7] SMB 2.??? respond: err=0 [73] SMB_COM_SESSION_SETUP_ANX bs=8000 cap=d4 user=KROK dom=KROK os= lanman= auth successfull [75] SMB_COM_TREE_CONNECT_ANDX mapshare \\192.168.1.200\IPC$ -> IPC IPC$ /dev/null [ff] SMB_COM_NO_ANDX_COMMAND respond: err=0 [73] SMB_COM_SESSION_SETUP_ANX bs=8000 cap=d4 user=KROK dom=KROK os= lanman= [75] SMB_COM_TREE_CONNECT_ANDX mapshare \\192.168.1.200\VAC -> A: vac /n/vac 13 апреля 2011 г. 23:24 пользователь <cinap_lenrek@gmx.de> написал: > check with ps that there are no broken cifsd processes for > bootes... if there are, run acid <pid> and type lstk() to get > a stacktrace... > > if this is not the case... lets enable more debugging to figure out > whats going on... > > add -d -f /sys/log/cifsd.debug option to /bin/service/tcp445 command line. > > create a world writable append only file in /sys/log > > touch /sys/log/cifsd.debug > chmod a+wa /sys/log/cifsd.debug > > -- > cinap > > > ---------- Пересылаемое сообщение ---------- > From: Sergey Kornilovich <root81@gmail.com> > To: cinap_lenrek@gmx.de > Date: Wed, 13 Apr 2011 23:13:22 +0400 > Subject: Re: [9fans] cifsd > You are right. > To test, I changed the file 9fs adding: > > case vac > vacfs /lib/vac/1.vac > but > C: \> net use Y: \\192.168.1.200\vac > pause for 1 minute > System error 64 has occurred. > > The specified network name is no longer available. > I run cifsd -t > /sys/log/cifsd > server Apr 13 22:43:45 (<nil>\<nil>) started [908] > server Apr 13 22:43:45 (<nil>\bootes) auth successfull > server Apr 13 22:43:45 (<nil>\bootes) mapshare \\192.168.1.200\IPC$ -> IPC > IPC$ /dev/null > server Apr 13 22:43:45 (<nil>\bootes) mapshare \\192.168.1.200\VAC -> A: > vac /n/vac > > > 2011/4/13 <cinap_lenrek@gmx.de> > >> cifsd expetcts that the 9fs $foo command mounts the filesystem to >> /n/$foo where $foo is derived from the smb share name by turning all >> upper case characters to lower case. >> >> so if 9fs vac.1 mounts to /n/1 instead of /n/vac.1 you will get a >> empty directory in cifsd because it will look in /n/vac.1. >> >> but this does not explain the error 64... >> >> do you logon to the cifsd server with the right plan9 user name? have >> you tried running the 9fs command as the same user? >> >> do you see anything in /sys/log/cifsd? >> >> -- >> cinap >> >> >> ---------- Пересылаемое сообщение ---------- >> From: Sergey Kornilovich <root81@gmail.com> >> To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> >> Date: Wed, 13 Apr 2011 13:54:34 +0400 >> Subject: Re: [9fans] cifsd >> >> Trying to connect the vac file through cifsd. >> net use Y: \ \ 192.168.0.190 \ 1.vac (/ lib/vac/1.vac exist and "9fs >> 1.vac" command mount 1.vac in / n / 1) >> But on the windows client receives: >> C: \> net use Y: \ \ 192.168.0.190 \ 1.vac >> pause for 1 minute >> System error 64 has occurred. >> >> The specified network name is no longer available. >> >> Show you how to do it right? >> >> P.S. Local connection works fine. >> C: \> net use Y: \ \ 192.168.0.190 \ local >> The command completed successfully. >> >> 2010/9/22 David Leimbach <leimy2k@gmail.com> >> >>> >>> >>> On Tue, Sep 21, 2010 at 5:35 PM, Akshat <akumar@mail.nanosouffle.net>wrote: >>> >>>> Just for the official record: cifsd works perfectly fine with Windows 7. >>>> >>>> Cinap's approach to the problem of packet-based protocols is elegant, >>>> efficient, and through the invent of printf-alike functions, fits well with >>>> the Plan 9 programming suite/style. >>>> >>> >>> Looks like a LinkedIn recommendation! I would use this but I've been >>> happily windows free for years now. Windows 7 seems to be drawing people >>> back in, but I'm not sure I want to make the leap yet. Depends if Apple >>> turns Mac OS X into the iOS developer platform only or not I suppose. >>> >>> Dave >>> >>> >>>> >>>> Well done. >>>> ak >>>> >>>> On Sep 20, 2010, at 20:34, cinap_lenrek@gmx.de wrote: >>>> >>>> after doing some patching on aquarela, wrote a cifs/smb server >>>>> from scratch and got it down to 3350 lines of code. >>>>> >>>>> it uses binary regular expressions to unpack and pack the >>>>> various nested sub-structures in the packets. >>>>> >>>>> /n/sources/cinap_lenrek/cifsd.tgz >>>>> http://9hal.ath.cx/usr/cinap_lenrek/cifsd.tgz >>>>> >>>>> features include: >>>>> >>>>> run from listen(8) as none, so more secure. >>>>> >>>>> uses syslog() for informational logging (auth/share >>>>> accesses/errors/warnings). debug tracing can be done with a separate >>>>> debug trace file. >>>>> >>>>> open/read/write/close/rename/delete files and directories. >>>>> >>>>> fixed auth so it doesnt fail half the time. the trick was to delay the >>>>> auth failure to the TREE_CONNECT_ANDX, otherwise windows >>>>> will try over and over again with wrong password and username >>>>> combinations. >>>>> >>>>> moving files/directories works by returning a special error code to >>>>> instruct the client to do a recursive copy. >>>>> >>>>> impements/pretends enougth IPC$/rap to get the local share listed. >>>>> >>>>> not implemented: >>>>> >>>>> oplocks >>>>> wildcard matching (will do (again)) >>>>> netbios nameservice >>>>> named pipes/mailslots >>>>> setting file attributes >>>>> NT_TRANSACT / acls >>>>> anything i'v not seen while testing with w2k and wxp >>>>> >>>>> i'm interested in feedback. expecially tests with vista or w7. >>>>> >>>>> -- >>>>> cinap >>>>> >>>>> >>>>> >>>> >>> >> >> > > [-- Attachment #2: Type: text/html, Size: 8044 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <44c6348b3cbf2ea7573e33e6013a21c0@gmx.de>]
[parent not found: <BANLkTikGY+Q6Xp94LcGEAq0o=NhjsKRFTg@mail.gmail.com>]
* [9fans] Fwd: cifsd [not found] ` <BANLkTikGY+Q6Xp94LcGEAq0o=NhjsKRFTg@mail.gmail.com> @ 2011-04-14 11:52 ` Sergey Kornilovich 0 siblings, 0 replies; 8+ messages in thread From: Sergey Kornilovich @ 2011-04-14 11:52 UTC (permalink / raw) Thanks, now everything works fine. But if you want that windows clients can connect any vacfile (in /lib/vac or $home/lib/vac), you must modify the file /bin/9fs. This is: vacfs -m /n/`{basename $1.vac} `{cat $score} To this: vacfs -p -m /n/`{basename $1} `{cat $ score} (-p Disables permission checking) If anyone knows a more elegant way to do it, I'll be glad to hear. 14 ?????? 2011 ?. 1:06 ???????????? <cinap_lenrek at gmx.de> ???????: > with further thought... i removed the pipe code and now redirect > /sys/log/cifsd to stdout/stderr of /bin/9fs and just do a wait() call > to see if it terminates. i think this is the cleanest thing todo and doesnt > leak any filedescriptors into 9fs... > > the changed code in question is in share.c of the cifsd.tgz tarball. > > -- > cinap > > > ---------- ???????????? ????????? ---------- > From: Sergey Kornilovich <root81 at gmail.com> > To: cinap_lenrek at gmx.de > Date: Wed, 13 Apr 2011 23:54:32 +0400 > > Subject: Re: [9fans] cifsd > > cat /bin/service/tcp445 > #!/bin/rc > exec /bin/ip/cifsd -t -d -f /sys/log/cifsd.debug > > ps|grep cifsd > bootes 374 0:00 0:00 212K Pread cifsd > bootes 908 0:00 0:00 212K Pread cifsd > bootes 1391 0:00 0:00 212K Pread cifsd > none 2332 0:00 0:00 212K Pread cifsd > none 2527 0:00 0:00 212K Pread cifsd > > tail -f /sys/log/cifsd.debug > started [2527] > [72] SMB_COM_NEGOTIATE > [0] PC NETWORK PROGRAM 1.0 > [1] LANMAN1.0 > [2] Windows for Workgroups 3.1a > [3] LM1.2X002 > [4] LANMAN2.1 > [5] NT LM 0.12 > [6] SMB 2.002 > [7] SMB 2.??? > respond: err=0 > > [73] SMB_COM_SESSION_SETUP_ANX > bs=8000 cap=d4 user=KROK dom=KROK os= lanman= > auth successfull > [75] SMB_COM_TREE_CONNECT_ANDX > mapshare \\192.168.1.200\IPC$ -> IPC IPC$ /dev/null > [ff] SMB_COM_NO_ANDX_COMMAND > respond: err=0 > > [73] SMB_COM_SESSION_SETUP_ANX > bs=8000 cap=d4 user=KROK dom=KROK os= lanman= > [75] SMB_COM_TREE_CONNECT_ANDX > mapshare \\192.168.1.200\VAC -> A: vac /n/vac > > > 13 ?????? 2011 ?. 23:24 ???????????? <cinap_lenrek at gmx.de> ???????: > >> check with ps that there are no broken cifsd processes for >> bootes... if there are, run acid <pid> and type lstk() to get >> a stacktrace... >> >> if this is not the case... lets enable more debugging to figure out >> whats going on... >> >> add -d -f /sys/log/cifsd.debug option to /bin/service/tcp445 command line. >> >> create a world writable append only file in /sys/log >> >> touch /sys/log/cifsd.debug >> chmod a+wa /sys/log/cifsd.debug >> >> -- >> cinap >> >> >> ---------- ???????????? ????????? ---------- >> From: Sergey Kornilovich <root81 at gmail.com> >> To: cinap_lenrek at gmx.de >> Date: Wed, 13 Apr 2011 23:13:22 +0400 >> Subject: Re: [9fans] cifsd >> You are right. >> To test, I changed the file 9fs adding: >> >> case vac >> vacfs /lib/vac/1.vac >> but >> C: \> net use Y: \\192.168.1.200\vac >> pause for 1 minute >> System error 64 has occurred. >> >> The specified network name is no longer available. >> I run cifsd -t >> /sys/log/cifsd >> server Apr 13 22:43:45 (<nil>\<nil>) started [908] >> server Apr 13 22:43:45 (<nil>\bootes) auth successfull >> server Apr 13 22:43:45 (<nil>\bootes) mapshare \\192.168.1.200\IPC$ -> IPC >> IPC$ /dev/null >> server Apr 13 22:43:45 (<nil>\bootes) mapshare \\192.168.1.200\VAC -> A: >> vac /n/vac >> >> >> 2011/4/13 <cinap_lenrek at gmx.de> >> >>> cifsd expetcts that the 9fs $foo command mounts the filesystem to >>> /n/$foo where $foo is derived from the smb share name by turning all >>> upper case characters to lower case. >>> >>> so if 9fs vac.1 mounts to /n/1 instead of /n/vac.1 you will get a >>> empty directory in cifsd because it will look in /n/vac.1. >>> >>> but this does not explain the error 64... >>> >>> do you logon to the cifsd server with the right plan9 user name? have >>> you tried running the 9fs command as the same user? >>> >>> do you see anything in /sys/log/cifsd? >>> >>> -- >>> cinap >>> >>> >>> ---------- ???????????? ????????? ---------- >>> From: Sergey Kornilovich <root81 at gmail.com> >>> To: Fans of the OS Plan 9 from Bell Labs <9fans at 9fans.net> >>> Date: Wed, 13 Apr 2011 13:54:34 +0400 >>> Subject: Re: [9fans] cifsd >>> >>> Trying to connect the vac file through cifsd. >>> net use Y: \ \ 192.168.0.190 \ 1.vac (/ lib/vac/1.vac exist and "9fs >>> 1.vac" command mount 1.vac in / n / 1) >>> But on the windows client receives: >>> C: \> net use Y: \ \ 192.168.0.190 \ 1.vac >>> pause for 1 minute >>> System error 64 has occurred. >>> >>> The specified network name is no longer available. >>> >>> Show you how to do it right? >>> >>> P.S. Local connection works fine. >>> C: \> net use Y: \ \ 192.168.0.190 \ local >>> The command completed successfully. >>> >>> 2010/9/22 David Leimbach <leimy2k at gmail.com> >>> >>>> >>>> >>>> On Tue, Sep 21, 2010 at 5:35 PM, Akshat <akumar at mail.nanosouffle.net>wrote: >>>> >>>>> Just for the official record: cifsd works perfectly fine with Windows >>>>> 7. >>>>> >>>>> Cinap's approach to the problem of packet-based protocols is elegant, >>>>> efficient, and through the invent of printf-alike functions, fits well with >>>>> the Plan 9 programming suite/style. >>>>> >>>> >>>> Looks like a LinkedIn recommendation! I would use this but I've been >>>> happily windows free for years now. Windows 7 seems to be drawing people >>>> back in, but I'm not sure I want to make the leap yet. Depends if Apple >>>> turns Mac OS X into the iOS developer platform only or not I suppose. >>>> >>>> Dave >>>> >>>> >>>>> >>>>> Well done. >>>>> ak >>>>> >>>>> On Sep 20, 2010, at 20:34, cinap_lenrek at gmx.de wrote: >>>>> >>>>> after doing some patching on aquarela, wrote a cifs/smb server >>>>>> from scratch and got it down to 3350 lines of code. >>>>>> >>>>>> it uses binary regular expressions to unpack and pack the >>>>>> various nested sub-structures in the packets. >>>>>> >>>>>> /n/sources/cinap_lenrek/cifsd.tgz >>>>>> http://9hal.ath.cx/usr/cinap_lenrek/cifsd.tgz >>>>>> >>>>>> features include: >>>>>> >>>>>> run from listen(8) as none, so more secure. >>>>>> >>>>>> uses syslog() for informational logging (auth/share >>>>>> accesses/errors/warnings). debug tracing can be done with a separate >>>>>> debug trace file. >>>>>> >>>>>> open/read/write/close/rename/delete files and directories. >>>>>> >>>>>> fixed auth so it doesnt fail half the time. the trick was to delay the >>>>>> auth failure to the TREE_CONNECT_ANDX, otherwise windows >>>>>> will try over and over again with wrong password and username >>>>>> combinations. >>>>>> >>>>>> moving files/directories works by returning a special error code to >>>>>> instruct the client to do a recursive copy. >>>>>> >>>>>> impements/pretends enougth IPC$/rap to get the local share listed. >>>>>> >>>>>> not implemented: >>>>>> >>>>>> oplocks >>>>>> wildcard matching (will do (again)) >>>>>> netbios nameservice >>>>>> named pipes/mailslots >>>>>> setting file attributes >>>>>> NT_TRANSACT / acls >>>>>> anything i'v not seen while testing with w2k and wxp >>>>>> >>>>>> i'm interested in feedback. expecially tests with vista or w7. >>>>>> >>>>>> -- >>>>>> cinap >>>>>> >>>>>> >>>>>> >>>>> >>>> >>> >>> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.9fans.net/private/9fans/attachments/20110414/b2291567/attachment.html> ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-04-14 11:52 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-09-21 3:34 [9fans] cifsd cinap_lenrek 2010-09-22 0:35 ` Akshat 2010-09-22 15:05 ` David Leimbach 2011-04-13 9:54 ` Sergey Kornilovich 2011-04-13 13:39 ` cinap_lenrek [not found] ` <127c3a0c5e2e64da53701bf15949aa08@gmx.de> 2011-04-13 19:13 ` Sergey Kornilovich [not found] ` <8a63b9e03865e2e31f270437530f46a8@gmx.de> 2011-04-13 19:54 ` Sergey Kornilovich [not found] ` <44c6348b3cbf2ea7573e33e6013a21c0@gmx.de> [not found] ` <BANLkTikGY+Q6Xp94LcGEAq0o=NhjsKRFTg@mail.gmail.com> 2011-04-14 11:52 ` [9fans] Fwd: cifsd Sergey Kornilovich
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).