From 8de0c24a08cf71058dd58004fe82ca2e8368ffbc Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 18 Aug 2004 07:56:35 +0000 Subject: r1875: - move 'net' code into a subdir - and remove all unneeded files we'll reimplement the stuff step by step using the functions from libnet/ which will do the hard work for us metze (This used to be commit 8b2d5ec973fde980389bfe03cbcd70274b98b2dc) --- source4/utils/net/net.h | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 source4/utils/net/net.h (limited to 'source4/utils/net/net.h') diff --git a/source4/utils/net/net.h b/source4/utils/net/net.h new file mode 100644 index 0000000000..1d83a02635 --- /dev/null +++ b/source4/utils/net/net.h @@ -0,0 +1,59 @@ +/* + 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 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 4 + +/* We want to find the PDC only */ +#define NET_FLAGS_PDC 8 + +/* We want an anonymous connection */ +#define NET_FLAGS_ANONYMOUS 16 + + +extern int opt_maxusers; +extern const char *opt_comment; +extern 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_reboot; +extern int opt_force; +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_have_ip; +extern struct in_addr opt_dest_ip; + +extern const char *share_type[]; + -- cgit From 9373c046f12322dbc19adf2fdd481d2f534bae9b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 18 Aug 2004 09:33:54 +0000 Subject: r1876: rewrite net command completely and add it to the build metze (This used to be commit 14b9858800f6944bf78bee34338242cd3292b297) --- source4/utils/net/net.h | 52 +++++++++++++------------------------------------ 1 file changed, 14 insertions(+), 38 deletions(-) (limited to 'source4/utils/net/net.h') diff --git a/source4/utils/net/net.h b/source4/utils/net/net.h index 1d83a02635..f1ed93fbfb 100644 --- a/source4/utils/net/net.h +++ b/source4/utils/net/net.h @@ -1,7 +1,8 @@ /* Samba Unix/Linux SMB client library Distributed SMB/CIFS Server Management Utility - Copyright (C) 2001 Andrew Bartlett (abartlet@samba.org) + + Copyright (C) Stefan Metzmacher 2004 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 @@ -15,45 +16,20 @@ 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. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#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 - - -extern int opt_maxusers; -extern const char *opt_comment; -extern 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_reboot; -extern int opt_force; -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; +#ifndef _UTIL_NET_H +#define _UTIL_NET_H -extern BOOL opt_have_ip; -extern struct in_addr opt_dest_ip; +struct net_context { + TALLOC_CTX *mem_ctx; +}; -extern const char *share_type[]; +struct net_functable { + const char *name; + int (*fn)(struct net_context *ctx, int argc, const char **argv); + int (*help)(struct net_context *ctx, int argc, const char **argv); +}; +#endif /* _UTIL_NET_H */ -- cgit From bc3a20e9d8cec0b0b402e922214fc5a7f08e785e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 18 Aug 2004 12:47:08 +0000 Subject: r1879: - add a user sub struct in net_context - add 'net password change' command (it doesn'T work yet because libnet_rpc_connect() isn't implemented yet, and we don't fill in the net_context user substruct yet) metze (This used to be commit 939da063cdf18a5ab7e7f0490ac58d1f138cf0f0) --- source4/utils/net/net.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source4/utils/net/net.h') diff --git a/source4/utils/net/net.h b/source4/utils/net/net.h index f1ed93fbfb..ba8294c144 100644 --- a/source4/utils/net/net.h +++ b/source4/utils/net/net.h @@ -24,12 +24,18 @@ struct net_context { TALLOC_CTX *mem_ctx; + struct { + const char *account_name; + const char *domain_name; + const char *password; + } user; }; struct net_functable { const char *name; int (*fn)(struct net_context *ctx, int argc, const char **argv); - int (*help)(struct net_context *ctx, int argc, const char **argv); + int (*usage)(struct net_context *ctx, int argc, const char **argv); + int (*help)(struct net_context *ctx, int argc, const char **argv); }; #endif /* _UTIL_NET_H */ -- cgit From 16f64ae6d6a9ea0ec14ec124c097787ccb320864 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Wed, 16 Feb 2005 21:50:38 +0000 Subject: r5423: Change function table structure to allow short description of command groups. Also give up help function pointer in the structure since it's needed only in leaf nodes of command tree, and leaf nodes decide about help on their own. Usage function is still available on all levels. rafal (This used to be commit 48568959a86ee60c188b84078eb3872b8e185b6c) --- source4/utils/net/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/utils/net/net.h') diff --git a/source4/utils/net/net.h b/source4/utils/net/net.h index ba8294c144..2967063bde 100644 --- a/source4/utils/net/net.h +++ b/source4/utils/net/net.h @@ -33,9 +33,9 @@ struct net_context { struct net_functable { const char *name; + const char *desc; int (*fn)(struct net_context *ctx, int argc, const char **argv); int (*usage)(struct net_context *ctx, int argc, const char **argv); - int (*help)(struct net_context *ctx, int argc, const char **argv); }; #endif /* _UTIL_NET_H */ -- cgit From 02075be0bbc2095073f8898350fded64a7c97c79 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 21 Mar 2005 02:08:38 +0000 Subject: r5917: First step in using the new cli_credentials structure. This patch puts support for it into popt_common, adds a few utility functions (in lib/credentials.c) and the callback functions for the command-line (lib/cmdline/credentials.c). Comments are welcome :-) (This used to be commit 1d49b57c50fe8c2683ea23e9df41ce8ad774db98) --- source4/utils/net/net.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'source4/utils/net/net.h') diff --git a/source4/utils/net/net.h b/source4/utils/net/net.h index 2967063bde..6f3aa1086b 100644 --- a/source4/utils/net/net.h +++ b/source4/utils/net/net.h @@ -24,11 +24,7 @@ struct net_context { TALLOC_CTX *mem_ctx; - struct { - const char *account_name; - const char *domain_name; - const char *password; - } user; + struct cli_credentials *credentials; }; struct net_functable { -- cgit From 2cd5ca7d25f12aa9198bf8c2deb6aea282f573ee Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 28 Dec 2005 15:38:36 +0000 Subject: r12542: Move some more prototypes out to seperate headers (This used to be commit 0aca5fd5130d980d07398f3291d294202aefe3c2) --- source4/utils/net/net.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/utils/net/net.h') diff --git a/source4/utils/net/net.h b/source4/utils/net/net.h index 6f3aa1086b..8d9c78c1a9 100644 --- a/source4/utils/net/net.h +++ b/source4/utils/net/net.h @@ -34,4 +34,6 @@ struct net_functable { int (*usage)(struct net_context *ctx, int argc, const char **argv); }; +#include "utils/net/net_proto.h" + #endif /* _UTIL_NET_H */ -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/utils/net/net.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/utils/net/net.h') diff --git a/source4/utils/net/net.h b/source4/utils/net/net.h index 8d9c78c1a9..d9b5923dad 100644 --- a/source4/utils/net/net.h +++ b/source4/utils/net/net.h @@ -6,7 +6,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, @@ -15,8 +15,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 . */ #ifndef _UTIL_NET_H -- cgit From a693e6f1c71d9772b52cf40a85b0504cea837240 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 4 Dec 2007 19:33:00 +0100 Subject: r26295: Remove use of global_loadparm for net and wb_pam_auth. (This used to be commit 47696b42987ea67ae1c6c09a4bec5858e5db4542) --- source4/utils/net/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/utils/net/net.h') diff --git a/source4/utils/net/net.h b/source4/utils/net/net.h index d9b5923dad..8c4fbd7fdd 100644 --- a/source4/utils/net/net.h +++ b/source4/utils/net/net.h @@ -24,6 +24,7 @@ struct net_context { TALLOC_CTX *mem_ctx; struct cli_credentials *credentials; + struct loadparm_context *lp_ctx; }; struct net_functable { -- cgit From 4f51b0246db3242ee02ee16905cba13a5dc5633a Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 14 Apr 2008 12:43:37 -0400 Subject: Fix problems with event context not being the parent. (This used to be commit 957c4d893acf9e6db06a3fc3a4687ab6bb238635) --- source4/utils/net/net.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/utils/net/net.h') diff --git a/source4/utils/net/net.h b/source4/utils/net/net.h index 8c4fbd7fdd..17388079dd 100644 --- a/source4/utils/net/net.h +++ b/source4/utils/net/net.h @@ -22,7 +22,6 @@ #define _UTIL_NET_H struct net_context { - TALLOC_CTX *mem_ctx; struct cli_credentials *credentials; struct loadparm_context *lp_ctx; }; -- cgit From a5d52174bd993b32d01d26a795a56df4a92eba45 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 16 Apr 2008 22:30:15 +0200 Subject: Avoid event_find_context() when the event context is already available in the net utility. (This used to be commit d40804777edf41889bd461f63f7a07cc1cc60e27) --- source4/utils/net/net.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/utils/net/net.h') diff --git a/source4/utils/net/net.h b/source4/utils/net/net.h index 17388079dd..309bee277c 100644 --- a/source4/utils/net/net.h +++ b/source4/utils/net/net.h @@ -24,6 +24,7 @@ struct net_context { struct cli_credentials *credentials; struct loadparm_context *lp_ctx; + struct event_context *event_ctx; }; struct net_functable { -- cgit