aquarela manual, improved usage message, logfile written to /sys/log if it already exists. -Steve Notes: Sat Jan 7 11:41:04 EST 2006 rsc Where did the manual come from? It needs some work. I applied the other changes. Thanks. Russ Reference: /n/sources/patch/applied/aquarela-man Date: Sat Jan 7 01:40:40 CET 2006 Reviewed-by: rsc --- /sys/src/cmd/aquarela/aquarela.man Thu Jan 1 00:00:00 1970 +++ /sys/src/cmd/aquarela/aquarela.man Sat Jan 7 01:38:42 2006 @@ -0,0 +1,131 @@ +.TH aquarela 8 +.SH NAME +aquarela \- Microsoft\(tm Windows filesystem server +.SH SYNOPSIS +.B aquarela +[ +.B -d +.I option +] [ +.B -n +] [ +.B -p +] [ +.B -u +.I 0|1 +] [ +.B -w +.I name +] +.SH DESCRIPTION +.I Aquarela +listens on port 455, 137, and optionally 129 for incomming +Microsoft file shareing protocol (also know as +.SM SMB or +.SM CIFS +) requests for files and fulfills these from its namespace. +.PP +.I Aquarela's +authentication uses the Inferno/pop secret held by the auth server. +Transcoding is peformed between spaces and non breaking spaces to accommodate +fileservers other than fossil. Debug and log messages are appended to +.L /sys/log/aquarela +if it exists. +By default the share +.B / +is offered, which reprisents the root of +the local plan9 filesystem. If a different name is requested by the +client then +.I 9fs(1) +is envoked to attach that filesystem, which is then exported instead. +.PP +The options are: +.TP +.B -d +.I option +Enable one of many possible debugging options; see below +.TP +.B -n +Enable vestigial NetBios support, a NetBios listener is started +to answer name queries, to register the the local host with the Local +Master Browser for the chosen workgroup. +.I Aquarela +can not not act as a Local Master Borwser, so relies on the existence +of an external one on the network, e.g. Samba's +.IR nmbd(1) . +This option is required to make the local machine appear in +.I Windows +machines +.IR Network Neighbourhood , +however windows machines do not need this if they map a drive directly +to the plan9 systems +.SM IP +address. +.TP +.B -p +Sends log messages to standard output, as well as to the log file. +.TP +.B -u +.I 0|1 +Enable or disable Unicode support; since there is no code page support, +the server actually sends +.SM UTF +if this is disabled +.TP +.B -w +.I name +Sets the workgroup (or primary domain) to name. The default is +.SM PLAN9 +.SH "DEBUG OPTIONS" +.TP +.B allcmds +All +.SM SMB +requests and responses +.TP +.B tids +Connection and disconnection of clients to shares +.TP +.B sids +Creation and deletion of search ids +.TP +.B fids +Creation and deletion of file ids +.TP +.B rap2 +RAP calls +.TP +.B find +Trans2 find commands +.TP +.B query +Trans2 query commands +.TP +.B sharedfiles +All files opened +.TP +.B poolparanoia +Draconian error checking in memory allocator +.TP +.B sessions +Connections and disconnections to the server +.TP +.B rep +Regular expression conversions +.TP +.B locks +Locking activity +.TP +.B any-smb-name +If the debug option matches the symbolic name of a +.SM SMB +request or transaction2 sub-request +(e.g. +.SM SMB_COM_SESSION_SETUP_ANDX +or +.SM SMB_TRANS2_FIND_FIRST2 +) logging is enabled for just that message type. +.TP +.B 0xnn +A 2 digit hex constant enables debugging of the message with this +numeric id. --- /sys/src/cmd/aquarela/aquarela.c Sat Jan 7 01:38:57 2006 +++ /sys/src/cmd/aquarela/aquarela.c Sat Jan 7 01:38:53 2006 @@ -176,8 +176,8 @@ void usage(void) { - print("usage: aquarela [-u unicodevalue]\n"); - threadexitsall(""); + fprint(2, "usage: %s [-d debug-opt] [-n] [-p] [-u 1|0] [-w workgroup]\n", argv0); + threadexitsall("usage"); } static void --- /sys/src/cmd/aquarela/smbglobals.c Sat Jan 7 01:39:17 2006 +++ /sys/src/cmd/aquarela/smbglobals.c Sat Jan 7 01:39:13 2006 @@ -36,8 +36,11 @@ if (smbglobals.serverinfo.remark == nil) smbglobals.serverinfo.remark = "This is a default server comment"; if (smbglobals.log.fd < 0) - if (client) + if (client){ smbglobals.log.fd = create("client.log", OWRITE|OTRUNC, 0666); - else - smbglobals.log.fd = create("aquarela.log", OWRITE|OTRUNC, 0666); + } + else{ + if (access("/sys/log/aquarela", 2) == 0) + smbglobals.log.fd = open("/sys/log/aquarela", OWRITE); + } }