summaryrefslogtreecommitdiff
path: root/net/samba/files/patch-source::rpcclient::cmd_reg.c
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-05-25 08:17:45 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-05-25 08:17:45 +0000
commit562781456c3ad0bc23150211dd9f2f2b4e9936c8 (patch)
tree08f93e1f1c1a37bee2c7deb0377878470e89841f /net/samba/files/patch-source::rpcclient::cmd_reg.c
parent- Update to version 0.3.6 (diff)
- Teach rpcclient to recognize parameters in -c <command> correctly, ie.:
rpcclient -c "shutdown -r" <host> PR: ports/66746 Submitted by: Rudolf Cejka <cejkar@fit.vutbr.cz>
Notes
Notes: svn path=/head/; revision=109939
Diffstat (limited to 'net/samba/files/patch-source::rpcclient::cmd_reg.c')
-rw-r--r--net/samba/files/patch-source::rpcclient::cmd_reg.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/net/samba/files/patch-source::rpcclient::cmd_reg.c b/net/samba/files/patch-source::rpcclient::cmd_reg.c
new file mode 100644
index 000000000000..0af2a8c3ddf7
--- /dev/null
+++ b/net/samba/files/patch-source::rpcclient::cmd_reg.c
@@ -0,0 +1,24 @@
+--- 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)
+ {