ports/66746: net/samba: rpcclient does not recognize parameters in -c ...
Rudolf Cejka
cejkar at fit.vutbr.cz
Mon May 17 14:30:26 UTC 2004
>Number: 66746
>Category: ports
>Synopsis: net/samba: rpcclient does not recognize parameters in -c ...
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon May 17 07:30:25 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator: Rudolf Cejka
>Release: FreeBSD 4.9-STABLE i386
>Organization:
FIT, Brno University of Technology, Czech Republic
>Environment:
>Description:
rpcclient from net/samba (and it seems that from net/samba-devel too)
does not recognize parameters in -c <command> correctly.
>How-To-Repeat:
Try to run rpcclient -c "shutdown -r" <host> - it shutdowns computer
instead of rebooting, because it does not recognize -r parameter in
command after -c. Please add following patch to our ports until samba
team understand, that they should solve their hack more correctly
(I reported it in the past already, but obviously without any effect :o|).
>Fix:
--- CUT HERE (BEGIN)
--- source/rpcclient/cmd_reg.c.orig Thu Nov 27 12:17:08 2003
+++ source/rpcclient/cmd_reg.c Thu Nov 27 12:19:24 2003
@@ -900,6 +900,9 @@
{
extern char *optarg;
extern int optind;
+#if defined(__FreeBSD__)
+ extern int optreset;
+#endif
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
fstring msg;
uint32 timeout = 20;
@@ -907,7 +910,11 @@
int opt;
*msg = 0;
+#if defined(__FreeBSD__)
+ optreset = optind = 1;
+#else
optind = 0; /* TODO: test if this hack works on other systems too --simo */
+#endif
while ((opt = getopt(argc, argv, "m:t:rf")) != EOF)
{
--- CUT HERE (END)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list