summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-12-03 04:39:23 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-12-03 04:39:23 +0000
commitfeb4f52f134d463c9871cd1709897a4b9ccfc6d2 (patch)
treea6483dd7fbe93c5c1f71af3bf372c06a793991b5 /source3/utils/net_rpc.c
parent25ea74978f4ef8ae8c605e6ba559b2e57fccd407 (diff)
downloadsamba-feb4f52f134d463c9871cd1709897a4b9ccfc6d2.tar.gz
samba-feb4f52f134d463c9871cd1709897a4b9ccfc6d2.tar.bz2
samba-feb4f52f134d463c9871cd1709897a4b9ccfc6d2.zip
This is another major rework of the 'net' command.
This time, all the existing functionality has been moved into 'net rap', ready for new commands in the 'net ads' and 'net rpc' categories. In particular, we hope to have the abilty to autoselect the appropriate backend to use based on smb.conf or other paramaters. This will allow 'net user' to work no matter what the remote server. The new 'net rpc' command will soon gain a 'net rpc join' and a 'net rpc user' based on the existing samba code. Also in this commit, the connection establishment code has been almost entirly reworked, and now has some minor sense of sainity to it. In particular, we can now connect to hosts *other* than localhost! We also have the ability to state on a per-command basis whether the 'localhost' is a sane default value. (A net join, for example, would not be sane against localhost). Unfortunetly we have had to make the basic paramaters global variables, but the 'cli' is not opened and closed on a per-command basis. Andrew Bartlett (This used to be commit 8739d426caabe3794a018dd28ab139b08f88b603)
Diffstat (limited to 'source3/utils/net_rpc.c')
-rw-r--r--source3/utils/net_rpc.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
new file mode 100644
index 0000000000..db4c0c881d
--- /dev/null
+++ b/source3/utils/net_rpc.c
@@ -0,0 +1,36 @@
+/*
+ Samba Unix/Linux SMB client library
+ Version 3.0
+ Distributed SMB/CIFS Server Management Utility
+ Copyright (C) 2001 Andrew Bartlett (abartlet@samba.org)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include "includes.h"
+#include "../utils/net.h"
+
+int net_rpc_usage(int argc, const char **argv)
+{
+ d_printf("\nNot implemented\n");
+ return -1;
+}
+
+int net_rpc(int argc, const char **argv)
+{
+ struct functable func[] = {
+ {NULL, NULL}
+ };
+ return net_run_function(argc, argv, func, net_rpc_usage);
+}