[PATCH] rpcclient man page

Neil Hoggarth neil.hoggarth at physiol.ox.ac.uk
Tue Oct 30 08:59:15 GMT 2001


Hi Folks,

The man page for rpcclient in the 2.2 branch suggests that its usage is
similar to smbclient, with optional arguments at the end of the command
line:

  rpcclient non-optional-server-name [optional arguments]

In fact the program as distributed uses standard getopt type processing,
and optional arguments must be placed *before* the server name if they
are to recognised by many getopt implementations; the getopt in GNU libc
appears to find optional arguments anywhere on the command line, but
this is not the case on Solaris, IRIX or (I suspect) most other Unixes,
where getopt stops when it finds the first non-option argument.

I enclose a trivial proposed patch which would bring the documentation
into line with the implementation, for those of us unfortunate enough to
be hurding non-GNU boxen. :-)

--- docs/docbook/manpages/rpcclient.1.sgml.orig	Tue Oct 30 16:35:56 2001
+++ docs/docbook/manpages/rpcclient.1.sgml	Tue Oct 30 16:36:21 2001
@@ -16,7 +16,6 @@
 <refsynopsisdiv>
 	<cmdsynopsis>
 		<command>rpcclient</command>
-		<arg choice="req">server</arg>
 		<arg choice="opt">-A authfile</arg>
 		<arg choice="opt">-c &lt;command string&gt;</arg>
 		<arg choice="opt">-d debuglevel</arg>
@@ -27,6 +26,7 @@
 		<arg choice="opt">-U username[%password]</arg>
 		<arg choice="opt">-W workgroup</arg>
 		<arg choice="opt">-N</arg>
+		<arg choice="req">server</arg>
 	</cmdsynopsis>
 </refsynopsisdiv>


(spot the BOFH who has just spent ages trying to figure out why
"rpcclient servername -U foo" doesn't work for any foo other than one
that matches the current $USER environment variable ...)

Regards,
-- 
Neil Hoggarth                                 Departmental Computer Officer
<neil.hoggarth at physiol.ox.ac.uk>                   Laboratory of Physiology
http://www.physiol.ox.ac.uk/~njh/                  University of Oxford, UK





More information about the samba-technical mailing list