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_usershare.c | 65 ++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 29 deletions(-) (limited to 'source3/utils/net_usershare.c') diff --git a/source3/utils/net_usershare.c b/source3/utils/net_usershare.c index 550157a103..02fa12a272 100644 --- a/source3/utils/net_usershare.c +++ b/source3/utils/net_usershare.c @@ -15,7 +15,8 @@ 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 . */ + along with this program. If not, see . +*/ #include "includes.h" #include "utils/net.h" @@ -59,9 +60,9 @@ static const char *get_us_error_code(enum usershare_err us_err) /* The help subsystem for the USERSHARE subcommand */ -static int net_usershare_add_usage(int argc, const char **argv) +static int net_usershare_add_usage(struct net_context *c, int argc, const char **argv) { - char c = *lp_winbind_separator(); + char chr = *lp_winbind_separator(); d_printf( "net usershare add [-l|--long] [] [] []\n" "\tAdds the specified share name for this user.\n" @@ -76,11 +77,11 @@ static int net_usershare_add_usage(int argc, const char **argv) "instead of \"DOMAIN\"\n" "\t\tThe default acl is \"Everyone:r\" which allows everyone read-only access.\n" "\tAdd -l or --long to print the info on the newly added share.\n", - c, c ); + chr, chr ); return -1; } -static int net_usershare_delete_usage(int argc, const char **argv) +static int net_usershare_delete_usage(struct net_context *c, int argc, const char **argv) { d_printf( "net usershare delete \n"\ @@ -88,7 +89,7 @@ static int net_usershare_delete_usage(int argc, const char **argv) return -1; } -static int net_usershare_info_usage(int argc, const char **argv) +static int net_usershare_info_usage(struct net_context *c, int argc, const char **argv) { d_printf( "net usershare info [-l|--long] [wildcard sharename]\n"\ @@ -99,7 +100,7 @@ static int net_usershare_info_usage(int argc, const char **argv) return -1; } -static int net_usershare_list_usage(int argc, const char **argv) +static int net_usershare_list_usage(struct net_context *c, int argc, const char **argv) { d_printf( "net usershare list [-l|--long] [wildcard sharename]\n"\ @@ -110,7 +111,7 @@ static int net_usershare_list_usage(int argc, const char **argv) return -1; } -int net_usershare_usage(int argc, const char **argv) +int net_usershare_usage(struct net_context *c, int argc, const char **argv) { d_printf("net usershare add [] [] [] to " "add or change a user defined share.\n" @@ -120,7 +121,7 @@ int net_usershare_usage(int argc, const char **argv) "net usershare help\n"\ "\nType \"net usershare help