From 8e16021383b95ed5169555f12e11af70603c92b6 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 3 Dec 2001 06:49:47 +0000 Subject: Forgot this one with the last commit... Andrew Bartlett (This used to be commit 8dbd9702d829eaefcdab8e3f8a4750befa884234) --- source3/utils/net.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 source3/utils/net.h (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h new file mode 100644 index 0000000000..689b9cd76b --- /dev/null +++ b/source3/utils/net.h @@ -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. */ + +#define NET_FLAGS_MASTER 1 +#define NET_FLAGS_DMB 2 + +/* Would it be insane to set 'localhost' as the default + remote host for this operation? + + For example, localhost is insane for a 'join' operation. +*/ +#define NET_FLAGS_LOCALHOST_DEFAULT_INSANE 3 + + +extern int opt_maxusers; +extern char *opt_comment; +extern int opt_flags; + +extern int opt_long_list_entries; -- cgit From 275a9f4ef74747970b0bd16b1cf1943812080343 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 4 Dec 2001 04:48:01 +0000 Subject: Some changes to the name resolution code in 'net' to allow us to find a PDC, as well as changes for correctness as per tridge. Andrew Bartlett (This used to be commit 16d302c5cc0da93a58e0ce10843f9c8d8062c689) --- source3/utils/net.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 689b9cd76b..a3905d8a58 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -28,9 +28,15 @@ */ #define NET_FLAGS_LOCALHOST_DEFAULT_INSANE 3 +/* We want to find the PDC only */ +#define NET_FLAGS_PDC 4 + extern int opt_maxusers; extern char *opt_comment; extern int opt_flags; +extern char *opt_comment; + +extern char *opt_target_workgroup; extern int opt_long_list_entries; -- cgit From cf90455854b2ad71a0b5aca2fcba84113ec1452a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 5 Dec 2001 03:14:35 +0000 Subject: Add a new flag for anonymous connections (This used to be commit 5a96391c75fd13b2fc385aa571244b82bc4736d0) --- source3/utils/net.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index a3905d8a58..bdc4a08868 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -31,6 +31,9 @@ /* We want to find the PDC only */ #define NET_FLAGS_PDC 4 +/* We want an anonymous connection */ +#define NET_FLAGS_ANONYMOUS 5 + extern int opt_maxusers; extern char *opt_comment; -- cgit From 8ba00d147bbdb705b411e182433632c81a036188 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 5 Dec 2001 11:00:26 +0000 Subject: OK. Smbpasswd -j is DEAD. This moves the rest of the functionality into the 'net rpc join' code. Futhermore, this moves that entire area over to the libsmb codebase, rather than the crufty old rpc_client stuff. I have also fixed up the smbpasswd -a -m bug in the process. We also have a new 'net rpc changetrustpw' that can be called from a cron-job to regularly change the trust account password, for sites that run winbind but not smbd. With a little more work, we can kill rpc_client from smbd entirly! (It is mostly the domain auth stuff - which I can rework - and the spoolss stuff that sombody else will need to look over). Andrew Bartlett (This used to be commit 575897e879fc175ba702adf245384033342c903d) --- source3/utils/net.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index bdc4a08868..e912efe09e 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -26,13 +26,13 @@ For example, localhost is insane for a 'join' operation. */ -#define NET_FLAGS_LOCALHOST_DEFAULT_INSANE 3 +#define NET_FLAGS_LOCALHOST_DEFAULT_INSANE 4 /* We want to find the PDC only */ -#define NET_FLAGS_PDC 4 +#define NET_FLAGS_PDC 8 /* We want an anonymous connection */ -#define NET_FLAGS_ANONYMOUS 5 +#define NET_FLAGS_ANONYMOUS 16 extern int opt_maxusers; -- cgit From a0681820e687e576e78ddc91bd9b94a4099bc26a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 31 Dec 2001 13:00:59 +0000 Subject: Add 'net rpc shutdown' and 'net rpc abortshutdown'. These two little features are very useful, but the passing of options about needs some serious work. The popt stuff in the shutdown code is #ifdef'ed out until the main popt loop can be convinced not to chew on the options :-( Andrew Bartlett (This used to be commit 51c985be7fbfe5627c5b2590e7610653e7be98e3) --- source3/utils/net.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index e912efe09e..2217458005 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -43,3 +43,6 @@ extern char *opt_comment; extern char *opt_target_workgroup; extern int opt_long_list_entries; +extern int opt_reboot; +extern int opt_force; +extern int opt_timeout; -- cgit From cd68afe31256ad60748b34f7318a180cfc2127cc Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 30 Jan 2002 06:08:46 +0000 Subject: Removed version number from file header. Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa) --- source3/utils/net.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 2217458005..048a1d1eb4 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -1,6 +1,5 @@ /* Samba Unix/Linux SMB client library - Version 3.0 Distributed SMB/CIFS Server Management Utility Copyright (C) 2001 Andrew Bartlett (abartlet@samba.org) -- cgit From 85a7948337e81f7ff84bc7aa50596aef52f0e36c Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Wed, 10 Apr 2002 13:28:28 +0000 Subject: Add a few option externs for net_ads.c (This used to be commit 4e3265c3c94583ac7ee48017d195ad98ecdfbc47) --- source3/utils/net.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 048a1d1eb4..af6f153f7b 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -45,3 +45,7 @@ extern int opt_long_list_entries; extern int opt_reboot; extern int opt_force; extern int opt_timeout; +extern char *opt_host; +extern char *opt_user_name; +extern char *opt_password; +extern BOOL opt_user_specified; -- cgit From e90b65284812aaa5ff9e9935ce9bbad7791cbbcd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Jul 2002 10:35:28 +0000 Subject: updated the 3.0 branch from the head branch - ready for alpha18 (This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce) --- source3/utils/net.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index af6f153f7b..86bdf2082e 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -16,6 +16,8 @@ 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 "../utils/net_proto.h" #define NET_FLAGS_MASTER 1 #define NET_FLAGS_DMB 2 @@ -49,3 +51,6 @@ extern char *opt_host; extern char *opt_user_name; extern char *opt_password; extern BOOL opt_user_specified; + +extern const char *share_type[]; + -- cgit From 634c54310c92c48dd4eceec602e230a021bdcfc5 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 3 Jan 2003 08:28:12 +0000 Subject: Merge from HEAD - make Samba compile with -Wwrite-strings without additional warnings. (Adds a lot of const). Andrew Bartlett (This used to be commit 3a7458f9472432ef12c43008414925fd1ce8ea0c) --- source3/utils/net.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 86bdf2082e..6fa4bd6bce 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -37,20 +37,24 @@ extern int opt_maxusers; -extern char *opt_comment; +extern const char *opt_comment; extern int opt_flags; -extern char *opt_comment; +extern const char *opt_comment; -extern char *opt_target_workgroup; +extern const char *opt_target_workgroup; +extern const char *opt_workgroup; extern int opt_long_list_entries; extern int opt_reboot; extern int opt_force; extern int opt_timeout; -extern char *opt_host; -extern char *opt_user_name; -extern char *opt_password; +extern const char *opt_host; +extern const char *opt_user_name; +extern const char *opt_password; extern BOOL opt_user_specified; +extern BOOL opt_have_ip; +extern struct in_addr opt_dest_ip; + extern const char *share_type[]; -- cgit From 9eeab10e54e9e94082ced649b33ee45b4f59f858 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 15 Jan 2003 16:10:57 +0000 Subject: [merge] * removed unused variable from rpcclient code * added container option to net command (patch from SuSE) * Makefile patch for examples/VFS from SuSE (This used to be commit 25a9681ddda47a41fac8fdc97ca50b7f4c579eaf) --- source3/utils/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 6fa4bd6bce..c1b49a919b 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -38,6 +38,7 @@ extern int opt_maxusers; extern const char *opt_comment; +extern char *opt_container; extern int opt_flags; extern const char *opt_comment; -- cgit From f071020f5e49837154581c97c5af5f84d0e2de89 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 21 Apr 2003 14:09:03 +0000 Subject: Merge from HEAD - save the type of channel used to contact the DC. This allows us to join as a BDC, without appearing on the network as one until we have the database replicated, and the admin changes the configuration. This also change the SID retreval order from secrets.tdb, so we no longer require a 'net rpc getsid' - the sid fetch during the domain join is sufficient. Also minor fixes to 'net'. Andrew Bartlett (This used to be commit 876e00fd112e4aaf7519eec27f382eb99ec7562a) --- source3/utils/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index c1b49a919b..f83d0169bf 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -38,7 +38,7 @@ extern int opt_maxusers; extern const char *opt_comment; -extern char *opt_container; +extern const char *opt_container; extern int opt_flags; extern const char *opt_comment; -- cgit From c3125b6e2f1e1916faeb02460ab9064ab65dc8a9 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Thu, 23 Oct 2003 14:33:19 +0000 Subject: Fix bug 451. Stop net -P from prompting for machine account password. Based on work by Ken Cross (kcross@nssolutions.com). (This used to be commit 8ef7ac22ef1a60dca0a2d01dc6ff4ba14bc1549a) --- source3/utils/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index f83d0169bf..78c0aad86a 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -48,6 +48,7 @@ extern const char *opt_workgroup; extern int opt_long_list_entries; extern int opt_reboot; extern int opt_force; +extern int opt_machine_pass; extern int opt_timeout; extern const char *opt_host; extern const char *opt_user_name; -- cgit From 784c631a3a3fcaef22873b5ab2389cd15b13d0a1 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 8 Feb 2004 10:59:09 +0000 Subject: Make it possible to 'net rpc samdump' of any domain you are currently joined to, despite any smb.conf settings. Work to allow the same for 'net rpc vampire', but instead give a clear error message on what is incorrect. Andrew Bartlett (This used to be commit 6b629344c5a4061d6052fa91f8429b337bab95fb) --- source3/utils/net.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 78c0aad86a..94e6de9d18 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -35,6 +35,8 @@ /* We want an anonymous connection */ #define NET_FLAGS_ANONYMOUS 16 +/* don't open an RPC pipe */ +#define NET_FLAGS_NO_PIPE 32 extern int opt_maxusers; extern const char *opt_comment; -- cgit From d9819ec090bb533b79a257daa3461045c2422c05 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 26 Feb 2004 11:29:56 +0000 Subject: Implement 'net groupmap set' and 'net groupmap cleanup'. I was rather annoyed by the net groupmap syntax, I could never get it right. net groupmap set "domain admins" domadm creates a mapping, net groupmap set "domain admins" -C "Comment" -N "newntname" should also do what you expect. I'd like to have some feedback on the usability of this. net groupmap cleanup solves a problem I've had two times now: Our SID changed, and a user's primary group was mapped to a SID that is not ours. net groupmap cleanup removes all mappings that are not from our domain sid. Volker (This used to be commit eb4d4faff8c14e999f414ca5b6e8c25a558859c8) --- source3/utils/net.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 94e6de9d18..62d5a74237 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -57,6 +57,11 @@ extern const char *opt_user_name; extern const char *opt_password; extern BOOL opt_user_specified; +extern BOOL opt_localgroup; +extern BOOL opt_domaingroup; +extern const char *opt_newntname; +extern int opt_rid; + extern BOOL opt_have_ip; extern struct in_addr opt_dest_ip; -- cgit From 7f00878fe607901ee25fec328553d00e114d4bf3 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 18 Apr 2004 20:22:31 +0000 Subject: r269: Patch from Krischan Jodies : Implement 'net rpc group delete'. Volker (This used to be commit ec321674961cc62c048b149ee19b6e36325c8eb3) --- source3/utils/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 62d5a74237..ba3a4e1435 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -48,6 +48,7 @@ extern const char *opt_comment; extern const char *opt_target_workgroup; extern const char *opt_workgroup; extern int opt_long_list_entries; +extern int opt_verbose; extern int opt_reboot; extern int opt_force; extern int opt_machine_pass; -- cgit From 60727acc3b33cb90309a43c10813fadcb94142eb Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 10 Aug 2004 14:27:17 +0000 Subject: r1692: first commit :) * add IA64 to the architecture table of printer-drivers * add new "net"-subcommands: net rpc printer migrate {drivers|printers|forms|security|settings|all} [printer] net rpc share migrate {shares|files|all} [share] this is the first part of the migration suite. this will will (once feature-complete) allow to do 1:1 server-cloning in the best possible way by making heavy use of samba's rpc_client-functions. all migration-steps are implemented as rpc/smb-client-calls; net communicates via rpc/smb with two servers at the same time (a remote, source server and a destination server that currently defaults to the local smbd). this allows e. g. printer-driver migration including driverfiles, recursive mirroring of file-shares including file-acls, etc. almost any migration step can be called with a migrate-subcommand to provide more flexibility during a migration process (at the cost of quite some redundancy :) ). "net rpc printer migrate settings" is still in a bad condition (many open questions that hopefully can be adressed soon). "net rpc share migrate security" as an isolated call to just migrate share-ACLs will be added later. Before playing with it, make sure to use a test-server. Migration is a serious business and this tool-set can perfectly overwrite your existing file/print-shares. * along with the migration functions had to make I the following changes: - implement setprinter level 3 client-side - implement net_add_share level 502 client-side - allow security descriptor to be set in setprinterdata level 2 serverside guenther (This used to be commit 8f1716a29b7e85baf738bc14df7dabf03762f723) --- source3/utils/net.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index ba3a4e1435..cb38907ff9 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -62,6 +62,8 @@ extern BOOL opt_localgroup; extern BOOL opt_domaingroup; extern const char *opt_newntname; extern int opt_rid; +extern int opt_acls; +extern const char *opt_exclude; extern BOOL opt_have_ip; extern struct in_addr opt_dest_ip; -- cgit From 19e949a91ba342ec1de2c01e5bfddf8392cb68b5 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 20 Aug 2004 20:13:05 +0000 Subject: r1966: further work on and cleanup of the net-migration-tool. It's now possible to migrate files preserving dos-attributes and correct timestamps. Also added some small docu- and syntax-fixes. Guenther (This used to be commit 0e990582a0416933a8671ca660d22e980f828402) --- source3/utils/net.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index cb38907ff9..29498b9108 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -63,6 +63,8 @@ extern BOOL opt_domaingroup; extern const char *opt_newntname; extern int opt_rid; extern int opt_acls; +extern int opt_attrs; +extern int opt_timestamps; extern const char *opt_exclude; extern BOOL opt_have_ip; -- cgit From e4c4d91896f08dadf3bc52e067941adb60de0e00 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 26 Aug 2004 21:37:20 +0000 Subject: r2080: Remove last traces of static migration to localhost. Needed to allow a local netbios-alias bound to non-loopback interface as a migration target. It's now possible to migrate printers|shares|files from Server A to Server B while running the net-command on client C. Guenther (This used to be commit 0cfd2866dfe5e959ede169a77c39480790300de3) --- source3/utils/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 29498b9108..d75a19e498 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -66,6 +66,7 @@ extern int opt_acls; extern int opt_attrs; extern int opt_timestamps; extern const char *opt_exclude; +extern const char *opt_destination; extern BOOL opt_have_ip; extern struct in_addr opt_dest_ip; -- cgit From b4cf9e95059071df49b34ff8574e48cb96f42da1 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 7 Oct 2004 04:01:18 +0000 Subject: r2835: Since we always have -I. and -I$(srcdir) in CFLAGS, we can get rid of '..' from all #include preprocessor commands. This fixes bugzilla #1880 where OpenVMS gets confused about the '.' characters. (This used to be commit 7f161702fa4916979602cc0295919b541912acd6) --- source3/utils/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index d75a19e498..5e65ca0d4c 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "../utils/net_proto.h" +#include "utils/net_proto.h" #define NET_FLAGS_MASTER 1 #define NET_FLAGS_DMB 2 -- cgit From 862e610e4af0eb8b660c5526401cbe6f751444be Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 18 Jan 2005 14:46:24 +0000 Subject: r4820: add beginnings of 'net rpc rights' for managing privilege assignments (This used to be commit 164f94e52929330bd638f19bcf3bfce50303269e) --- source3/utils/net.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 5e65ca0d4c..2d9fbd1644 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -17,8 +17,21 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* + * A function of this type is passed to the ' + * run_rpc_command' wrapper. Must go before the net_proto.h + * include + */ + +typedef NTSTATUS (*rpc_command_fn)(const DOM_SID *, const char *, + struct cli_state *, TALLOC_CTX *, int, const char **); + +/* INCLUDE FILES */ + #include "utils/net_proto.h" +/* MACROS & DEFINES */ + #define NET_FLAGS_MASTER 1 #define NET_FLAGS_DMB 2 -- cgit From ebb42167c9912492428e7ed8e03f06505a5c86fe Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Sun, 12 Jun 2005 21:18:16 +0000 Subject: r7512: Fix net share migrate files to also migrate the ACLs of the top level dir of a share. Till now we excluded '.' and '..' in general. For the fix the information about top or lower level dir is stored in the copy_clistate. src and dst share are now also part of this struct and we only pass a pointer to the struct to the functions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This bug was found by Bill Calero of Novell. Thanks Bill! With this checkin no new functionality was added. But the copy_clistate already knows about a mode. Later beside the migrate an additional report mode will be added. This changes are coordinated with Günther . Lars (This used to be commit 506aaefa3716c7683eef9afe0d1bb5b6e2533c4b) --- source3/utils/net.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 2d9fbd1644..ebabf605dd 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -26,6 +26,16 @@ typedef NTSTATUS (*rpc_command_fn)(const DOM_SID *, const char *, struct cli_state *, TALLOC_CTX *, int, const char **); +typedef struct copy_clistate { + TALLOC_CTX *mem_ctx; + struct cli_state *cli_share_src; + struct cli_state *cli_share_dst; + char *cwd; + BOOL top_level_dir; + uint16 attribute; + int mode; +}copy_clistate; + /* INCLUDE FILES */ #include "utils/net_proto.h" @@ -51,6 +61,9 @@ typedef NTSTATUS (*rpc_command_fn)(const DOM_SID *, const char *, /* don't open an RPC pipe */ #define NET_FLAGS_NO_PIPE 32 +/* net share operation modes */ +#define NET_MODE_SHARE_MIGRATE 1 + extern int opt_maxusers; extern const char *opt_comment; extern const char *opt_container; -- cgit From 7cbd740c62238406e64819e3594caeca341a25c9 Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Wed, 15 Jun 2005 14:24:11 +0000 Subject: r7609: Move top level dir handling in from of the loop. This makes the code much straither. copy_top_level_perms() is jra's work. I modified the copy_top_level_perms() function to use the copy_clistate. And I don't forget trunk. Lars (This used to be commit 2c68568e5232c057d4f76f4bb044c54d18272602) --- source3/utils/net.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index ebabf605dd..c67786cf9e 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -31,7 +31,6 @@ typedef struct copy_clistate { struct cli_state *cli_share_src; struct cli_state *cli_share_dst; char *cwd; - BOOL top_level_dir; uint16 attribute; int mode; }copy_clistate; -- cgit From 63c78a5e700f092a0fe93b1be08637474445470c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 23 Jun 2005 23:23:16 +0000 Subject: r7852: Correct fix from Lars for the argv issue. Jeremy. (This used to be commit a667d9e474302e888a0cc009a342da471318928c) --- source3/utils/net.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index c67786cf9e..0bec621c3c 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -32,7 +32,6 @@ typedef struct copy_clistate { struct cli_state *cli_share_dst; char *cwd; uint16 attribute; - int mode; }copy_clistate; /* INCLUDE FILES */ -- cgit From e0ffbfc5587ed296d5a9e8f5ed30b6e8b2cd6fcf Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Wed, 6 Jul 2005 21:02:43 +0000 Subject: r8189: commit vampire ldif patch, mostly from Don Watson (dwatson@us.ibm.com). Yes, that's my copyright...that's just how we have to do things at big blue. Adds subcommand to vampire to allow data to be put into an ldif file instead of actually writing to the passdb. See "net rpc help vampire" for usage info. This should be added to docs as well. (This used to be commit cb5634a305256a70daa2fcbd85d9a5459b4aeaa3) --- source3/utils/net.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 0bec621c3c..a2df6596b4 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -97,3 +97,16 @@ extern struct in_addr opt_dest_ip; extern const char *share_type[]; +/* Structure for mapping accounts to groups */ +/* Array element is the group rid */ +typedef struct _groupmap { + uint32 rid; + uint32 gidNumber; + fstring sambaSID; + fstring group_dn; +} GROUPMAP; + +typedef struct _accountmap { + uint32 rid; + fstring cn; +} ACCOUNTMAP; -- cgit From 54abd2aa66069e6baf7769c496f46d9dba18db39 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 30 Sep 2005 17:13:37 +0000 Subject: r10656: BIG merge from trunk. Features not copied over * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3) --- source3/utils/net.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index a2df6596b4..2df13cfb8f 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -23,16 +23,21 @@ * include */ -typedef NTSTATUS (*rpc_command_fn)(const DOM_SID *, const char *, - struct cli_state *, TALLOC_CTX *, int, const char **); - +typedef NTSTATUS (*rpc_command_fn)(const DOM_SID *, + const char *, + struct cli_state *cli, + struct rpc_pipe_client *, + TALLOC_CTX *, + int, + const char **); + typedef struct copy_clistate { TALLOC_CTX *mem_ctx; struct cli_state *cli_share_src; struct cli_state *cli_share_dst; char *cwd; uint16 attribute; -}copy_clistate; +}copy_clistate; /* INCLUDE FILES */ -- cgit From 0af1500fc0bafe61019f1b2ab1d9e1d369221240 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 3 Feb 2006 22:19:41 +0000 Subject: r13316: Let the carnage begin.... Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f) --- source3/utils/net.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 2df13cfb8f..fc3167012d 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -39,6 +39,29 @@ typedef struct copy_clistate { uint16 attribute; }copy_clistate; +struct rpc_sh_ctx { + struct cli_state *cli; + + DOM_SID *domain_sid; + char *domain_name; + + const char *whoami; + const char *thiscmd; + struct rpc_sh_cmd *cmds; + struct rpc_sh_ctx *parent; +}; + +struct rpc_sh_cmd { + const char *name; + struct rpc_sh_cmd *(*sub)(TALLOC_CTX *mem_ctx, + struct rpc_sh_ctx *ctx); + int pipe_idx; + NTSTATUS (*fn)(TALLOC_CTX *mem_ctx, struct rpc_sh_ctx *ctx, + struct rpc_pipe_client *pipe_hnd, + int argc, const char **argv); + const char *help; +}; + /* INCLUDE FILES */ #include "utils/net_proto.h" -- cgit From 2c029a8b96ae476f1d5c2abe14ee25f98a1513d8 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 12 May 2006 15:17:35 +0000 Subject: r15543: New implementation of 'net ads join' to be more like Windows XP. The motivating factor is to not require more privileges for the user account than Windows does when joining a domain. The points of interest are * net_ads_join() uses same rpc mechanisms as net_rpc_join() * Enable CLDAP queries for filling in the majority of the ADS_STRUCT->config information * Remove ldap_initialized() from sam/idmap_ad.c and libads/ldap.c * Remove some unnecessary fields from ADS_STRUCT * Manually set the dNSHostName and servicePrincipalName attribute using the machine account after the join Thanks to Guenther and Simo for the review. Still to do: * Fix the userAccountControl for DES only systems * Set the userPrincipalName in order to support things like 'kinit -k' (although we might be able to just use the sAMAccountName instead) * Re-add support for pre-creating the machine account in a specific OU (This used to be commit 4c4ea7b20f44cd200cef8c7b389d51b72eccc39b) --- source3/utils/net.h | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index fc3167012d..b1af230a65 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -68,24 +68,15 @@ struct rpc_sh_cmd { /* MACROS & DEFINES */ -#define NET_FLAGS_MASTER 1 -#define NET_FLAGS_DMB 2 - -/* Would it be insane to set 'localhost' as the default - remote host for this operation? - - For example, localhost is insane for a 'join' operation. -*/ -#define NET_FLAGS_LOCALHOST_DEFAULT_INSANE 4 - -/* We want to find the PDC only */ -#define NET_FLAGS_PDC 8 - -/* We want an anonymous connection */ -#define NET_FLAGS_ANONYMOUS 16 - -/* don't open an RPC pipe */ -#define NET_FLAGS_NO_PIPE 32 +#define NET_FLAGS_MASTER 0x00000001 +#define NET_FLAGS_DMB 0x00000002 +#define NET_FLAGS_LOCALHOST_DEFAULT_INSANE 0x00000004 /* Would it be insane to set 'localhost' + as the default remote host for this + operation? For example, localhost + is insane for a 'join' operation. */ +#define NET_FLAGS_PDC 0x00000008 /* PDC only */ +#define NET_FLAGS_ANONYMOUS 0x00000010 /* use an anonymous connection */ +#define NET_FLAGS_NO_PIPE 0x00000020 /* don't open an RPC pipe */ /* net share operation modes */ #define NET_MODE_SHARE_MIGRATE 1 -- cgit From 463e7c11711e0c511d81c892e4be621ea3bfe8b1 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 18 May 2006 20:12:45 +0000 Subject: r15701: change 'net ads leave' to disable the machine account in the domain (since removal implies greater permissions that Windows clients require) (This used to be commit ad1f947625612ef16adb69fc2cfeffc68a9a2e02) --- source3/utils/net.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index b1af230a65..d037871f82 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -62,6 +62,8 @@ struct rpc_sh_cmd { const char *help; }; +enum netdom_domain_t { ND_TYPE_NT4, ND_TYPE_AD }; + /* INCLUDE FILES */ #include "utils/net_proto.h" -- cgit From 18d417663395febe60b23f376b2e92c9869e1126 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 28 Sep 2006 21:19:08 +0000 Subject: r18981: * cleanup some vestiges of old cli_reg.c code and mark some TODO items in cac_winreg.c * Get 'net rpc registry enumerate' to list values again * Fix winreg.idl QueryInfoKey(). The max_subkeysize is the max_classlen (we previously had this correct in Samba3") * fix valgrind error about uninitialized memory and use-before-set on size value inmemset() call * Fix key enumeration in 'net rpc registry enumerate' * regenerate gen_dir files based on local pidl patches Please note that the generated ndr files are from my local copy of pidl. If you need to regenerate, please apply the patch that I posted to the samba-technical list earlier today. (This used to be commit 5d843612a1b9d92022f76626f1c7473faebec4ba) --- source3/utils/net.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index d037871f82..6d4468e934 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -67,6 +67,8 @@ enum netdom_domain_t { ND_TYPE_NT4, ND_TYPE_AD }; /* INCLUDE FILES */ #include "utils/net_proto.h" +#include "libmsrpc.h" + /* MACROS & DEFINES */ -- cgit From a40df6f92d42676a9184fb2c20a11d5662ca5b3a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 9 Apr 2007 10:38:55 +0000 Subject: r22135: Check in most of Michael Adam's net conf utility. A good share of this patch is moving functions around to fix some linker dependencies for the registry. Michael, I've renamed your auth_utils2.c to token_utils.c. Thanks! Volker (This used to be commit 9de16f25c1c3e0b203da47391772ef2e2fe291ac) --- source3/utils/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 6d4468e934..3739abdad7 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -114,6 +114,7 @@ extern int opt_attrs; extern int opt_timestamps; extern const char *opt_exclude; extern const char *opt_destination; +extern BOOL opt_testmode; extern BOOL opt_have_ip; extern struct in_addr opt_dest_ip; -- cgit From d824b98f80ba186030cbb70b3a1e5daf80469ecd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 9 Jul 2007 19:25:36 +0000 Subject: r23779: Change from v2 or later to v3 or later. Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3) --- source3/utils/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 3739abdad7..f3a43700d5 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -5,7 +5,7 @@ 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 + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -- cgit From 5e54558c6dea67b56bbfaba5698f3a434d3dffb6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 00:52:41 +0000 Subject: r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07) --- source3/utils/net.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index f3a43700d5..8fbd183606 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -14,8 +14,7 @@ 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. */ + along with this program. If not, see . */ /* * A function of this type is passed to the ' -- cgit From e5a951325a6cac8567af3a66de6d2df577508ae4 Mon Sep 17 00:00:00 2001 From: "Gerald (Jerry) Carter" Date: Wed, 10 Oct 2007 15:34:30 -0500 Subject: [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. (This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab) --- source3/utils/net.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 8fbd183606..795cc4d71a 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -66,8 +66,6 @@ enum netdom_domain_t { ND_TYPE_NT4, ND_TYPE_AD }; /* INCLUDE FILES */ #include "utils/net_proto.h" -#include "libmsrpc.h" - /* MACROS & DEFINES */ -- cgit From 30191d1a5704ad2b158386b511558972d539ce47 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Oct 2007 17:40:25 -0700 Subject: RIP BOOL. Convert BOOL -> bool. I found a few interesting bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f) --- source3/utils/net.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 795cc4d71a..d2deb931b8 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -100,10 +100,10 @@ extern int opt_timeout; extern const char *opt_host; extern const char *opt_user_name; extern const char *opt_password; -extern BOOL opt_user_specified; +extern bool opt_user_specified; -extern BOOL opt_localgroup; -extern BOOL opt_domaingroup; +extern bool opt_localgroup; +extern bool opt_domaingroup; extern const char *opt_newntname; extern int opt_rid; extern int opt_acls; @@ -111,9 +111,9 @@ extern int opt_attrs; extern int opt_timestamps; extern const char *opt_exclude; extern const char *opt_destination; -extern BOOL opt_testmode; +extern bool opt_testmode; -extern BOOL opt_have_ip; +extern bool opt_have_ip; extern struct in_addr opt_dest_ip; extern const char *share_type[]; -- cgit From 9a85533914119fb995fb61555c9f6e0018d4d181 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Oct 2007 11:38:36 -0700 Subject: Fix the popt / bool issues. Some places we used BOOL where we meant int. Fix this. Thanks to metze for pointing this out. Jeremy. (This used to be commit 793a9d24a163cb6cf5a3a0aa5ae30e9f8cf4744a) --- source3/utils/net.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index d2deb931b8..177c6d3601 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -102,8 +102,8 @@ extern const char *opt_user_name; extern const char *opt_password; extern bool opt_user_specified; -extern bool opt_localgroup; -extern bool opt_domaingroup; +extern int opt_localgroup; +extern int opt_domaingroup; extern const char *opt_newntname; extern int opt_rid; extern int opt_acls; @@ -111,9 +111,9 @@ extern int opt_attrs; extern int opt_timestamps; extern const char *opt_exclude; extern const char *opt_destination; -extern bool opt_testmode; +extern int opt_testmode; -extern bool opt_have_ip; +extern int opt_have_ip; extern struct in_addr opt_dest_ip; extern const char *share_type[]; -- cgit From f88b7a076be74a29a3bf876b4e2705f4a1ecf42b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 24 Oct 2007 14:16:54 -0700 Subject: This is a large patch (sorry). Migrate from struct in_addr to struct sockaddr_storage in most places that matter (ie. not the nmbd and NetBIOS lookups). This passes make test on an IPv4 box, but I'll have to do more work/testing on IPv6 enabled boxes. This should now give us a framework for testing and finishing the IPv6 migration. It's at the state where someone with a working IPv6 setup should (theorecically) be able to type : smbclient //ipv6-address/share and have it work. Jeremy. (This used to be commit 98e154c3125d5732c37a72d74b0eb5cd7b6155fd) --- source3/utils/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 177c6d3601..2ffa4d77b1 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -114,7 +114,7 @@ extern const char *opt_destination; extern int opt_testmode; extern int opt_have_ip; -extern struct in_addr opt_dest_ip; +extern struct sockaddr_storage opt_dest_ip; extern const char *share_type[]; -- cgit From c920764b1960f86482a24d4b4462664b07d4f1a9 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 15 Jan 2008 16:40:02 +0100 Subject: Apply const to rpccli_lsa_query_info_policy() and rpccli_lsa_query_info_policy2(). Guenther (This used to be commit 7a3fe68bef7acde9d9f8a7a44ce7e9432f3c5a95) --- source3/utils/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 2ffa4d77b1..3a4b1da7b0 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -42,7 +42,7 @@ struct rpc_sh_ctx { struct cli_state *cli; DOM_SID *domain_sid; - char *domain_name; + const char *domain_name; const char *whoami; const char *thiscmd; -- cgit From 0a362a94c8f720ad0805c0789433d3e70b86d1c3 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 16 Apr 2008 02:16:08 +0200 Subject: net/libnetapi: Include netapi headers early and free on exit. Guenther (This used to be commit 020b1e6431601fadf44dbfe8393908c096ecfa4c) --- source3/utils/net.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 3a4b1da7b0..00a818a606 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -22,6 +22,8 @@ * include */ +#include "lib/netapi/netapi.h" + typedef NTSTATUS (*rpc_command_fn)(const DOM_SID *, const char *, struct cli_state *cli, -- cgit From ba0bf87d967a9544b9c97525994a43ad5b6f1f60 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 21 Apr 2008 20:14:32 +0200 Subject: net: Add libnetapi context to net's impressive list of globals. Guenther (This used to be commit 8a5fadf6a183e4e4ccc77283b3ddba0748c6abfb) --- source3/utils/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 00a818a606..68ed179a7a 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -117,6 +117,7 @@ extern int opt_testmode; extern int opt_have_ip; extern struct sockaddr_storage opt_dest_ip; +extern struct libnetapi_ctx *netapi_ctx; extern const char *share_type[]; -- cgit From 378527215e663c0c9d36c565a16723e0a1979ea0 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Thu, 8 May 2008 09:14:16 +0200 Subject: net: Some whitespace clean-up. (This used to be commit 4dcce8b653671c8ce907f8353df1db8a5c8f8e19) --- source3/utils/net.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 68ed179a7a..4f390bb128 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -1,31 +1,31 @@ -/* - Samba Unix/Linux SMB client library - Distributed SMB/CIFS Server Management Utility +/* + Samba Unix/Linux SMB client library + 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 3 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, see . */ -/* +/* * A function of this type is passed to the ' - * run_rpc_command' wrapper. Must go before the net_proto.h + * run_rpc_command' wrapper. Must go before the net_proto.h * include */ #include "lib/netapi/netapi.h" typedef NTSTATUS (*rpc_command_fn)(const DOM_SID *, - const char *, + const char *, struct cli_state *cli, struct rpc_pipe_client *, TALLOC_CTX *, @@ -68,7 +68,7 @@ enum netdom_domain_t { ND_TYPE_NT4, ND_TYPE_AD }; /* INCLUDE FILES */ #include "utils/net_proto.h" - + /* MACROS & DEFINES */ #define NET_FLAGS_MASTER 0x00000001 @@ -77,7 +77,7 @@ enum netdom_domain_t { ND_TYPE_NT4, ND_TYPE_AD }; as the default remote host for this operation? For example, localhost is insane for a 'join' operation. */ -#define NET_FLAGS_PDC 0x00000008 /* PDC only */ +#define NET_FLAGS_PDC 0x00000008 /* PDC only */ #define NET_FLAGS_ANONYMOUS 0x00000010 /* use an anonymous connection */ #define NET_FLAGS_NO_PIPE 0x00000020 /* don't open an RPC pipe */ -- cgit From f5769109447d8da0f09b102d444a816ad97a00dc Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Fri, 9 May 2008 23:22:12 +0200 Subject: net: Remove globals (This used to be commit 1e9319cf88b65a2a8d4f5099a1fe5297e405ed2e) --- source3/utils/net.h | 88 +++++++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 40 deletions(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 4f390bb128..15b1dd402b 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -24,7 +24,8 @@ #include "lib/netapi/netapi.h" -typedef NTSTATUS (*rpc_command_fn)(const DOM_SID *, +typedef NTSTATUS (*rpc_command_fn)(struct net_context *c, + const DOM_SID *, const char *, struct cli_state *cli, struct rpc_pipe_client *, @@ -38,6 +39,7 @@ typedef struct copy_clistate { struct cli_state *cli_share_dst; char *cwd; uint16 attribute; + struct net_context *c; }copy_clistate; struct rpc_sh_ctx { @@ -54,10 +56,12 @@ struct rpc_sh_ctx { struct rpc_sh_cmd { const char *name; - struct rpc_sh_cmd *(*sub)(TALLOC_CTX *mem_ctx, + struct rpc_sh_cmd *(*sub)(struct net_context *c, + TALLOC_CTX *mem_ctx, struct rpc_sh_ctx *ctx); int pipe_idx; - NTSTATUS (*fn)(TALLOC_CTX *mem_ctx, struct rpc_sh_ctx *ctx, + NTSTATUS (*fn)(struct net_context *c, TALLOC_CTX *mem_ctx, + struct rpc_sh_ctx *ctx, struct rpc_pipe_client *pipe_hnd, int argc, const char **argv); const char *help; @@ -65,6 +69,47 @@ struct rpc_sh_cmd { enum netdom_domain_t { ND_TYPE_NT4, ND_TYPE_AD }; +struct net_context { + const char *opt_requester_name; + const char *opt_host; + const char *opt_password; + const char *opt_user_name; + bool opt_user_specified; + const char *opt_workgroup; + int opt_long_list_entries; + int opt_reboot; + int opt_force; + int opt_stdin; + int opt_port; + int opt_verbose; + int opt_maxusers; + const char *opt_comment; + const char *opt_container; + int opt_flags; + int opt_timeout; + const char *opt_target_workgroup; + int opt_machine_pass; + int opt_localgroup; + int opt_domaingroup; + int do_talloc_report; + const char *opt_newntname; + int opt_rid; + int opt_acls; + int opt_attrs; + int opt_timestamps; + const char *opt_exclude; + const char *opt_destination; + int opt_testmode; + + int opt_have_ip; + struct sockaddr_storage opt_dest_ip; + bool smb_encrypt; + struct libnetapi_ctx *netapi_ctx; + + bool AllowDebugChange; + const char *share_type[]; +}; + /* INCLUDE FILES */ #include "utils/net_proto.h" @@ -84,43 +129,6 @@ enum netdom_domain_t { ND_TYPE_NT4, ND_TYPE_AD }; /* net share operation modes */ #define NET_MODE_SHARE_MIGRATE 1 -extern int opt_maxusers; -extern const char *opt_comment; -extern const char *opt_container; -extern int opt_flags; - -extern const char *opt_comment; - -extern const char *opt_target_workgroup; -extern const char *opt_workgroup; -extern int opt_long_list_entries; -extern int opt_verbose; -extern int opt_reboot; -extern int opt_force; -extern int opt_machine_pass; -extern int opt_timeout; -extern const char *opt_host; -extern const char *opt_user_name; -extern const char *opt_password; -extern bool opt_user_specified; - -extern int opt_localgroup; -extern int opt_domaingroup; -extern const char *opt_newntname; -extern int opt_rid; -extern int opt_acls; -extern int opt_attrs; -extern int opt_timestamps; -extern const char *opt_exclude; -extern const char *opt_destination; -extern int opt_testmode; - -extern int opt_have_ip; -extern struct sockaddr_storage opt_dest_ip; -extern struct libnetapi_ctx *netapi_ctx; - -extern const char *share_type[]; - /* Structure for mapping accounts to groups */ /* Array element is the group rid */ typedef struct _groupmap { -- cgit From 45653bd1b1a59435dbb2f3d8f19e485f4c20e2fb Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Mon, 12 May 2008 14:38:21 +0200 Subject: net: Split out common help functions. (This used to be commit efc863e3758501a4c62dc9762eb0aded2dad01ff) --- source3/utils/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 15b1dd402b..f40222ed71 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -113,6 +113,7 @@ struct net_context { /* INCLUDE FILES */ #include "utils/net_proto.h" +#include "utils/net_help_common.h" /* MACROS & DEFINES */ -- cgit From 20ec11ac2885a78b0ce71c72962aa6bca101897a Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 5 Jun 2008 18:40:26 +0200 Subject: net: fix debuglevel handling. Kai, that one actually needs to stay a global external variable in order to support debuglevel definition only on the commandline for net. Guenther (This used to be commit f6ba7333ab31332198b59651b4252cb3f897b6aa) --- source3/utils/net.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index f40222ed71..80024bd958 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -106,7 +106,6 @@ struct net_context { bool smb_encrypt; struct libnetapi_ctx *netapi_ctx; - bool AllowDebugChange; const char *share_type[]; }; -- cgit From 4d9748e44dc58e026136ce0c28526ba4cf1d4f3e Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Wed, 21 May 2008 10:47:59 +0200 Subject: net: Move includes to net.h (This used to be commit 1943e2752d4dcb5bbbd4e40cf854efba4aed8f45) --- source3/utils/net.h | 104 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 64 insertions(+), 40 deletions(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 80024bd958..a5078d0266 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -24,6 +24,70 @@ #include "lib/netapi/netapi.h" +struct net_context { + const char *opt_requester_name; + const char *opt_host; + const char *opt_password; + const char *opt_user_name; + bool opt_user_specified; + const char *opt_workgroup; + int opt_long_list_entries; + int opt_reboot; + int opt_force; + int opt_stdin; + int opt_port; + int opt_verbose; + int opt_maxusers; + const char *opt_comment; + const char *opt_container; + int opt_flags; + int opt_timeout; + const char *opt_target_workgroup; + int opt_machine_pass; + int opt_localgroup; + int opt_domaingroup; + int do_talloc_report; + const char *opt_newntname; + int opt_rid; + int opt_acls; + int opt_attrs; + int opt_timestamps; + const char *opt_exclude; + const char *opt_destination; + int opt_testmode; + + int opt_have_ip; + struct sockaddr_storage opt_dest_ip; + bool smb_encrypt; + struct libnetapi_ctx *netapi_ctx; + + const char *share_type[]; +}; + +#define NET_TRANSPORT_LOCAL 0x01 +#define NET_TRANSPORT_RAP 0x02 +#define NET_TRANSPORT_RPC 0x04 +#define NET_TRANSPROT_ADS 0x08 + +struct functable { + const char *funcname; + int (*fn)(struct net_context *c, int argc, const char **argv); +}; + +struct functable2 { + const char *funcname; + int (*fn)(struct net_context *c, int argc, const char **argv); + const char *helptext; +}; + +struct functable3 { + const char *funcname; + int (*fn)(struct net_context *c, int argc, const char **argv); + int valid_transports; + const char *description; + const char *usage; +}; + typedef NTSTATUS (*rpc_command_fn)(struct net_context *c, const DOM_SID *, const char *, @@ -69,46 +133,6 @@ struct rpc_sh_cmd { enum netdom_domain_t { ND_TYPE_NT4, ND_TYPE_AD }; -struct net_context { - const char *opt_requester_name; - const char *opt_host; - const char *opt_password; - const char *opt_user_name; - bool opt_user_specified; - const char *opt_workgroup; - int opt_long_list_entries; - int opt_reboot; - int opt_force; - int opt_stdin; - int opt_port; - int opt_verbose; - int opt_maxusers; - const char *opt_comment; - const char *opt_container; - int opt_flags; - int opt_timeout; - const char *opt_target_workgroup; - int opt_machine_pass; - int opt_localgroup; - int opt_domaingroup; - int do_talloc_report; - const char *opt_newntname; - int opt_rid; - int opt_acls; - int opt_attrs; - int opt_timestamps; - const char *opt_exclude; - const char *opt_destination; - int opt_testmode; - - int opt_have_ip; - struct sockaddr_storage opt_dest_ip; - bool smb_encrypt; - struct libnetapi_ctx *netapi_ctx; - - const char *share_type[]; -}; - /* INCLUDE FILES */ #include "utils/net_proto.h" -- cgit From 44c260743cc01d7fa07b66b771b94de98b5b7444 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Thu, 22 May 2008 09:41:21 +0200 Subject: net: Add net_run_function3 (This used to be commit ba1108f06ae5860c8f418dc383b027068780abf9) --- source3/utils/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index a5078d0266..b816aec4e6 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -61,6 +61,7 @@ struct net_context { bool smb_encrypt; struct libnetapi_ctx *netapi_ctx; + bool display_usage; const char *share_type[]; }; -- cgit From 2ca10c462d23a76fcb9e48865fcfcdacc0dde5ee Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Sun, 25 May 2008 22:41:58 +0200 Subject: net: Use functable3 (This used to be commit 122dfe876d954ee3b3796951df16e1be9e9b0eb8) --- source3/utils/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index b816aec4e6..b89caca856 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -68,7 +68,7 @@ struct net_context { #define NET_TRANSPORT_LOCAL 0x01 #define NET_TRANSPORT_RAP 0x02 #define NET_TRANSPORT_RPC 0x04 -#define NET_TRANSPROT_ADS 0x08 +#define NET_TRANSPORT_ADS 0x08 struct functable { const char *funcname; -- cgit From 0f1b3ed5c0326cdca931adc43806ec4df0d3abf3 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Mon, 19 May 2008 00:19:18 +0200 Subject: net: Autogenerate "net help" output from net's functable. (This used to be commit 0feb40bc8408412336c667df4f8bf57c77446ca7) --- source3/utils/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index b89caca856..d1e759c5a9 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -62,6 +62,7 @@ struct net_context { struct libnetapi_ctx *netapi_ctx; bool display_usage; + void *private_data; const char *share_type[]; }; -- cgit From 255bdb26025a5025bc60637dd924f6ec71c49ee5 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Sat, 7 Jun 2008 02:25:08 +0200 Subject: net: Rename functable3 to functable, get rid of old functables (This used to be commit bb7c5fc4ec77db4073d3beccf12af12910b6bd07) --- source3/utils/net.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index d1e759c5a9..ef5cfa73de 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -74,17 +74,6 @@ struct net_context { struct functable { const char *funcname; int (*fn)(struct net_context *c, int argc, const char **argv); -}; - -struct functable2 { - const char *funcname; - int (*fn)(struct net_context *c, int argc, const char **argv); - const char *helptext; -}; - -struct functable3 { - const char *funcname; - int (*fn)(struct net_context *c, int argc, const char **argv); int valid_transports; const char *description; const char *usage; -- cgit From 6ce0c8517256fec9ac9fc7d3f5f9a0f361020ea3 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 13 Jun 2008 12:20:01 +0200 Subject: net: Fix bug #5542 (samsync contains empty passwords). Guenther (cherry picked from commit 1a22e975dd1255f3557c1cd873d877aa35822afc) (This used to be commit ad8392cf7c817ee29a03bc6f515bf1cc18a29eda) --- source3/utils/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index ef5cfa73de..65c8d75584 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -23,6 +23,7 @@ */ #include "lib/netapi/netapi.h" +#include "libnet/libnet.h" struct net_context { const char *opt_requester_name; -- cgit From 339d868b173ed55554fb596a8fcfdbab99e64ec0 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 11 Jun 2008 02:29:58 +0200 Subject: net_vampire: start using talloc for the ldif vampire code. Guenther (This used to be commit ae179e4f3faccbf2c9f19b6f070f5daf87cdfc50) --- source3/utils/net.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 65c8d75584..e5bd2ab692 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -148,13 +148,13 @@ enum netdom_domain_t { ND_TYPE_NT4, ND_TYPE_AD }; /* Structure for mapping accounts to groups */ /* Array element is the group rid */ typedef struct _groupmap { - uint32 rid; - uint32 gidNumber; - fstring sambaSID; - fstring group_dn; + uint32_t rid; + uint32_t gidNumber; + const char *sambaSID; + const char *group_dn; } GROUPMAP; typedef struct _accountmap { - uint32 rid; - fstring cn; + uint32_t rid; + const char *cn; } ACCOUNTMAP; -- cgit From 7a1fa41dcafc0f2c2ae1052ba7dced0c06632b72 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 12 Jun 2008 12:35:46 +0200 Subject: net_vampire: restructure internal code more. Guenther (This used to be commit 9557504d70fe57098914da131b39212faf4f0a7d) --- source3/utils/net.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index e5bd2ab692..627ac0aaa1 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -158,3 +158,33 @@ typedef struct _accountmap { uint32_t rid; const char *cn; } ACCOUNTMAP; + +enum net_samsync_mode { + NET_SAMSYNC_MODE_FETCH_PASSDB = 0, + NET_SAMSYNC_MODE_FETCH_LDIF = 1, + NET_SAMSYNC_MODE_DUMP = 2 +}; + +struct samsync_ldif_context { + GROUPMAP *groupmap; + ACCOUNTMAP *accountmap; + bool initialized; + const char *add_template; + const char *mod_template; + char *add_name; + char *mod_name; + FILE *add_file; + FILE *mod_file; + FILE *ldif_file; + const char *suffix; + int num_alloced; +}; + +struct samsync_context { + enum net_samsync_mode mode; + const struct dom_sid *domain_sid; + const char *domain_sid_str; + const char *ldif_filename; + + struct samsync_ldif_context *ldif; +}; -- cgit From ccdcbc2efe86cde991a1cafdb2b098db41b163fd Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 16 Jun 2008 12:09:08 +0200 Subject: net_vampire: move some samsync functions to libnet. Guenther (This used to be commit b3b6af0a3e25fab0a14c9c802dbabd3d03448ebe) --- source3/utils/net.h | 43 ------------------------------------------- 1 file changed, 43 deletions(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 627ac0aaa1..aa4f3dbb6d 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -145,46 +145,3 @@ enum netdom_domain_t { ND_TYPE_NT4, ND_TYPE_AD }; /* net share operation modes */ #define NET_MODE_SHARE_MIGRATE 1 -/* Structure for mapping accounts to groups */ -/* Array element is the group rid */ -typedef struct _groupmap { - uint32_t rid; - uint32_t gidNumber; - const char *sambaSID; - const char *group_dn; -} GROUPMAP; - -typedef struct _accountmap { - uint32_t rid; - const char *cn; -} ACCOUNTMAP; - -enum net_samsync_mode { - NET_SAMSYNC_MODE_FETCH_PASSDB = 0, - NET_SAMSYNC_MODE_FETCH_LDIF = 1, - NET_SAMSYNC_MODE_DUMP = 2 -}; - -struct samsync_ldif_context { - GROUPMAP *groupmap; - ACCOUNTMAP *accountmap; - bool initialized; - const char *add_template; - const char *mod_template; - char *add_name; - char *mod_name; - FILE *add_file; - FILE *mod_file; - FILE *ldif_file; - const char *suffix; - int num_alloced; -}; - -struct samsync_context { - enum net_samsync_mode mode; - const struct dom_sid *domain_sid; - const char *domain_sid_str; - const char *ldif_filename; - - struct samsync_ldif_context *ldif; -}; -- cgit From a8332b91ef461309121a909a59b1c1b46d8065c9 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 24 Jun 2008 10:34:16 +0200 Subject: net: add basic support for sealed RPC connections (using NET_FLAGS_SEAL). Guenther (This used to be commit 7541a0103ad22000e94ffc6d057ffd5d33d1a930) --- source3/utils/net.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index aa4f3dbb6d..941172a8c1 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -141,6 +141,8 @@ enum netdom_domain_t { ND_TYPE_NT4, ND_TYPE_AD }; #define NET_FLAGS_PDC 0x00000008 /* PDC only */ #define NET_FLAGS_ANONYMOUS 0x00000010 /* use an anonymous connection */ #define NET_FLAGS_NO_PIPE 0x00000020 /* don't open an RPC pipe */ +#define NET_FLAGS_SIGN 0x00000040 /* sign RPC connection */ +#define NET_FLAGS_SEAL 0x00000080 /* seal RPC connection */ /* net share operation modes */ #define NET_MODE_SHARE_MIGRATE 1 -- cgit From d86ff599892608cf739c96e8add9b6ff9f9e5e43 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 20 Jul 2008 18:40:31 +0200 Subject: Refactoring: net_sh_run uses ndr_syntax_id instead of pipe_idx (This used to be commit 85c8363d5179e7053adc05e8abce2fb26cf9b968) --- source3/utils/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 941172a8c1..01a76a0db1 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -115,7 +115,7 @@ struct rpc_sh_cmd { struct rpc_sh_cmd *(*sub)(struct net_context *c, TALLOC_CTX *mem_ctx, struct rpc_sh_ctx *ctx); - int pipe_idx; + const struct ndr_syntax_id *interface; NTSTATUS (*fn)(struct net_context *c, TALLOC_CTX *mem_ctx, struct rpc_sh_ctx *ctx, struct rpc_pipe_client *pipe_hnd, -- cgit From 6913f986f4213e056f724ed3be3aee313c07d78c Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 30 Jul 2008 21:37:09 +0200 Subject: net: add "-k" switch for kerberos authentication (in preparation for #5416). Guenther (This used to be commit 4cce94d464b16d29b638da3a581d98a237959b63) --- source3/utils/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 01a76a0db1..4f59ff995c 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -56,6 +56,7 @@ struct net_context { const char *opt_exclude; const char *opt_destination; int opt_testmode; + bool opt_kerberos; int opt_have_ip; struct sockaddr_storage opt_dest_ip; -- cgit From c655e295efce4b3f637f1be2c1d79bf1c16bac7b Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 29 Jul 2008 22:52:59 +0200 Subject: vampire keytab: add switch --repl-nodiff to trigger full replication. I.e. replication without keeping track of the up to date vector. Michael (This used to be commit d4b36e447bce8692416e132ab9f53a6282f54cac) --- source3/utils/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 4f59ff995c..34e34a758a 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -57,6 +57,7 @@ struct net_context { const char *opt_destination; int opt_testmode; bool opt_kerberos; + int opt_repl_nodiff; int opt_have_ip; struct sockaddr_storage opt_dest_ip; -- cgit From 5330164ec4f40d7b9731a2d60643432c226ffc03 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 30 Jul 2008 17:46:13 +0200 Subject: net rpc vampire: rename --repl-nodiff to --force-full-repl. This more clear. Michael (This used to be commit 0ddde9aae88e6244276e1c143056a4bfc7c7fcca) --- source3/utils/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 34e34a758a..5dd5a3501d 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -57,7 +57,7 @@ struct net_context { const char *opt_destination; int opt_testmode; bool opt_kerberos; - int opt_repl_nodiff; + int opt_force_full_repl; int opt_have_ip; struct sockaddr_storage opt_dest_ip; -- cgit From 03b6502dc69647e4410eca5bcf0f93fd5eba3fa9 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 31 Jul 2008 23:05:45 +0200 Subject: vampire keytab: introduce switch --single-obj-repl. This controls whether single object replication is to be used. This only has an effect when at least one object dn is given on the commandline. NOTE: Now the default is to use normal replication with uptodateness vectors and use object dns given on the command line as a positive write filter. Single object replication is only performed when this new switch is specified. Michael (This used to be commit 0f81111ea8c049eb60f98d4939e520a5a562d2e6) --- source3/utils/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index 5dd5a3501d..b3fc0eb92c 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -58,6 +58,7 @@ struct net_context { int opt_testmode; bool opt_kerberos; int opt_force_full_repl; + int opt_single_obj_repl; int opt_have_ip; struct sockaddr_storage opt_dest_ip; -- cgit From 7f3495726fffdc9aa40c0c7be2abcefeb6d53db5 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 1 Aug 2008 00:12:18 +0200 Subject: vampire keytab: add command line switch --clean-old-entries . This allows to control cleaning the keytab. It will only clean old occurences of keys that are replicated in this run. So if you want to ensure things are cleaned up, combine this switch with --force-full-repl or --single-obj-repl (+dn list). Michael (This used to be commit 21385e1c635ea67215eb1da90e7dca97ae2f5d56) --- source3/utils/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index b3fc0eb92c..e7f9ce03be 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -59,6 +59,7 @@ struct net_context { bool opt_kerberos; int opt_force_full_repl; int opt_single_obj_repl; + int opt_clean_old_entries; int opt_have_ip; struct sockaddr_storage opt_dest_ip; -- cgit From 5b54781e1c63be1f63b601f74cf8d4cc5eb788d1 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Wed, 10 Sep 2008 12:05:18 +0200 Subject: net: share_type is defined in net_rap.c, net_rpc.c needs to use that. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a crash in net rpc share that Günther Deschner found. (This used to be commit 50af6d609dcbbdadb9af44ede980d9c85ac834e3) --- source3/utils/net.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source3/utils/net.h') diff --git a/source3/utils/net.h b/source3/utils/net.h index e7f9ce03be..5dc2b11d4e 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -68,7 +68,6 @@ struct net_context { bool display_usage; void *private_data; - const char *share_type[]; }; #define NET_TRANSPORT_LOCAL 0x01 -- cgit