loadparm.c
来自「samba-3.0.22.tar.gz 编译smb服务器的源码」· C语言 代码 · 共 1,423 行 · 第 1/5 页
C
1,423 行
/* Unix SMB/CIFS implementation. Parameter loading functions Copyright (C) Karl Auer 1993-1998 Largely re-written by Andrew Tridgell, September 1994 Copyright (C) Simo Sorce 2001 Copyright (C) Alexander Bokovoy 2002 Copyright (C) Stefan (metze) Metzmacher 2002 Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2003 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.*//* * Load parameters. * * This module provides suitable callback functions for the params * module. It builds the internal table of service details which is * then used by the rest of the server. * * To add a parameter: * * 1) add it to the global or service structure definition * 2) add it to the parm_table * 3) add it to the list of available functions (eg: using FN_GLOBAL_STRING()) * 4) If it's a global then initialise it in init_globals. If a local * (ie. service) parameter then initialise it in the sDefault structure * * * Notes: * The configuration file is processed sequentially for speed. It is NOT * accessed randomly as happens in 'real' Windows. For this reason, there * is a fair bit of sequence-dependent code here - ie., code which assumes * that certain things happen before others. In particular, the code which * happens at the boundary between sections is delicately poised, so be * careful! * */#include "includes.h"BOOL in_client = False; /* Not in the client by default */BOOL bLoaded = False;extern userdom_struct current_user_info;extern pstring user_socket_options;extern enum protocol_types Protocol;#ifndef GLOBAL_NAME#define GLOBAL_NAME "global"#endif#ifndef PRINTERS_NAME#define PRINTERS_NAME "printers"#endif#ifndef HOMES_NAME#define HOMES_NAME "homes"#endif/* some helpful bits */#define LP_SNUM_OK(i) (((i) >= 0) && ((i) < iNumServices) && (ServicePtrs != NULL) && ServicePtrs[(i)]->valid)#define VALID(i) (ServicePtrs != NULL && ServicePtrs[i]->valid)int keepalive = DEFAULT_KEEPALIVE;BOOL use_getwd_cache = True;extern int extra_time_offset;static BOOL defaults_saved = False;typedef struct _param_opt_struct param_opt_struct;struct _param_opt_struct { param_opt_struct *prev, *next; char *key; char *value; char **list;};/* * This structure describes global (ie., server-wide) parameters. */typedef struct{ char *smb_ports; char *dos_charset; char *unix_charset; char *display_charset; char *szPrintcapname; char *szEnumPortsCommand; char *szAddPrinterCommand; char *szDeletePrinterCommand; char *szOs2DriverMap; char *szLockDir; char *szPidDir; char *szRootdir; char *szDefaultService; char *szGetQuota; char *szSetQuota; char *szMsgCommand; char *szHostsEquiv; char *szServerString; char *szAutoServices; char *szPasswdProgram; char *szPasswdChat; char *szLogFile; char *szConfigFile; char *szSMBPasswdFile; char *szPrivateDir; char **szPassdbBackend; char **szPreloadModules; char *szPasswordServer; char *szSocketOptions; char *szRealm; char *szAfsUsernameMap; int iAfsTokenLifetime; char *szLogNtTokenCommand; char *szUsernameMap; char *szLogonScript; char *szLogonPath; char *szLogonDrive; char *szLogonHome; char **szWINSservers; char **szInterfaces; char *szRemoteAnnounce; char *szRemoteBrowseSync; char *szSocketAddress; char *szNISHomeMapName; char *szAnnounceVersion; /* This is initialised in init_globals */ char *szWorkgroup; char *szNetbiosName; char **szNetbiosAliases; char *szNetbiosScope; char *szNameResolveOrder; char *szPanicAction; char *szAddUserScript; char *szRenameUserScript; char *szDelUserScript; char *szAddGroupScript; char *szDelGroupScript; char *szAddUserToGroupScript; char *szDelUserFromGroupScript; char *szSetPrimaryGroupScript; char *szAddMachineScript; char *szShutdownScript; char *szAbortShutdownScript; char *szUsernameMapScript; char *szCheckPasswordScript; char *szWINSHook; char *szWINSPartners; char *szUtmpDir; char *szWtmpDir; BOOL bUtmp; char *szIdmapUID; char *szIdmapGID; BOOL bEnableRidAlgorithm; BOOL bPassdbExpandExplicit; int AlgorithmicRidBase; char *szTemplateHomedir; char *szTemplateShell; char *szWinbindSeparator; BOOL bWinbindEnumUsers; BOOL bWinbindEnumGroups; BOOL bWinbindUseDefaultDomain; BOOL bWinbindTrustedDomainsOnly; BOOL bWinbindNestedGroups; char **szIdmapBackend; char *szAddShareCommand; char *szChangeShareCommand; char *szDeleteShareCommand; char **szEventLogs; char *szGuestaccount; char *szManglingMethod; char **szServicesList; int mangle_prefix; int max_log_size; char *szLogLevel; int max_xmit; int max_mux; int max_open_files; int pwordlevel; int unamelevel; int deadtime; int maxprotocol; int minprotocol; int security; char **AuthMethods; BOOL paranoid_server_security; int maxdisksize; int lpqcachetime; int iMaxSmbdProcesses; BOOL bDisableSpoolss; int syslog; int os_level; int enhanced_browsing; int max_ttl; int max_wins_ttl; int min_wins_ttl; int lm_announce; int lm_interval; int announce_as; /* This is initialised in init_globals */ int machine_password_timeout; int change_notify_timeout; int map_to_guest; int oplock_break_wait_time; int winbind_cache_time; int winbind_max_idle_children; char **szWinbindNssInfo; int iLockSpinCount; int iLockSpinTime; char *szLdapMachineSuffix; char *szLdapUserSuffix; char *szLdapIdmapSuffix; char *szLdapGroupSuffix;#ifdef WITH_LDAP_SAMCONFIG int ldap_port; char *szLdapServer;#endif int ldap_ssl; char *szLdapSuffix; char *szLdapAdminDn; char *szAclCompat; char *szCupsServer; char *szIPrintServer; int ldap_passwd_sync; int ldap_replication_sleep; int ldap_timeout; /* This is initialised in init_globals */ int ldap_page_size; BOOL ldap_delete_dn; BOOL bMsAddPrinterWizard; BOOL bDNSproxy; BOOL bWINSsupport; BOOL bWINSproxy; BOOL bLocalMaster; BOOL bPreferredMaster; BOOL bDomainMaster; BOOL bDomainLogons; BOOL bEncryptPasswords; BOOL bUpdateEncrypt; int clientSchannel; int serverSchannel; BOOL bNullPasswords; BOOL bObeyPamRestrictions; BOOL bLoadPrinters; int PrintcapCacheTime; BOOL bLargeReadwrite; BOOL bReadRaw; BOOL bWriteRaw; BOOL bReadbmpx; BOOL bSyslogOnly; BOOL bBrowseList; BOOL bNISHomeMap; BOOL bTimeServer; BOOL bBindInterfacesOnly; BOOL bPamPasswordChange; BOOL bUnixPasswdSync; BOOL bPasswdChatDebug; int iPasswdChatTimeout; BOOL bTimestampLogs; BOOL bNTSmbSupport; BOOL bNTPipeSupport; BOOL bNTStatusSupport; BOOL bStatCache; int iMaxStatCacheSize; BOOL bKernelOplocks; BOOL bAllowTrustedDomains; BOOL bLanmanAuth; BOOL bNTLMAuth; BOOL bUseSpnego; BOOL bClientLanManAuth; BOOL bClientNTLMv2Auth;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?