From 0a07b8ebfe797f062e50fbb901cd8040513af6d2 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 20 Jun 2010 13:16:30 +0200 Subject: testparm: Convert to Python. --- source4/utils/testparm.c | 260 -------------------------------------------- source4/utils/wscript_build | 6 - 2 files changed, 266 deletions(-) delete mode 100644 source4/utils/testparm.c (limited to 'source4/utils') diff --git a/source4/utils/testparm.c b/source4/utils/testparm.c deleted file mode 100644 index c8e07973bc..0000000000 --- a/source4/utils/testparm.c +++ /dev/null @@ -1,260 +0,0 @@ -/* - Unix SMB/CIFS implementation. - Test validity of smb.conf - Copyright (C) Karl Auer 1993, 1994-1998 - - Extensively modified by Andrew Tridgell, 1995 - Converted to popt by Jelmer Vernooij (jelmer@nl.linux.org), 2002 - Updated for Samba4 by Andrew Bartlett 2006 - - 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 . -*/ - -/* - * Testbed for loadparm.c/params.c - * - * This module simply loads a specified configuration file and - * if successful, dumps it's contents to stdout. Note that the - * operation is performed with DEBUGLEVEL at 3. - * - * Useful for a quick 'syntax check' of a configuration file. - * - */ - -#include "includes.h" -#include "system/filesys.h" -#include "lib/cmdline/popt_common.h" -#include "lib/socket/socket.h" -#include "param/param.h" -#include "param/loadparm.h" - - -/*********************************************** - Here we do a set of 'hard coded' checks for bad - configuration settings. -************************************************/ - -static int do_global_checks(struct loadparm_context *lp_ctx) -{ - int ret = 0; - - if (!directory_exist(lp_lockdir(lp_ctx))) { - fprintf(stderr, "ERROR: lock directory %s does not exist\n", - lp_lockdir(lp_ctx)); - ret = 1; - } - - if (!directory_exist(lp_piddir(lp_ctx))) { - fprintf(stderr, "ERROR: pid directory %s does not exist\n", - lp_piddir(lp_ctx)); - ret = 1; - } - - if (strlen(lp_winbind_separator(lp_ctx)) != 1) { - fprintf(stderr,"ERROR: the 'winbind separator' parameter must be a single character.\n"); - ret = 1; - } - - if (*lp_winbind_separator(lp_ctx) == '+') { - fprintf(stderr,"'winbind separator = +' might cause problems with group membership.\n"); - } - - return ret; -} - - -static int do_share_checks(struct loadparm_context *lp_ctx, const char *cname, const char *caddr, bool silent_mode, - bool show_defaults, const char *section_name, const char *parameter_name) -{ - int ret = 0; - int s; - - for (s=0;s 12) { - fprintf(stderr, "WARNING: You have some share names that are longer than 12 characters.\n" ); - fprintf(stderr, "These may not be accessible to some older clients.\n" ); - fprintf(stderr, "(Eg. Windows9x, WindowsMe, and not listed in smbclient in Samba 3.0.)\n" ); - break; - } - } - - for (s=0;s