diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-10-14 12:10:29 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-10-14 12:10:29 +0000 |
commit | a689b24db14436ab1faa2f2f79b9f27b777b1fdb (patch) | |
tree | 7195ae4dc635d1f2e18b44ae57408b03e99e7c63 /source3 | |
parent | 47a0b69029857e92703ca5b00022dcfcb179c9c7 (diff) | |
download | samba-a689b24db14436ab1faa2f2f79b9f27b777b1fdb.tar.gz samba-a689b24db14436ab1faa2f2f79b9f27b777b1fdb.tar.bz2 samba-a689b24db14436ab1faa2f2f79b9f27b777b1fdb.zip |
the next step in the intl changeover. This should get us compiling agian,
and also completes the switch to lang_tdb.c. SWAT should now work
with a po file in the lib/ directory
also removed useless SYSLOG defines in many files
(This used to be commit 5296b20ad85d7519c870768455cb4d8df048c55a)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/includes.h | 1 | ||||
-rw-r--r-- | source3/include/webintl.h | 52 | ||||
-rw-r--r-- | source3/intl/lang_tdb.c | 67 | ||||
-rw-r--r-- | source3/param/loadparm.c | 683 | ||||
-rw-r--r-- | source3/rpc_client/cli_netlogon.c | 4 | ||||
-rw-r--r-- | source3/rpc_client/cli_reg.c | 4 | ||||
-rw-r--r-- | source3/rpc_client/cli_samr.c | 4 | ||||
-rw-r--r-- | source3/rpc_client/cli_srvsvc.c | 4 | ||||
-rw-r--r-- | source3/rpc_client/cli_wkssvc.c | 4 | ||||
-rw-r--r-- | source3/rpc_client/ntclienttrust.c | 4 | ||||
-rw-r--r-- | source3/rpcclient/cmd_wkssvc.c | 6 | ||||
-rw-r--r-- | source3/torture/rpctorture.c | 4 | ||||
-rw-r--r-- | source3/web/cgi.c | 39 | ||||
-rw-r--r-- | source3/web/neg_lang.c | 274 | ||||
-rw-r--r-- | source3/web/statuspage.c | 137 | ||||
-rw-r--r-- | source3/web/swat.c | 32 |
16 files changed, 525 insertions, 794 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h index a268519488..3a6282a006 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -627,6 +627,7 @@ extern int errno; /* Lists, trees, caching, database... */ #include "xfile.h" +#include "intl.h" #include "ubi_sLinkList.h" #include "ubi_dLinkList.h" #include "dlinklist.h" diff --git a/source3/include/webintl.h b/source3/include/webintl.h deleted file mode 100644 index 12626a5f19..0000000000 --- a/source3/include/webintl.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef I18N_H_INCLUDED -#define I18N_H_INCLUDED 1 - -/* - * I18N_ORIGINAL_LANG ...the language of the original document files (*.html). - */ -#define I18N_ORIGINAL_LANG "en" - -/* these constants are defined in Makefile. - * - * I18N_PACKAGE ...package name "i18n_swat" defined in configure.in. - * I18N_LOCALEDIR ...directory to put message catalogs. - * I18N_LOCALE_FILE ...filename of the language-locale map file. - */ - -#ifdef ENABLE_NLS -#define I18N_GETTEXT 1 -#endif /* ENABLE_NLS */ - -/* if NLS is disabled (ENABLE_NLS == 0), configure script will - * automatically creates intl/libintl.h -> intl/libgettext.h (symlink) - * and gettext(str) is defined as (str) in that file. - */ -#include <libintl.h> -#define _(String) gettext(String) -#define N_(String) (String) - -#if I18N_SWAT -#define LN_(fname) ln_get_pref_file_n_o(fname) -#else -#define LN_(fname) (fname) -#endif /* I18N_SWAT */ - -/* global function pointers defined in kanji.c. */ -extern char *(*dos_to_dos)(char *to, const char *from); - -/* ****************************************************************** - * macros for debugging. - ***************************************************************** */ -#define LN_R_NODEBUG 1 -#ifdef LN_R_NODEBUG -#define rassert(b) (void)0 -#define rstrace(s) (void)0 - -#else -void ln_debug_error(const char *info, int nLine); -void rassert_help(BOOL b, int l); -#define rassert(b) rassert_help((BOOL)(b), (__LINE__)) -#define rstrace(s) ln_debug_error((s), (__LINE__)) -#endif /* LN_R_NODEBUG */ - -#endif /* I18N_H_INCLUDED */ diff --git a/source3/intl/lang_tdb.c b/source3/intl/lang_tdb.c index 52a84d59a2..8d514c5e7d 100644 --- a/source3/intl/lang_tdb.c +++ b/source3/intl/lang_tdb.c @@ -23,6 +23,10 @@ static TDB_CONTEXT *tdb; +/* the currently selected language */ +static char *current_lang; + + /* load a po file into the tdb */ static BOOL load_po(const char *po_file) { @@ -84,23 +88,44 @@ static char *get_lang(void) return NULL; } -/* initialise the message translation subsystem */ -void lang_tdb_init(void) +/* initialise the message translation subsystem. If the "lang" argument + is NULL then get the language from the normal environment variables */ +BOOL lang_tdb_init(const char *lang) { - char *lang; char *path = NULL; + char *po_path = NULL; struct stat st; static int initialised; time_t loadtime; - /* we only want to init once per process */ - if (initialised) return; + /* we only want to init once per process, unless given + an override */ + if (initialised && !lang) return True; + + if (initialised) { + /* we are re-initialising, free up any old init */ + tdb_close(tdb); + tdb = NULL; + SAFE_FREE(current_lang); + } + initialised = 1; - lang = get_lang(); + if (!lang) { + /* no lang given, use environment */ + lang = get_lang(); + } /* if no lang then we don't translate */ - if (!lang) return; + if (!lang) return True; + + asprintf(&po_path, "%s.po", lib_path(lang)); + if (stat(po_path, &st) != 0) { + /* the po file isn't available */ + free(po_path); + return False; + } + asprintf(&path, "%s%s.tdb", lock_path("lang_"), lang); @@ -108,20 +133,25 @@ void lang_tdb_init(void) if (!tdb) { tdb = tdb_open_log(path, 0, TDB_DEFAULT, O_RDONLY, 0); free(path); - return; + free(po_path); + if (!tdb) return False; + current_lang = strdup(lang); + return True; } free(path); - asprintf(&path, "%s.po", lock_path(lang)); - loadtime = tdb_fetch_int(tdb, "/LOADTIME/"); - if (stat(path, &st) == 0 && (loadtime == -1 || loadtime < st.st_mtime)) { - load_po(path); + if (loadtime == -1 || loadtime < st.st_mtime) { + load_po(po_path); tdb_store_int(tdb, "/LOADTIME/", (int)time(NULL)); } - free(path); + free(po_path); + + current_lang = strdup(lang); + + return True; } /* translate a msgid to a message string in the current language @@ -131,7 +161,7 @@ const char *lang_msg(const char *msgid) { TDB_DATA key, data; - lang_tdb_init(); + lang_tdb_init(NULL); if (!tdb) return msgid; @@ -179,3 +209,12 @@ const char *lang_msg_rotate(const char *msgid) return msgstr; } + + +/* + return the current language - needed for language file mappings +*/ +char *lang_tdb_current(void) +{ + return current_lang; +} diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index e011f47df6..8b1c9494a3 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -50,7 +50,6 @@ */ #include "includes.h" -#include "webintl.h" BOOL in_client = False; /* Not in the client by default */ BOOL bLoaded = False; @@ -642,398 +641,398 @@ static struct enum_list enum_ssl_version[] = { /* note that we do not initialise the defaults union - it is not allowed in ANSI C */ static struct parm_struct parm_table[] = { - {N_("Base Options"), P_SEP, P_SEPARATOR}, - - {N_("dos charset"), P_STRING, P_GLOBAL, &Globals.dos_charset, NULL, NULL, 0}, - {N_("unix charset"), P_STRING, P_GLOBAL, &Globals.unix_charset, NULL, NULL, 0}, - {N_("display charset"), P_STRING, P_GLOBAL, &Globals.display_charset, NULL, NULL, 0}, - {N_("comment"), P_STRING, P_LOCAL, &sDefault.comment, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, - {N_("path"), P_STRING, P_LOCAL, &sDefault.szPath, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, - {N_("directory"), P_STRING, P_LOCAL, &sDefault.szPath, NULL, NULL, 0}, - {N_("workgroup"), P_USTRING, P_GLOBAL, &Globals.szWorkGroup, NULL, NULL, FLAG_BASIC}, - {N_("netbios name"), P_UGSTRING, P_GLOBAL, global_myname, handle_netbios_name, NULL, FLAG_BASIC}, - {N_("netbios aliases"), P_LIST, P_GLOBAL, &Globals.szNetbiosAliases, NULL, NULL, 0}, - {N_("netbios scope"), P_UGSTRING, P_GLOBAL, global_scope, NULL, NULL, 0}, - {N_("server string"), P_STRING, P_GLOBAL, &Globals.szServerString, NULL, NULL, FLAG_BASIC }, - {N_("interfaces"), P_LIST, P_GLOBAL, &Globals.szInterfaces, NULL, NULL, FLAG_BASIC}, - {N_("bind interfaces only"), P_BOOL, P_GLOBAL, &Globals.bBindInterfacesOnly, NULL, NULL, 0}, - - {N_("Security Options"), P_SEP, P_SEPARATOR}, + {"Base Options", P_SEP, P_SEPARATOR}, + + {"dos charset", P_STRING, P_GLOBAL, &Globals.dos_charset, NULL, NULL, 0}, + {"unix charset", P_STRING, P_GLOBAL, &Globals.unix_charset, NULL, NULL, 0}, + {"display charset", P_STRING, P_GLOBAL, &Globals.display_charset, NULL, NULL, 0}, + {"comment", P_STRING, P_LOCAL, &sDefault.comment, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, + {"path", P_STRING, P_LOCAL, &sDefault.szPath, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, + {"directory", P_STRING, P_LOCAL, &sDefault.szPath, NULL, NULL, 0}, + {"workgroup", P_USTRING, P_GLOBAL, &Globals.szWorkGroup, NULL, NULL, FLAG_BASIC}, + {"netbios name", P_UGSTRING, P_GLOBAL, global_myname, handle_netbios_name, NULL, FLAG_BASIC}, + {"netbios aliases", P_LIST, P_GLOBAL, &Globals.szNetbiosAliases, NULL, NULL, 0}, + {"netbios scope", P_UGSTRING, P_GLOBAL, global_scope, NULL, NULL, 0}, + {"server string", P_STRING, P_GLOBAL, &Globals.szServerString, NULL, NULL, FLAG_BASIC }, + {"interfaces", P_LIST, P_GLOBAL, &Globals.szInterfaces, NULL, NULL, FLAG_BASIC}, + {"bind interfaces only", P_BOOL, P_GLOBAL, &Globals.bBindInterfacesOnly, NULL, NULL, 0}, + + {"Security Options", P_SEP, P_SEPARATOR}, - {N_("security"), P_ENUM, P_GLOBAL, &Globals.security, NULL, enum_security, FLAG_BASIC}, - {N_("encrypt passwords"), P_BOOL, P_GLOBAL, &Globals.bEncryptPasswords, NULL, NULL, FLAG_BASIC}, - {N_("update encrypted"), P_BOOL, P_GLOBAL, &Globals.bUpdateEncrypt, NULL, NULL, FLAG_BASIC}, - {N_("allow trusted domains"), P_BOOL, P_GLOBAL, &Globals.bAllowTrustedDomains, NULL, NULL, 0}, - {N_("alternate permissions"), P_BOOL, P_LOCAL, &sDefault.bAlternatePerm, NULL, NULL, FLAG_GLOBAL | FLAG_DEPRECATED}, - {N_("hosts equiv"), P_STRING, P_GLOBAL, &Globals.szHostsEquiv, NULL, NULL, 0}, - {N_("min passwd length"), P_INTEGER, P_GLOBAL, &Globals.min_passwd_length, NULL, NULL, 0}, - {N_("min password length"), P_INTEGER, P_GLOBAL, &Globals.min_passwd_length, NULL, NULL, 0}, - {N_("map to guest"), P_ENUM, P_GLOBAL, &Globals.map_to_guest, NULL, enum_map_to_guest, 0}, - {N_("null passwords"), P_BOOL, P_GLOBAL, &Globals.bNullPasswords, NULL, NULL, 0}, - {N_("obey pam restrictions"), P_BOOL, P_GLOBAL, &Globals.bObeyPamRestrictions, NULL, NULL, 0}, - {N_("password server"), P_STRING, P_GLOBAL, &Globals.szPasswordServer, NULL, NULL, 0}, - {N_("smb passwd file"), P_STRING, P_GLOBAL, &Globals.szSMBPasswdFile, NULL, NULL, 0}, - {N_("private dir"), P_STRING, P_GLOBAL, &Globals.szPrivateDir, NULL, NULL, 0}, - {N_("passdb module path"), P_STRING, P_GLOBAL, &Globals.szPassdbModulePath, NULL, NULL, 0}, - {N_("root directory"), P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0}, - {N_("root dir"), P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0}, - {N_("root"), P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0}, + {"security", P_ENUM, P_GLOBAL, &Globals.security, NULL, enum_security, FLAG_BASIC}, + {"encrypt passwords", P_BOOL, P_GLOBAL, &Globals.bEncryptPasswords, NULL, NULL, FLAG_BASIC}, + {"update encrypted", P_BOOL, P_GLOBAL, &Globals.bUpdateEncrypt, NULL, NULL, FLAG_BASIC}, + {"allow trusted domains", P_BOOL, P_GLOBAL, &Globals.bAllowTrustedDomains, NULL, NULL, 0}, + {"alternate permissions", P_BOOL, P_LOCAL, &sDefault.bAlternatePerm, NULL, NULL, FLAG_GLOBAL | FLAG_DEPRECATED}, + {"hosts equiv", P_STRING, P_GLOBAL, &Globals.szHostsEquiv, NULL, NULL, 0}, + {"min passwd length", P_INTEGER, P_GLOBAL, &Globals.min_passwd_length, NULL, NULL, 0}, + {"min password length", P_INTEGER, P_GLOBAL, &Globals.min_passwd_length, NULL, NULL, 0}, + {"map to guest", P_ENUM, P_GLOBAL, &Globals.map_to_guest, NULL, enum_map_to_guest, 0}, + {"null passwords", P_BOOL, P_GLOBAL, &Globals.bNullPasswords, NULL, NULL, 0}, + {"obey pam restrictions", P_BOOL, P_GLOBAL, &Globals.bObeyPamRestrictions, NULL, NULL, 0}, + {"password server", P_STRING, P_GLOBAL, &Globals.szPasswordServer, NULL, NULL, 0}, + {"smb passwd file", P_STRING, P_GLOBAL, &Globals.szSMBPasswdFile, NULL, NULL, 0}, + {"private dir", P_STRING, P_GLOBAL, &Globals.szPrivateDir, NULL, NULL, 0}, + {"passdb module path", P_STRING, P_GLOBAL, &Globals.szPassdbModulePath, NULL, NULL, 0}, + {"root directory", P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0}, + {"root dir", P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0}, + {"root", P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0}, - {N_("pam password change"), P_BOOL, P_GLOBAL, &Globals.bPamPasswordChange, NULL, NULL, 0}, - {N_("passwd program"), P_STRING, P_GLOBAL, &Globals.szPasswdProgram, NULL, NULL, 0}, - {N_("passwd chat"), P_STRING, P_GLOBAL, &Globals.szPasswdChat, NULL, NULL, 0}, - {N_("passwd chat debug"), P_BOOL, P_GLOBAL, &Globals.bPasswdChatDebug, NULL, NULL, 0}, - {N_("username map"), P_STRING, P_GLOBAL, &Globals.szUsernameMap, NULL, NULL, 0}, - {N_("password level"), P_INTEGER, P_GLOBAL, &Globals.pwordlevel, NULL, NULL, 0}, - {N_("username level"), P_INTEGER, P_GLOBAL, &Globals.unamelevel, NULL, NULL, 0}, - {N_("unix password sync"), P_BOOL, P_GLOBAL, &Globals.bUnixPasswdSync, NULL, NULL, 0}, - {N_("restrict anonymous"), P_BOOL, P_GLOBAL, &Globals.bRestrictAnonymous, NULL, NULL, 0}, - {N_("lanman auth"), P_BOOL, P_GLOBAL, &Globals.bLanmanAuth, NULL, NULL, 0}, - {N_("ntlm auth"), P_BOOL, P_GLOBAL, &Globals.bNTLMAuth, NULL, NULL, 0}, - {N_("plaintext to smbpasswd"), P_BOOL, P_GLOBAL, &Globals.bPlaintextToSmbpasswd, NULL, NULL, 0}, - {N_("use rhosts"), P_BOOL, P_GLOBAL, &Globals.bUseRhosts, NULL, NULL, 0}, + {"pam password change", P_BOOL, P_GLOBAL, &Globals.bPamPasswordChange, NULL, NULL, 0}, + {"passwd program", P_STRING, P_GLOBAL, &Globals.szPasswdProgram, NULL, NULL, 0}, + {"passwd chat", P_STRING, P_GLOBAL, &Globals.szPasswdChat, NULL, NULL, 0}, + {"passwd chat debug", P_BOOL, P_GLOBAL, &Globals.bPasswdChatDebug, NULL, NULL, 0}, + {"username map", P_STRING, P_GLOBAL, &Globals.szUsernameMap, NULL, NULL, 0}, + {"password level", P_INTEGER, P_GLOBAL, &Globals.pwordlevel, NULL, NULL, 0}, + {"username level", P_INTEGER, P_GLOBAL, &Globals.unamelevel, NULL, NULL, 0}, + {"unix password sync", P_BOOL, P_GLOBAL, &Globals.bUnixPasswdSync, NULL, NULL, 0}, + {"restrict anonymous", P_BOOL, P_GLOBAL, &Globals.bRestrictAnonymous, NULL, NULL, 0}, + {"lanman auth", P_BOOL, P_GLOBAL, &Globals.bLanmanAuth, NULL, NULL, 0}, + {"ntlm auth", P_BOOL, P_GLOBAL, &Globals.bNTLMAuth, NULL, NULL, 0}, + {"plaintext to smbpasswd", P_BOOL, P_GLOBAL, &Globals.bPlaintextToSmbpasswd, NULL, NULL, 0}, + {"use rhosts", P_BOOL, P_GLOBAL, &Globals.bUseRhosts, NULL, NULL, 0}, - {N_("username"), P_STRING, P_LOCAL, &sDefault.szUsername, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {N_("user"), P_STRING, P_LOCAL, &sDefault.szUsername, NULL, NULL, 0}, - {N_("users"), P_STRING, P_LOCAL, &sDefault.szUsername, NULL, NULL, 0}, + {"username", P_STRING, P_LOCAL, &sDefault.szUsername, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {"user", P_STRING, P_LOCAL, &sDefault.szUsername, NULL, NULL, 0}, + {"users", P_STRING, P_LOCAL, &sDefault.szUsername, NULL, NULL, 0}, - {N_("guest account"), P_STRING, P_LOCAL, &sDefault.szGuestaccount, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT | FLAG_GLOBAL}, - {N_("invalid users"), P_LIST, P_LOCAL, &sDefault.szInvalidUsers, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {N_("valid users"), P_LIST, P_LOCAL, &sDefault.szValidUsers, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {N_("admin users"), P_LIST, P_LOCAL, &sDefault.szAdminUsers, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {N_("read list"), P_LIST, P_LOCAL, &sDefault.readlist, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {N_("write list"), P_LIST, P_LOCAL, &sDefault.writelist, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {N_("printer admin"), P_LIST, P_LOCAL, &sDefault.printer_admin, NULL, NULL, FLAG_GLOBAL | FLAG_PRINT}, - {N_("force user"), P_STRING, P_LOCAL, &sDefault.force_user, NULL, NULL, FLAG_SHARE}, - {N_("force group"), P_STRING, P_LOCAL, &sDefault.force_group, NULL, NULL, FLAG_SHARE}, - {N_("group"), P_STRING, P_LOCAL, &sDefault.force_group, NULL, NULL, 0}, + {"guest account", P_STRING, P_LOCAL, &sDefault.szGuestaccount, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT | FLAG_GLOBAL}, + {"invalid users", P_LIST, P_LOCAL, &sDefault.szInvalidUsers, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {"valid users", P_LIST, P_LOCAL, &sDefault.szValidUsers, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {"admin users", P_LIST, P_LOCAL, &sDefault.szAdminUsers, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {"read list", P_LIST, P_LOCAL, &sDefault.readlist, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {"write list", P_LIST, P_LOCAL, &sDefault.writelist, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {"printer admin", P_LIST, P_LOCAL, &sDefault.printer_admin, NULL, NULL, FLAG_GLOBAL | FLAG_PRINT}, + {"force user", P_STRING, P_LOCAL, &sDefault.force_user, NULL, NULL, FLAG_SHARE}, + {"force group", P_STRING, P_LOCAL, &sDefault.force_group, NULL, NULL, FLAG_SHARE}, + {"group", P_STRING, P_LOCAL, &sDefault.force_group, NULL, NULL, 0}, - {N_("read only"), P_BOOL, P_LOCAL, &sDefault.bRead_only, NULL, NULL, FLAG_BASIC | FLAG_SHARE}, - {N_("write ok"), P_BOOLREV, P_LOCAL, &sDefault.bRead_only, NULL, NULL, 0}, - {N_("writeable"), P_BOOLREV, P_LOCAL, &sDefault.bRead_only, NULL, NULL, 0}, - {N_("writable"), P_BOOLREV, P_LOCAL, &sDefault.bRead_only, NULL, NULL, 0}, + {"read only", P_BOOL, P_LOCAL, &sDefault.bRead_only, NULL, NULL, FLAG_BASIC | FLAG_SHARE}, + {"write ok", P_BOOLREV, P_LOCAL, &sDefault.bRead_only, NULL, NULL, 0}, + {"writeable", P_BOOLREV, P_LOCAL, &sDefault.bRead_only, NULL, NULL, 0}, + {"writable", P_BOOLREV, P_LOCAL, &sDefault.bRead_only, NULL, NULL, 0}, - {N_("create mask"), P_OCTAL, P_LOCAL, &sDefault.iCreate_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {N_("create mode"), P_OCTAL, P_LOCAL, &sDefault.iCreate_mask, NULL, NULL, FLAG_GLOBAL}, - {N_("force create mode"), P_OCTAL, P_LOCAL, &sDefault.iCreate_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {N_("security mask"), P_OCTAL, P_LOCAL, &sDefault.iSecurity_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {N_("force security mode"), P_OCTAL, P_LOCAL, &sDefault.iSecurity_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {N_("directory mask"), P_OCTAL, P_LOCAL, &sDefault.iDir_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {N_("directory mode"), P_OCTAL, P_LOCAL, &sDefault.iDir_mask, NULL, NULL, FLAG_GLOBAL}, - {N_("force directory mode"), P_OCTAL, P_LOCAL, &sDefault.iDir_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {N_("directory security mask"), P_OCTAL, P_LOCAL, &sDefault.iDir_Security_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {N_("force directory security mode"), P_OCTAL, P_LOCAL, &sDefault.iDir_Security_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, - {N_("inherit permissions"), P_BOOL, P_LOCAL, &sDefault.bInheritPerms, NULL, NULL, FLAG_SHARE}, - {N_("guest only"), P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL, NULL, FLAG_SHARE}, - {N_("only guest"), P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL, NULL, 0}, - - {N_("guest ok"), P_BOOL, P_LOCAL, &sDefault.bGuest_ok, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, - {N_("public"), P_BOOL, P_LOCAL, &sDefault.bGuest_ok, NULL, NULL, 0}, + {"create mask", P_OCTAL, P_LOCAL, &sDefault.iCreate_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {"create mode", P_OCTAL, P_LOCAL, &sDefault.iCreate_mask, NULL, NULL, FLAG_GLOBAL}, + {"force create mode", P_OCTAL, P_LOCAL, &sDefault.iCreate_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {"security mask", P_OCTAL, P_LOCAL, &sDefault.iSecurity_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {"force security mode", P_OCTAL, P_LOCAL, &sDefault.iSecurity_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {"directory mask", P_OCTAL, P_LOCAL, &sDefault.iDir_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {"directory mode", P_OCTAL, P_LOCAL, &sDefault.iDir_mask, NULL, NULL, FLAG_GLOBAL}, + {"force directory mode", P_OCTAL, P_LOCAL, &sDefault.iDir_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {"directory security mask", P_OCTAL, P_LOCAL, &sDefault.iDir_Security_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {"force directory security mode", P_OCTAL, P_LOCAL, &sDefault.iDir_Security_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, + {"inherit permissions", P_BOOL, P_LOCAL, &sDefault.bInheritPerms, NULL, NULL, FLAG_SHARE}, + {"guest only", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL, NULL, FLAG_SHARE}, + {"only guest", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL, NULL, 0}, + + {"guest ok", P_BOOL, P_LOCAL, &sDefault.bGuest_ok, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, + {"public", P_BOOL, P_LOCAL, &sDefault.bGuest_ok, NULL, NULL, 0}, - {N_("only user"), P_BOOL, P_LOCAL, &sDefault.bOnlyUser, NULL, NULL, FLAG_SHARE}, - {N_("hosts allow"), P_LIST, P_LOCAL, &sDefault.szHostsallow, NULL, NULL, FLAG_GLOBAL | FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, - {N_("allow hosts"), P_LIST, P_LOCAL, &sDefault.szHostsallow, NULL, NULL, 0}, - {N_("hosts deny"), P_LIST, P_LOCAL, &sDefault.szHostsdeny, NULL, NULL, FLAG_GLOBAL | FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, - {N_("deny hosts"), P_LIST, P_LOCAL, &sDefault.szHostsdeny, NULL, NULL, 0}, + {"only user", P_BOOL, P_LOCAL, &sDefault.bOnlyUser, NULL, NULL, FLAG_SHARE}, + {"hosts allow", P_LIST, P_LOCAL, &sDefault.szHostsallow, NULL, NULL, FLAG_GLOBAL | FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, + {"allow hosts", P_LIST, P_LOCAL, &sDefault.szHostsallow, NULL, NULL, 0}, + {"hosts deny", P_LIST, P_LOCAL, &sDefault.szHostsdeny, NULL, NULL, FLAG_GLOBAL | FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, + {"deny hosts", P_LIST, P_LOCAL, &sDefault.szHostsdeny, NULL, NULL, 0}, #ifdef WITH_SSL - {N_("Secure Socket Layer Options"), P_SEP, P_SEPARATOR}, - {N_("ssl"), P_BOOL, P_GLOBAL, &Globals.sslEnabled, NULL, NULL, 0}, + {"Secure Socket Layer Options", P_SEP, P_SEPARATOR}, + {"ssl", P_BOOL, P_GLOBAL, &Globals.sslEnabled, NULL, NULL, 0}, - {N_("ssl hosts"), P_LIST, P_GLOBAL, &Globals.sslHostsRequire, NULL, NULL, 0}, - {N_("ssl hosts resign"), P_LIST, P_GLOBAL, &Globals.sslHostsResign, NULL, NULL, 0}, - {N_("ssl CA certDir"), P_STRING, P_GLOBAL, &Globals.sslCaCertDir, NULL, NULL, 0}, - {N_("ssl CA certFile"), P_STRING, P_GLOBAL, &Globals.sslCaCertFile, NULL, NULL, 0}, - {N_("ssl server cert"), P_STRING, P_GLOBAL, &Globals.sslServerCert, NULL, NULL, 0}, - {N_("ssl server key"), P_STRING, P_GLOBAL, &Globals.sslServerPrivKey, NULL, NULL, 0}, - {N_("ssl client cert"), P_STRING, P_GLOBAL, &Globals.sslClientCert, NULL, NULL, 0}, - {N_("ssl client key"), P_STRING, P_GLOBAL, &Globals.sslClientPrivKey, NULL, NULL, 0}, - {N_("ssl egd socket"), P_STRING, P_GLOBAL, &Globals.sslEgdSocket, NULL, NULL, 0}, - {N_("ssl entropy file"), P_STRING, P_GLOBAL, &Globals.sslEntropyFile, NULL, NULL, 0}, - {N_("ssl entropy bytes"), P_INTEGER, P_GLOBAL, &Globals.sslEntropyBytes, NULL, NULL, 0}, - {N_("ssl require clientcert"), P_BOOL, P_GLOBAL, &Globals.sslReqClientCert, NULL, NULL, 0}, - {N_("ssl require servercert"), P_BOOL, P_GLOBAL, &Globals.sslReqServerCert, NULL, NULL, 0}, - {N_("ssl ciphers"), P_STRING, P_GLOBAL, &Globals.sslCiphers, NULL, NULL, 0}, - {N_("ssl version"), P_ENUM, P_GLOBAL, &Globals.sslVersion, NULL, enum_ssl_version, 0}, - {N_("ssl compatibility"), P_BOOL, P_GLOBAL, &Globals.sslCompatibility, NULL, NULL, 0}, + {"ssl hosts", P_LIST, P_GLOBAL, &Globals.sslHostsRequire, NULL, NULL, 0}, + {"ssl hosts resign", P_LIST, P_GLOBAL, &Globals.sslHostsResign, NULL, NULL, 0}, + {"ssl CA certDir", P_STRING, P_GLOBAL, &Globals.sslCaCertDir, NULL, NULL, 0}, + {"ssl CA certFile", P_STRING, P_GLOBAL, &Globals.sslCaCertFile, NULL, NULL, 0}, + {"ssl server cert", P_STRING, P_GLOBAL, &Globals.sslServerCert, NULL, NULL, 0}, + {"ssl server key", P_STRING, P_GLOBAL, &Globals.sslServerPrivKey, NULL, NULL, 0}, + {"ssl client cert", P_STRING, P_GLOBAL, &Globals.sslClientCert, NULL, NULL, 0}, + {"ssl client key", P_STRING, P_GLOBAL, &Globals.sslClientPrivKey, NULL, NULL, 0}, + {"ssl egd socket", P_STRING, P_GLOBAL, &Globals.sslEgdSocket, NULL, NULL, 0}, + {"ssl entropy file", P_STRING, P_GLOBAL, &Globals.sslEntropyFile, NULL, NULL, 0}, + {"ssl entropy bytes", P_INTEGER, P_GLOBAL, &Globals.sslEntropyBytes, NULL, NULL, 0}, + {"ssl require clientcert", P_BOOL, P_GLOBAL, &Globals.sslReqClientCert, NULL, NULL, 0}, + {"ssl require servercert", P_BOOL, P_GLOBAL, &Globals.sslReqServerCert, NULL, NULL, 0}, + {"ssl ciphers", P_STRING, P_GLOBAL, &Globals.sslCiphers, NULL, NULL, 0}, + {"ssl version", P_ENUM, P_GLOBAL, &Globals.sslVersion, NULL, enum_ssl_version, 0}, + {"ssl compatibility", P_BOOL, P_GLOBAL, &Globals.sslCompatibility, NULL, NULL, 0}, #endif /* WITH_SSL */ - {N_("Logging Options"), P_SEP, P_SEPARATOR}, - {N_("log level"), P_INTEGER, P_GLOBAL, &DEBUGLEVEL_CLASS[DBGC_ALL], handle_debug_list, NULL, 0}, - {N_("debuglevel"), P_INTEGER, P_GLOBAL, &DEBUGLEVEL_CLASS[DBGC_ALL], handle_debug_list, NULL, 0}, - {N_("syslog"), P_INTEGER, P_GLOBAL, &Globals.syslog, NULL, NULL, 0}, - {N_("syslog only"), P_BOOL, P_GLOBAL, &Globals.bSyslogOnly, NULL, NULL, 0}, - {N_("log file"), P_STRING, P_GLOBAL, &Globals.szLogFile, NULL, NULL, 0}, + {"Logging Options", P_SEP, P_SEPARATOR}, + {"log level", P_INTEGER, P_GLOBAL, &DEBUGLEVEL_CLASS[DBGC_ALL], handle_debug_list, NULL, 0}, + {"debuglevel", P_INTEGER, P_GLOBAL, &DEBUGLEVEL_CLASS[DBGC_ALL], handle_debug_list, NULL, 0}, + {"syslog", P_INTEGER, P_GLOBAL, &Globals.syslog, NULL, NULL, 0}, + {"syslog only", P_BOOL, P_GLOBAL, &Globals.bSyslogOnly, NULL, NULL, 0}, + {"log file", P_STRING, P_GLOBAL, &Globals.szLogFile, NULL, NULL, 0}, - {N_("max log size"), P_INTEGER, P_GLOBAL, &Globals.max_log_size, NULL, NULL, 0}, - {N_("timestamp logs"), P_BOOL, P_GLOBAL, &Globals.bTimestampLogs, NULL, NULL, 0}, - {N_("debug timestamp"), P_BOOL, P_GLOBAL, &Globals.bTimestampLogs, NULL, NULL, 0}, - {N_("debug hires timestamp"), P_BOOL, P_GLOBAL, &Globals.bDebugHiresTimestamp, NULL, NULL, 0}, - {N_("debug pid"), P_BOOL, P_GLOBAL, &Globals.bDebugPid, NULL, NULL, 0}, - {N_("debug uid"), P_BOOL, P_GLOBAL, &Globals.bDebugUid, NULL, NULL, 0}, + {"max log size", P_INTEGER, P_GLOBAL, &Globals.max_log_size, NULL, NULL, 0}, + {"timestamp logs", P_BOOL, P_GLOBAL, &Globals.bTimestampLogs, NULL, NULL, 0}, + {"debug timestamp", P_BOOL, P_GLOBAL, &Globals.bTimestampLogs, NULL, NULL, 0}, + {"debug hires timestamp", P_BOOL, P_GLOBAL, &Globals.bDebugHiresTimestamp, NULL, NULL, 0}, + {"debug pid", P_BOOL, P_GLOBAL, &Globals.bDebugPid, NULL, NULL, 0}, + {"debug uid", P_BOOL, P_GLOBAL, &Globals.bDebugUid, NULL, NULL, 0}, - {N_("Protocol Options"), P_SEP, P_SEPARATOR}, + {"Protocol Options", P_SEP, P_SEPARATOR}, - {N_("protocol"), P_ENUM, P_GLOBAL, &Globals.maxprotocol, NULL, enum_protocol, 0}, - {N_("large readwrite"), P_BOOL, P_GLOBAL, &Globals.bLargeReadwrite, NULL, NULL, 0}, - {N_("max protocol"), P_ENUM, P_GLOBAL, &Globals.maxprotocol, NULL, enum_protocol, 0}, - {N_("min protocol"), P_ENUM, P_GLOBAL, &Globals.minprotocol, NULL, enum_protocol, 0}, - {N_("unicode"), P_BOOL, P_GLOBAL, &Globals.bUnicode, NULL, NULL, 0}, - {N_("read bmpx"), P_BOOL, P_GLOBAL, &Globals.bReadbmpx, NULL, NULL, 0}, - {N_("read raw"), P_BOOL, P_GLOBAL, &Globals.bReadRaw, NULL, NULL, 0}, - {N_("write raw"), P_BOOL, P_GLOBAL, &Globals.bWriteRaw, NULL, NULL, 0}, + {"protocol", P_ENUM, P_GLOBAL, &Globals.maxprotocol, NULL, enum_protocol, 0}, + {"large readwrite", P_BOOL, P_GLOBAL, &Globals.bLargeReadwrite, NULL, NULL, 0}, + {"max protocol", P_ENUM, P_GLOBAL, &Globals.maxprotocol, NULL, enum_protocol, 0}, + {"min protocol", P_ENUM, P_GLOBAL, &Globals.minprotocol, NULL, enum_protocol, 0}, + {"unicode", P_BOOL, P_GLOBAL, &Globals.bUnicode, NULL, NULL, 0}, + {"read bmpx", P_BOOL, P_GLOBAL, &Globals.bReadbmpx, NULL, NULL, 0}, + {"read raw", P_BOOL, P_GLOBAL, &Globals.bReadRaw, NULL, NULL, 0}, + {"write raw", P_BOOL, P_GLOBAL, &Globals.bWriteRaw, NULL, NULL, 0}, - {N_("nt pipe support"), P_BOOL, P_GLOBAL, &Globals.bNTPipeSupport, NULL, NULL, 0}, - {N_("nt acl support"), P_BOOL, P_LOCAL, &sDefault.bNTAclSupport, NULL, NULL, 0}, - {N_("announce version"), P_STRING, P_GLOBAL, &Globals.szAnnounceVersion, NULL, NULL, 0}, - {N_("announce as"), P_ENUM, P_GLOBAL, &Globals.announce_as, NULL, enum_announce_as, 0}, - {N_("max mux"), P_INTEGER, P_GLOBAL, &Globals.max_mux, NULL, NULL, 0}, - {N_("max xmit"), P_INTEGER, P_GLOBAL, &Globals.max_xmit, NULL, NULL, 0}, + {"nt pipe support", P_BOOL, P_GLOBAL, &Globals.bNTPipeSupport, NULL, NULL, 0}, + {"nt acl support", P_BOOL, P_LOCAL, &sDefault.bNTAclSupport, NULL, NULL, 0}, + {"announce version", P_STRING, P_GLOBAL, &Globals.szAnnounceVersion, NULL, NULL, 0}, + {"announce as", P_ENUM, P_GLOBAL, &Globals.announce_as, NULL, enum_announce_as, 0}, + {"max mux", P_INTEGER, P_GLOBAL, &Globals.max_mux, NULL, NULL, 0}, + {"max xmit", P_INTEGER, P_GLOBAL, &Globals.max_xmit, NULL, NULL, 0}, - {N_("name resolve order"), P_STRING, P_GLOBAL, &Globals.szNameResolveOrder, NULL, NULL, 0}, - {N_("max packet"), P_INTEGER, P_GLOBAL, &Globals.max_packet, NULL, NULL, 0}, - {N_("packet size"), P_INTEGER, P_GLOBAL, &Globals.max_packet, NULL, NULL, 0}, - {N_("max ttl"), P_INTEGER, P_GLOBAL, &Globals.max_ttl, NULL, NULL, 0}, - {N_("max wins ttl"), P_INTEGER, P_GLOBAL, &Globals.max_wins_ttl, NULL, NULL, 0}, - {N_("min wins ttl"), P_INTEGER, P_GLOBAL, &Globals.min_wins_ttl, NULL, NULL, 0}, - {N_("time server"), P_BOOL, P_GLOBAL, &Globals.bTimeServer, NULL, NULL, 0}, - - {N_("Tuning Options"), P_SEP, P_SEPARATOR}, + {"name resolve order", P_STRING, P_GLOBAL, &Globals.szNameResolveOrder, NULL, NULL, 0}, + {"max packet", P_INTEGER, P_GLOBAL, &Globals.max_packet, NULL, NULL, 0}, + {"packet size", P_INTEGER, P_GLOBAL, &Globals.max_packet, NULL, NULL, 0}, + {"max ttl", P_INTEGER, P_GLOBAL, &Globals.max_ttl, NULL, NULL, 0}, + {"max wins ttl", P_INTEGER, P_GLOBAL, &Globals.max_wins_ttl, NULL, NULL, 0}, + {"min wins ttl", P_INTEGER, P_GLOBAL, &Globals.min_wins_ttl, NULL, NULL, 0}, + {"time server", P_BOOL, P_GLOBAL, &Globals.bTimeServer, NULL, NULL, 0}, + + {"Tuning Options", P_SEP, P_SEPARATOR}, - {N_("change notify timeout"), P_INTEGER, P_GLOBAL, &Globals.change_notify_timeout, NULL, NULL, 0}, - {N_("deadtime"), P_INTEGER, P_GLOBAL, &Globals.deadtime, NULL, NULL, 0}, - {N_("getwd cache"), P_BOOL, P_GLOBAL, &use_getwd_cache, NULL, NULL, 0}, - {N_("keepalive"), P_INTEGER, P_GLOBAL, &keepalive, NULL, NULL, 0}, + {"change notify timeout", P_INTEGER, P_GLOBAL, &Globals.change_notify_timeout, NULL, NULL, 0}, + {"deadtime", P_INTEGER, P_GLOBAL, &Globals.deadtime, NULL, NULL, 0}, + {"getwd cache", P_BOOL, P_GLOBAL, &use_getwd_cache, NULL, NULL, 0}, + {"keepalive", P_INTEGER, P_GLOBAL, &keepalive, NULL, NULL, 0}, - {N_("lpq cache time"), P_INTEGER, P_GLOBAL, &Globals.lpqcachetime, NULL, NULL, 0}, - {N_("max smbd processes"), P_INTEGER, P_GLOBAL, &Globals.iMaxSmbdProcesses, NULL, NULL, 0}, - {N_("max connections"), P_INTEGER, P_LOCAL, &sDefault.iMaxConnections, NULL, NULL, FLAG_SHARE}, - {N_("paranoid server security"), P_BOOL, P_GLOBAL, &Globals.paranoid_server_security, NULL, NULL, 0}, - {N_("max disk size"), P_INTEGER, P_GLOBAL, &Globals.maxdisksize, NULL, NULL, 0}, - {N_("max open files"), P_INTEGER, P_GLOBAL, &Globals.max_open_files, NULL, NULL, 0}, - {N_("min print space"), P_INTEGER, P_LOCAL, &sDefault.iMinPrintSpace, NULL, NULL, FLAG_PRINT}, - {N_("read size"), P_INTEGER, P_GLOBAL, &Globals.ReadSize, NULL, NULL, 0}, + {"lpq cache time", P_INTEGER, P_GLOBAL, &Globals.lpqcachetime, NULL, NULL, 0}, + {"max smbd processes", P_INTEGER, P_GLOBAL, &Globals.iMaxSmbdProcesses, NULL, NULL, 0}, + {"max connections", P_INTEGER, P_LOCAL, &sDefault.iMaxConnections, NULL, NULL, FLAG_SHARE}, + {"paranoid server security", P_BOOL, P_GLOBAL, &Globals.paranoid_server_security, NULL, NULL, 0}, + {"max disk size", P_INTEGER, P_GLOBAL, &Globals.maxdisksize, NULL, NULL, 0}, + {"max open files", P_INTEGER, P_GLOBAL, &Globals.max_open_files, NULL, NULL, 0}, + {"min print space", P_INTEGER, P_LOCAL, &sDefault.iMinPrintSpace, NULL, NULL, FLAG_PRINT}, + {"read size", P_INTEGER, P_GLOBAL, &Globals.ReadSize, NULL, NULL, 0}, - {N_("socket options"), P_GSTRING, P_GLOBAL, user_socket_options, NULL, NULL, 0}, - {N_("stat cache size"), P_INTEGER, P_GLOBAL, &Globals.stat_cache_size, NULL, NULL, 0}, - {N_("strict allocate"), P_BOOL, P_LOCAL, &sDefault.bStrictAllocate, NULL, NULL, FLAG_SHARE}, - {N_("strict sync"), P_BOOL, P_LOCAL, &sDefault.bStrictSync, NULL, NULL, FLAG_SHARE}, - {N_("sync always"), P_BOOL, P_LOCAL, &sDefault.bSyncAlways, NULL, NULL, FLAG_SHARE}, - {N_("use mmap"), P_BOOL, P_GLOBAL, &Globals.bUseMmap, NULL, NULL, 0}, - {N_("hostname lookups"), P_BOOL, P_GLOBAL, &Globals.bHostnameLookups, NULL, NULL, 0}, - {N_("write cache size"), P_INTEGER, P_LOCAL, &sDefault.iWriteCacheSize, NULL, NULL, FLAG_SHARE}, - - {N_("Printing Options"), P_SEP, P_SEPARATOR}, + {"socket options", P_GSTRING, P_GLOBAL, user_socket_options, NULL, NULL, 0}, + {"stat cache size", P_INTEGER, P_GLOBAL, &Globals.stat_cache_size, NULL, NULL, 0}, + {"strict allocate", P_BOOL, P_LOCAL, &sDefault.bStrictAllocate, NULL, NULL, FLAG_SHARE}, + {"strict sync", P_BOOL, P_LOCAL, &sDefault.bStrictSync, NULL, NULL, FLAG_SHARE}, + {"sync always", P_BOOL, P_LOCAL, &sDefault.bSyncAlways, NULL, NULL, FLAG_SHARE}, + {"use mmap", P_BOOL, P_GLOBAL, &Globals.bUseMmap, NULL, NULL, 0}, + {"hostname lookups", P_BOOL, P_GLOBAL, &Globals.bHostnameLookups, NULL, NULL, 0}, + {"write cache size", P_INTEGER, P_LOCAL, &sDefault.iWriteCacheSize, NULL, NULL, FLAG_SHARE}, + + {"Printing Options", P_SEP, P_SEPARATOR}, - {N_("total print jobs"), P_INTEGER, P_GLOBAL, &Globals.iTotalPrintJobs, NULL, NULL, FLAG_PRINT}, - {N_("max print jobs"), P_INTEGER, P_LOCAL, &sDefault.iMaxPrintJobs, NULL, NULL, FLAG_PRINT}, - {N_("load printers"), P_BOOL, P_GLOBAL, &Globals.bLoadPrinters, NULL, NULL, FLAG_PRINT}, - {N_("printcap name"), P_STRING, P_GLOBAL, &Globals.szPrintcapname, NULL, NULL, FLAG_PRINT}, - {N_("printcap"), P_STRING, P_GLOBAL, &Globals.szPrintcapname, NULL, NULL, 0}, - {N_("printable"), P_BOOL, P_LOCAL, &sDefault.bPrint_ok, NULL, NULL, FLAG_PRINT}, - {N_("print ok"), P_BOOL, P_LOCAL, &sDefault.bPrint_ok, NULL, NULL, 0}, - {N_("postscript"), P_BOOL, P_LOCAL, &sDefault.bPostscript, NULL, NULL, FLAG_PRINT}, - {N_("printing"), P_ENUM, P_LOCAL, &sDefault.iPrinting, NULL, enum_printing, FLAG_PRINT | FLAG_GLOBAL}, - {N_("print command"), P_STRING, P_LOCAL, &sDefault.szPrintcommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - {N_("disable spoolss"), P_BOOL, P_GLOBAL, &Globals.bDisableSpoolss, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - {N_("lpq command"), P_STRING, P_LOCAL, &sDefault.szLpqcommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - {N_("lprm command"), P_STRING, P_LOCAL, &sDefault.szLprmcommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - {N_("lppause command"), P_STRING, P_LOCAL, &sDefault.szLppausecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - {N_("lpresume command"), P_STRING, P_LOCAL, &sDefault.szLpresumecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - {N_("queuepause command"), P_STRING, P_LOCAL, &sDefault.szQueuepausecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - {N_("queueresume command"), P_STRING, P_LOCAL, &sDefault.szQueueresumecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - - {N_("enumports command"), P_STRING, P_GLOBAL, &Globals.szEnumPortsCommand, NULL, NULL, 0}, - {N_("addprinter command"), P_STRING, P_GLOBAL, &Globals.szAddPrinterCommand, NULL, NULL, 0}, - {N_("deleteprinter command"), P_STRING, P_GLOBAL, &Globals.szDeletePrinterCommand, NULL, NULL, 0}, - {N_("show add printer wizard"), P_BOOL, P_GLOBAL, &Globals.bMsAddPrinterWizard, NULL, NULL, 0}, - {N_("os2 driver map"), P_STRING, P_GLOBAL, &Globals.szOs2DriverMap, NULL, NULL, 0}, + {"total print jobs", P_INTEGER, P_GLOBAL, &Globals.iTotalPrintJobs, NULL, NULL, FLAG_PRINT}, + {"max print jobs", P_INTEGER, P_LOCAL, &sDefault.iMaxPrintJobs, NULL, NULL, FLAG_PRINT}, + {"load printers", P_BOOL, P_GLOBAL, &Globals.bLoadPrinters, NULL, NULL, FLAG_PRINT}, + {"printcap name", P_STRING, P_GLOBAL, &Globals.szPrintcapname, NULL, NULL, FLAG_PRINT}, + {"printcap", P_STRING, P_GLOBAL, &Globals.szPrintcapname, NULL, NULL, 0}, + {"printable", P_BOOL, P_LOCAL, &sDefault.bPrint_ok, NULL, NULL, FLAG_PRINT}, + {"print ok", P_BOOL, P_LOCAL, &sDefault.bPrint_ok, NULL, NULL, 0}, + {"postscript", P_BOOL, P_LOCAL, &sDefault.bPostscript, NULL, NULL, FLAG_PRINT}, + {"printing", P_ENUM, P_LOCAL, &sDefault.iPrinting, NULL, enum_printing, FLAG_PRINT | FLAG_GLOBAL}, + {"print command", P_STRING, P_LOCAL, &sDefault.szPrintcommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + {"disable spoolss", P_BOOL, P_GLOBAL, &Globals.bDisableSpoolss, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + {"lpq command", P_STRING, P_LOCAL, &sDefault.szLpqcommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + {"lprm command", P_STRING, P_LOCAL, &sDefault.szLprmcommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + {"lppause command", P_STRING, P_LOCAL, &sDefault.szLppausecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + {"lpresume command", P_STRING, P_LOCAL, &sDefault.szLpresumecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + {"queuepause command", P_STRING, P_LOCAL, &sDefault.szQueuepausecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + {"queueresume command", P_STRING, P_LOCAL, &sDefault.szQueueresumecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + + {"enumports command", P_STRING, P_GLOBAL, &Globals.szEnumPortsCommand, NULL, NULL, 0}, + {"addprinter command", P_STRING, P_GLOBAL, &Globals.szAddPrinterCommand, NULL, NULL, 0}, + {"deleteprinter command", P_STRING, P_GLOBAL, &Globals.szDeletePrinterCommand, NULL, NULL, 0}, + {"show add printer wizard", P_BOOL, P_GLOBAL, &Globals.bMsAddPrinterWizard, NULL, NULL, 0}, + {"os2 driver map", P_STRING, P_GLOBAL, &Globals.szOs2DriverMap, NULL, NULL, 0}, - {N_("printer name"), P_STRING, P_LOCAL, &sDefault.szPrintername, NULL, NULL, FLAG_PRINT}, - {N_("printer"), P_STRING, P_LOCAL, &sDefault.szPrintername, NULL, NULL, 0}, - {N_("use client driver"), P_BOOL, P_LOCAL, &sDefault.bUseClientDriver, NULL, NULL, FLAG_PRINT}, - {N_("printer driver"), P_STRING, P_LOCAL, &sDefault.szPrinterDriver, NULL, NULL, FLAG_PRINT}, - {N_("printer driver file"), P_STRING, P_LOCAL, &sDefault.szDriverFile, NULL, NULL, FLAG_PRINT}, - {N_("printer driver location"), P_STRING, P_LOCAL, &sDefault.szPrinterDriverLocation, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, - - {N_("Filename Handling"), P_SEP, P_SEPARATOR}, - {N_("strip dot"), P_BOOL, P_GLOBAL, &Globals.bStripDot, NULL, NULL, 0}, + {"printer name", P_STRING, P_LOCAL, &sDefault.szPrintername, NULL, NULL, FLAG_PRINT}, + {"printer", P_STRING, P_LOCAL, &sDefault.szPrintername, NULL, NULL, 0}, + {"use client driver", P_BOOL, P_LOCAL, &sDefault.bUseClientDriver, NULL, NULL, FLAG_PRINT}, + {"printer driver", P_STRING, P_LOCAL, &sDefault.szPrinterDriver, NULL, NULL, FLAG_PRINT}, + {"printer driver file", P_STRING, P_LOCAL, &sDefault.szDriverFile, NULL, NULL, FLAG_PRINT}, + {"printer driver location", P_STRING, P_LOCAL, &sDefault.szPrinterDriverLocation, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + + {"Filename Handling", P_SEP, P_SEPARATOR}, + {"strip dot", P_BOOL, P_GLOBAL, &Globals.bStripDot, NULL, NULL, 0}, - {N_("mangled stack"), P_INTEGER, P_GLOBAL, &Globals.mangled_stack, NULL, NULL, 0}, - {N_("default case"), P_ENUM, P_LOCAL, &sDefault.iDefaultCase, NULL, enum_case, FLAG_SHARE}, - {N_("case sensitive"), P_BOOL, P_LOCAL, &sDefault.bCaseSensitive, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("casesignames"), P_BOOL, P_LOCAL, &sDefault.bCaseSensitive, NULL, NULL, 0}, - {N_("preserve case"), P_BOOL, P_LOCAL, &sDefault.bCasePreserve, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("short preserve case"), P_BOOL, P_LOCAL, &sDefault.bShortCasePreserve, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("mangle case"), P_BOOL, P_LOCAL, &sDefault.bCaseMangle, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("mangling char"), P_CHAR, P_LOCAL, &sDefault.magic_char, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("hide dot files"), P_BOOL, P_LOCAL, &sDefault.bHideDotFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("hide unreadable"), P_BOOL, P_LOCAL, &sDefault.bHideUnReadable, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("delete veto files"), P_BOOL, P_LOCAL, &sDefault.bDeleteVetoFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("veto files"), P_STRING, P_LOCAL, &sDefault.szVetoFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, - {N_("hide files"), P_STRING, P_LOCAL, &sDefault.szHideFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, - {N_("veto oplock files"), P_STRING, P_LOCAL, &sDefault.szVetoOplockFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, - {N_("map system"), P_BOOL, P_LOCAL, &sDefault.bMap_system, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("map hidden"), P_BOOL, P_LOCAL, &sDefault.bMap_hidden, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("map archive"), P_BOOL, P_LOCAL, &sDefault.bMap_archive, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("mangled names"), P_BOOL, P_LOCAL, &sDefault.bMangledNames, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("mangled map"), P_STRING, P_LOCAL, &sDefault.szMangledMap, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("stat cache"), P_BOOL, P_GLOBAL, &Globals.bStatCache, NULL, NULL, 0}, - - {N_("Domain Options"), P_SEP, P_SEPARATOR}, + {"mangled stack", P_INTEGER, P_GLOBAL, &Globals.mangled_stack, NULL, NULL, 0}, + {"default case", P_ENUM, P_LOCAL, &sDefault.iDefaultCase, NULL, enum_case, FLAG_SHARE}, + {"case sensitive", P_BOOL, P_LOCAL, &sDefault.bCaseSensitive, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"casesignames", P_BOOL, P_LOCAL, &sDefault.bCaseSensitive, NULL, NULL, 0}, + {"preserve case", P_BOOL, P_LOCAL, &sDefault.bCasePreserve, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"short preserve case", P_BOOL, P_LOCAL, &sDefault.bShortCasePreserve, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"mangle case", P_BOOL, P_LOCAL, &sDefault.bCaseMangle, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"mangling char", P_CHAR, P_LOCAL, &sDefault.magic_char, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"hide dot files", P_BOOL, P_LOCAL, &sDefault.bHideDotFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"hide unreadable", P_BOOL, P_LOCAL, &sDefault.bHideUnReadable, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"delete veto files", P_BOOL, P_LOCAL, &sDefault.bDeleteVetoFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"veto files", P_STRING, P_LOCAL, &sDefault.szVetoFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, + {"hide files", P_STRING, P_LOCAL, &sDefault.szHideFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, + {"veto oplock files", P_STRING, P_LOCAL, &sDefault.szVetoOplockFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, + {"map system", P_BOOL, P_LOCAL, &sDefault.bMap_system, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"map hidden", P_BOOL, P_LOCAL, &sDefault.bMap_hidden, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"map archive", P_BOOL, P_LOCAL, &sDefault.bMap_archive, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"mangled names", P_BOOL, P_LOCAL, &sDefault.bMangledNames, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"mangled map", P_STRING, P_LOCAL, &sDefault.szMangledMap, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"stat cache", P_BOOL, P_GLOBAL, &Globals.bStatCache, NULL, NULL, 0}, + + {"Domain Options", P_SEP, P_SEPARATOR}, - {N_("domain admin group"), P_LIST, P_GLOBAL, &Globals.szDomainAdminGroup, NULL, NULL, 0}, - {N_("domain guest group"), P_LIST, P_GLOBAL, &Globals.szDomainGuestGroup, NULL, NULL, 0}, + {"domain admin group", P_LIST, P_GLOBAL, &Globals.szDomainAdminGroup, NULL, NULL, 0}, + {"domain guest group", P_LIST, P_GLOBAL, &Globals.szDomainGuestGroup, NULL, NULL, 0}, #ifdef USING_GROUPNAME_MAP - {N_("groupname map"), P_STRING, P_GLOBAL, &Globals.szGroupnameMap, NULL, NULL, 0}, + {"groupname map", P_STRING, P_GLOBAL, &Globals.szGroupnameMap, NULL, NULL, 0}, #endif /* USING_GROUPNAME_MAP */ - {N_("machine password timeout"), P_INTEGER, P_GLOBAL, &Globals.machine_password_timeout, NULL, NULL, 0}, + {"machine password timeout", P_INTEGER, P_GLOBAL, &Globals.machine_password_timeout, NULL, NULL, 0}, - {N_("Logon Options"), P_SEP, P_SEPARATOR}, + {"Logon Options", P_SEP, P_SEPARATOR}, - {N_("add user script"), P_STRING, P_GLOBAL, &Globals.szAddUserScript, NULL, NULL, 0}, - {N_("delete user script"), P_STRING, P_GLOBAL, &Globals.szDelUserScript, NULL, NULL, 0}, - {N_("add group script"), P_STRING, P_GLOBAL, &Globals.szAddGroupScript, NULL, NULL, 0}, - {N_("delete group script"), P_STRING, P_GLOBAL, &Globals.szDelGroupScript, NULL, NULL, 0}, - {N_("add user to group script"), P_STRING, P_GLOBAL, &Globals.szAddUserToGroupScript, NULL, NULL, 0}, - {N_("delete user from group script"), P_STRING, P_GLOBAL, &Globals.szDelUserToGroupScript, NULL, NULL, 0}, - {N_("add machine script"), P_STRING, P_GLOBAL, &Globals.szAddMachineScript, NULL, NULL, 0}, - {N_("shutdown script"), P_STRING, P_GLOBAL, &Globals.szShutdownScript, NULL, NULL, 0}, - {N_("abort shutdown script"), P_STRING, P_GLOBAL, &Globals.szAbortShutdownScript, NULL, NULL, 0}, - - {N_("logon script"), P_STRING, P_GLOBAL, &Globals.szLogonScript, NULL, NULL, 0}, - {N_("logon path"), P_STRING, P_GLOBAL, &Globals.szLogonPath, NULL, NULL, 0}, - {N_("logon drive"), P_STRING, P_GLOBAL, &Globals.szLogonDrive, NULL, NULL, 0}, - {N_("logon home"), P_STRING, P_GLOBAL, &Globals.szLogonHome, NULL, NULL, 0}, - {N_("domain logons"), P_BOOL, P_GLOBAL, &Globals.bDomainLogons, NULL, NULL, 0}, - - {N_("Browse Options"), P_SEP, P_SEPARATOR}, + {"add user script", P_STRING, P_GLOBAL, &Globals.szAddUserScript, NULL, NULL, 0}, + {"delete user script", P_STRING, P_GLOBAL, &Globals.szDelUserScript, NULL, NULL, 0}, + {"add group script", P_STRING, P_GLOBAL, &Globals.szAddGroupScript, NULL, NULL, 0}, + {"delete group script", P_STRING, P_GLOBAL, &Globals.szDelGroupScript, NULL, NULL, 0}, + {"add user to group script", P_STRING, P_GLOBAL, &Globals.szAddUserToGroupScript, NULL, NULL, 0}, + {"delete user from group script", P_STRING, P_GLOBAL, &Globals.szDelUserToGroupScript, NULL, NULL, 0}, + {"add machine script", P_STRING, P_GLOBAL, &Globals.szAddMachineScript, NULL, NULL, 0}, + {"shutdown script", P_STRING, P_GLOBAL, &Globals.szShutdownScript, NULL, NULL, 0}, + {"abort shutdown script", P_STRING, P_GLOBAL, &Globals.szAbortShutdownScript, NULL, NULL, 0}, + + {"logon script", P_STRING, P_GLOBAL, &Globals.szLogonScript, NULL, NULL, 0}, + {"logon path", P_STRING, P_GLOBAL, &Globals.szLogonPath, NULL, NULL, 0}, + {"logon drive", P_STRING, P_GLOBAL, &Globals.szLogonDrive, NULL, NULL, 0}, + {"logon home", P_STRING, P_GLOBAL, &Globals.szLogonHome, NULL, NULL, 0}, + {"domain logons", P_BOOL, P_GLOBAL, &Globals.bDomainLogons, NULL, NULL, 0}, + + {"Browse Options", P_SEP, P_SEPARATOR}, - {N_("os level"), P_INTEGER, P_GLOBAL, &Globals.os_level, NULL, NULL, FLAG_BASIC}, - {N_("lm announce"), P_ENUM, P_GLOBAL, &Globals.lm_announce, NULL, enum_bool_auto, 0}, - {N_("lm interval"), P_INTEGER, P_GLOBAL, &Globals.lm_interval, NULL, NULL, 0}, - {N_("preferred master"), P_ENUM, P_GLOBAL, &Globals.bPreferredMaster, NULL, enum_bool_auto, FLAG_BASIC}, - {N_("prefered master"), P_ENUM, P_GLOBAL, &Globals.bPreferredMaster, NULL, enum_bool_auto, FLAG_HIDE}, - {N_("local master"), P_BOOL, P_GLOBAL, &Globals.bLocalMaster, NULL, NULL, FLAG_BASIC}, - {N_("domain master"), P_ENUM, P_GLOBAL, &Globals.bDomainMaster, NULL, enum_bool_auto, FLAG_BASIC}, - {N_("browse list"), P_BOOL, P_GLOBAL, &Globals.bBrowseList, NULL, NULL, 0}, - {N_("browseable"), P_BOOL, P_LOCAL, &sDefault.bBrowseable, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, - {N_("browsable"), P_BOOL, P_LOCAL, &sDefault.bBrowseable, NULL, NULL, 0}, - {N_("enhanced browsing"), P_BOOL, P_GLOBAL, &Globals.enhanced_browsing, NULL, NULL}, - - {N_("WINS Options"), P_SEP, P_SEPARATOR}, - {N_("dns proxy"), P_BOOL, P_GLOBAL, &Globals.bDNSproxy, NULL, NULL, 0}, - {N_("wins proxy"), P_BOOL, P_GLOBAL, &Globals.bWINSproxy, NULL, NULL, 0}, + {"os level", P_INTEGER, P_GLOBAL, &Globals.os_level, NULL, NULL, FLAG_BASIC}, + {"lm announce", P_ENUM, P_GLOBAL, &Globals.lm_announce, NULL, enum_bool_auto, 0}, + {"lm interval", P_INTEGER, P_GLOBAL, &Globals.lm_interval, NULL, NULL, 0}, + {"preferred master", P_ENUM, P_GLOBAL, &Globals.bPreferredMaster, NULL, enum_bool_auto, FLAG_BASIC}, + {"prefered master", P_ENUM, P_GLOBAL, &Globals.bPreferredMaster, NULL, enum_bool_auto, FLAG_HIDE}, + {"local master", P_BOOL, P_GLOBAL, &Globals.bLocalMaster, NULL, NULL, FLAG_BASIC}, + {"domain master", P_ENUM, P_GLOBAL, &Globals.bDomainMaster, NULL, enum_bool_auto, FLAG_BASIC}, + {"browse list", P_BOOL, P_GLOBAL, &Globals.bBrowseList, NULL, NULL, 0}, + {"browseable", P_BOOL, P_LOCAL, &sDefault.bBrowseable, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, + {"browsable", P_BOOL, P_LOCAL, &sDefault.bBrowseable, NULL, NULL, 0}, + {"enhanced browsing", P_BOOL, P_GLOBAL, &Globals.enhanced_browsing, NULL, NULL}, + + {"WINS Options", P_SEP, P_SEPARATOR}, + {"dns proxy", P_BOOL, P_GLOBAL, &Globals.bDNSproxy, NULL, NULL, 0}, + {"wins proxy", P_BOOL, P_GLOBAL, &Globals.bWINSproxy, NULL, NULL, 0}, - {N_("wins server"), P_STRING, P_GLOBAL, &Globals.szWINSserver, handle_wins_server_list, NULL, FLAG_BASIC}, - {N_("wins support"), P_BOOL, P_GLOBAL, &Globals.bWINSsupport, NULL, NULL, FLAG_BASIC}, - {N_("wins hook"), P_STRING, P_GLOBAL, &Globals.szWINSHook, NULL, NULL, 0}, + {"wins server", P_STRING, P_GLOBAL, &Globals.szWINSserver, handle_wins_server_list, NULL, FLAG_BASIC}, + {"wins support", P_BOOL, P_GLOBAL, &Globals.bWINSsupport, NULL, NULL, FLAG_BASIC}, + {"wins hook", P_STRING, P_GLOBAL, &Globals.szWINSHook, NULL, NULL, 0}, - {N_("Locking Options"), P_SEP, P_SEPARATOR}, + {"Locking Options", P_SEP, P_SEPARATOR}, - {N_("blocking locks"), P_BOOL, P_LOCAL, &sDefault.bBlockingLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("fake oplocks"), P_BOOL, P_LOCAL, &sDefault.bFakeOplocks, NULL, NULL, FLAG_SHARE}, - {N_("kernel oplocks"), P_BOOL, P_GLOBAL, &Globals.bKernelOplocks, NULL, NULL, FLAG_GLOBAL}, - {N_("locking"), P_BOOL, P_LOCAL, &sDefault.bLocking, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"blocking locks", P_BOOL, P_LOCAL, &sDefault.bBlockingLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"fake oplocks", P_BOOL, P_LOCAL, &sDefault.bFakeOplocks, NULL, NULL, FLAG_SHARE}, + {"kernel oplocks", P_BOOL, P_GLOBAL, &Globals.bKernelOplocks, NULL, NULL, FLAG_GLOBAL}, + {"locking", P_BOOL, P_LOCAL, &sDefault.bLocking, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("oplocks"), P_BOOL, P_LOCAL, &sDefault.bOpLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("level2 oplocks"), P_BOOL, P_LOCAL, &sDefault.bLevel2OpLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("oplock break wait time"), P_INTEGER, P_GLOBAL, &Globals.oplock_break_wait_time, NULL, NULL, FLAG_GLOBAL}, - {N_("oplock contention limit"), P_INTEGER, P_LOCAL, &sDefault.iOplockContentionLimit, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("posix locking"), P_BOOL, P_LOCAL, &sDefault.bPosixLocking, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("strict locking"), P_BOOL, P_LOCAL, &sDefault.bStrictLocking, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("share modes"), P_BOOL, P_LOCAL, &sDefault.bShareModes, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"oplocks", P_BOOL, P_LOCAL, &sDefault.bOpLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"level2 oplocks", P_BOOL, P_LOCAL, &sDefault.bLevel2OpLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"oplock break wait time", P_INTEGER, P_GLOBAL, &Globals.oplock_break_wait_time, NULL, NULL, FLAG_GLOBAL}, + {"oplock contention limit", P_INTEGER, P_LOCAL, &sDefault.iOplockContentionLimit, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"posix locking", P_BOOL, P_LOCAL, &sDefault.bPosixLocking, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"strict locking", P_BOOL, P_LOCAL, &sDefault.bStrictLocking, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"share modes", P_BOOL, P_LOCAL, &sDefault.bShareModes, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, #ifdef WITH_LDAP - {N_("Ldap Options"), P_SEP, P_SEPARATOR}, + {"Ldap Options", P_SEP, P_SEPARATOR}, - {N_("ldap server"), P_STRING, P_GLOBAL, &Globals.szLdapServer, NULL, NULL, 0}, - {N_("ldap port"), P_INTEGER, P_GLOBAL, &Globals.ldap_port, NULL, NULL, 0}, - {N_("ldap suffix"), P_STRING, P_GLOBAL, &Globals.szLdapSuffix, NULL, NULL, 0}, - {N_("ldap filter"), P_STRING, P_GLOBAL, &Globals.szLdapFilter, NULL, NULL, 0}, - {N_("ldap root"), P_STRING, P_GLOBAL, &Globals.szLdapRoot, NULL, NULL, 0}, - {N_("ldap root passwd"), P_STRING, P_GLOBAL, &Globals.szLdapRootPassword, NULL, NULL, 0}, + {"ldap server", P_STRING, P_GLOBAL, &Globals.szLdapServer, NULL, NULL, 0}, + {"ldap port", P_INTEGER, P_GLOBAL, &Globals.ldap_port, NULL, NULL, 0}, + {"ldap suffix", P_STRING, P_GLOBAL, &Globals.szLdapSuffix, NULL, NULL, 0}, + {"ldap filter", P_STRING, P_GLOBAL, &Globals.szLdapFilter, NULL, NULL, 0}, + {"ldap root", P_STRING, P_GLOBAL, &Globals.szLdapRoot, NULL, NULL, 0}, + {"ldap root passwd", P_STRING, P_GLOBAL, &Globals.szLdapRootPassword, NULL, NULL, 0}, #endif /* WITH_LDAP */ - {N_("Miscellaneous Options"), P_SEP, P_SEPARATOR}, - {N_("add share command"), P_STRING, P_GLOBAL, &Globals.szAddShareCommand, NULL, NULL, 0}, - {N_("change share command"), P_STRING, P_GLOBAL, &Globals.szChangeShareCommand, NULL, NULL, 0}, - {N_("delete share command"), P_STRING, P_GLOBAL, &Globals.szDeleteShareCommand, NULL, NULL, 0}, + {"Miscellaneous Options", P_SEP, P_SEPARATOR}, + {"add share command", P_STRING, P_GLOBAL, &Globals.szAddShareCommand, NULL, NULL, 0}, + {"change share command", P_STRING, P_GLOBAL, &Globals.szChangeShareCommand, NULL, NULL, 0}, + {"delete share command", P_STRING, P_GLOBAL, &Globals.szDeleteShareCommand, NULL, NULL, 0}, - {N_("config file"), P_STRING, P_GLOBAL, &Globals.szConfigFile, NULL, NULL, FLAG_HIDE}, - {N_("preload"), P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, 0}, - {N_("auto services"), P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, 0}, - {N_("lock dir"), P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, 0}, - {N_("lock directory"), P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, 0}, + {"config file", P_STRING, P_GLOBAL, &Globals.szConfigFile, NULL, NULL, FLAG_HIDE}, + {"preload", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, 0}, + {"auto services", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, 0}, + {"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, 0}, + {"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, 0}, #ifdef WITH_UTMP - {N_("utmp directory"), P_STRING, P_GLOBAL, &Globals.szUtmpDir, NULL, NULL, 0}, - {N_("wtmp directory"), P_STRING, P_GLOBAL, &Globals.szWtmpDir, NULL, NULL, 0}, - {N_("utmp"), P_BOOL, P_GLOBAL, &Globals.bUtmp, NULL, NULL, 0}, + {"utmp directory", P_STRING, P_GLOBAL, &Globals.szUtmpDir, NULL, NULL, 0}, + {"wtmp directory", P_STRING, P_GLOBAL, &Globals.szWtmpDir, NULL, NULL, 0}, + {"utmp"), P_BOOL, P_GLOBAL, &Globals.bUtmp, NULL, NULL, 0}, #endif - {N_("default service"), P_STRING, P_GLOBAL, &Globals.szDefaultService, NULL, NULL, 0}, - {N_("default"), P_STRING, P_GLOBAL, &Globals.szDefaultService, NULL, NULL, 0}, - {N_("message command"), P_STRING, P_GLOBAL, &Globals.szMsgCommand, NULL, NULL, 0}, - {N_("dfree command"), P_STRING, P_GLOBAL, &Globals.szDfree, NULL, NULL, 0}, - {N_("remote announce"), P_STRING, P_GLOBAL, &Globals.szRemoteAnnounce, NULL, NULL, 0}, - {N_("remote browse sync"), P_STRING, P_GLOBAL, &Globals.szRemoteBrowseSync, NULL, NULL, 0}, - {N_("socket address"), P_STRING, P_GLOBAL, &Globals.szSocketAddress, NULL, NULL, 0}, - {N_("homedir map"), P_STRING, P_GLOBAL, &Globals.szNISHomeMapName, NULL, NULL, 0}, - {N_("time offset"), P_INTEGER, P_GLOBAL, &extra_time_offset, NULL, NULL, 0}, - {N_("NIS homedir"), P_BOOL, P_GLOBAL, &Globals.bNISHomeMap, NULL, NULL, 0}, - {N_("-valid"), P_BOOL, P_LOCAL, &sDefault.valid, NULL, NULL, FLAG_HIDE}, + {"default service", P_STRING, P_GLOBAL, &Globals.szDefaultService, NULL, NULL, 0}, + {"default", P_STRING, P_GLOBAL, &Globals.szDefaultService, NULL, NULL, 0}, + {"message command", P_STRING, P_GLOBAL, &Globals.szMsgCommand, NULL, NULL, 0}, + {"dfree command", P_STRING, P_GLOBAL, &Globals.szDfree, NULL, NULL, 0}, + {"remote announce", P_STRING, P_GLOBAL, &Globals.szRemoteAnnounce, NULL, NULL, 0}, + {"remote browse sync", P_STRING, P_GLOBAL, &Globals.szRemoteBrowseSync, NULL, NULL, 0}, + {"socket address", P_STRING, P_GLOBAL, &Globals.szSocketAddress, NULL, NULL, 0}, + {"homedir map", P_STRING, P_GLOBAL, &Globals.szNISHomeMapName, NULL, NULL, 0}, + {"time offset", P_INTEGER, P_GLOBAL, &extra_time_offset, NULL, NULL, 0}, + {"NIS homedir", P_BOOL, P_GLOBAL, &Globals.bNISHomeMap, NULL, NULL, 0}, + {"-valid", P_BOOL, P_LOCAL, &sDefault.valid, NULL, NULL, FLAG_HIDE}, - {N_("copy"), P_STRING, P_LOCAL, &sDefault.szCopy, handle_copy, NULL, FLAG_HIDE}, - {N_("include"), P_STRING, P_LOCAL, &sDefault.szInclude, handle_include, NULL, FLAG_HIDE}, - {N_("exec"), P_STRING, P_LOCAL, &sDefault.szPreExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, - {N_("preexec"), P_STRING, P_LOCAL, &sDefault.szPreExec, NULL, NULL, 0}, + {"copy", P_STRING, P_LOCAL, &sDefault.szCopy, handle_copy, NULL, FLAG_HIDE}, + {"include", P_STRING, P_LOCAL, &sDefault.szInclude, handle_include, NULL, FLAG_HIDE}, + {"exec", P_STRING, P_LOCAL, &sDefault.szPreExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, + {"preexec", P_STRING, P_LOCAL, &sDefault.szPreExec, NULL, NULL, 0}, - {N_("preexec close"), P_BOOL, P_LOCAL, &sDefault.bPreexecClose, NULL, NULL, FLAG_SHARE}, - {N_("postexec"), P_STRING, P_LOCAL, &sDefault.szPostExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, - {N_("root preexec"), P_STRING, P_LOCAL, &sDefault.szRootPreExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, - {N_("root preexec close"), P_BOOL, P_LOCAL, &sDefault.bRootpreexecClose, NULL, NULL, FLAG_SHARE}, - {N_("root postexec"), P_STRING, P_LOCAL, &sDefault.szRootPostExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, - {N_("available"), P_BOOL, P_LOCAL, &sDefault.bAvailable, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, - {N_("volume"), P_STRING, P_LOCAL, &sDefault.volume, NULL, NULL, FLAG_SHARE }, - {N_("fstype"), P_STRING, P_LOCAL, &sDefault.fstype, NULL, NULL, FLAG_SHARE}, - {N_("set directory"), P_BOOLREV, P_LOCAL, &sDefault.bNo_set_dir, NULL, NULL, FLAG_SHARE}, - {N_("source environment"), P_STRING, P_GLOBAL, &Globals.szSourceEnv, handle_source_env, NULL, 0}, - {N_("wide links"), P_BOOL, P_LOCAL, &sDefault.bWidelinks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("follow symlinks"), P_BOOL, P_LOCAL, &sDefault.bSymlinks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("dont descend"), P_STRING, P_LOCAL, &sDefault.szDontdescend, NULL, NULL, FLAG_SHARE}, - {N_("magic script"), P_STRING, P_LOCAL, &sDefault.szMagicScript, NULL, NULL, FLAG_SHARE}, - {N_("magic output"), P_STRING, P_LOCAL, &sDefault.szMagicOutput, NULL, NULL, FLAG_SHARE}, - {N_("delete readonly"), P_BOOL, P_LOCAL, &sDefault.bDeleteReadonly, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("dos filemode"), P_BOOL, P_LOCAL, &sDefault.bDosFilemode, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("dos filetimes"), P_BOOL, P_LOCAL, &sDefault.bDosFiletimes, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("dos filetime resolution"), P_BOOL, P_LOCAL, &sDefault.bDosFiletimeResolution, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - - {N_("fake directory create times"), P_BOOL, P_LOCAL, &sDefault.bFakeDirCreateTimes, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {N_("panic action"), P_STRING, P_GLOBAL, &Globals.szPanicAction, NULL, NULL, 0}, - {N_("hide local users"), P_BOOL, P_GLOBAL, &Globals.bHideLocalUsers, NULL, + {"preexec close", P_BOOL, P_LOCAL, &sDefault.bPreexecClose, NULL, NULL, FLAG_SHARE}, + {"postexec", P_STRING, P_LOCAL, &sDefault.szPostExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, + {"root preexec", P_STRING, P_LOCAL, &sDefault.szRootPreExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, + {"root preexec close", P_BOOL, P_LOCAL, &sDefault.bRootpreexecClose, NULL, NULL, FLAG_SHARE}, + {"root postexec", P_STRING, P_LOCAL, &sDefault.szRootPostExec, NULL, NULL, FLAG_SHARE | FLAG_PRINT}, + {"available", P_BOOL, P_LOCAL, &sDefault.bAvailable, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT}, + {"volume", P_STRING, P_LOCAL, &sDefault.volume, NULL, NULL, FLAG_SHARE }, + {"fstype", P_STRING, P_LOCAL, &sDefault.fstype, NULL, NULL, FLAG_SHARE}, + {"set directory", P_BOOLREV, P_LOCAL, &sDefault.bNo_set_dir, NULL, NULL, FLAG_SHARE}, + {"source environment", P_STRING, P_GLOBAL, &Globals.szSourceEnv, handle_source_env, NULL, 0}, + {"wide links", P_BOOL, P_LOCAL, &sDefault.bWidelinks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"follow symlinks", P_BOOL, P_LOCAL, &sDefault.bSymlinks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"dont descend", P_STRING, P_LOCAL, &sDefault.szDontdescend, NULL, NULL, FLAG_SHARE}, + {"magic script", P_STRING, P_LOCAL, &sDefault.szMagicScript, NULL, NULL, FLAG_SHARE}, + {"magic output", P_STRING, P_LOCAL, &sDefault.szMagicOutput, NULL, NULL, FLAG_SHARE}, + {"delete readonly", P_BOOL, P_LOCAL, &sDefault.bDeleteReadonly, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"dos filemode", P_BOOL, P_LOCAL, &sDefault.bDosFilemode, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"dos filetimes", P_BOOL, P_LOCAL, &sDefault.bDosFiletimes, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"dos filetime resolution", P_BOOL, P_LOCAL, &sDefault.bDosFiletimeResolution, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + + {"fake directory create times", P_BOOL, P_LOCAL, &sDefault.bFakeDirCreateTimes, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"panic action", P_STRING, P_GLOBAL, &Globals.szPanicAction, NULL, NULL, 0}, + {"hide local users", P_BOOL, P_GLOBAL, &Globals.bHideLocalUsers, NULL, NULL, 0}, - {N_("VFS options"), P_SEP, P_SEPARATOR}, + {"VFS options", P_SEP, P_SEPARATOR}, - {N_("vfs object"), P_STRING, P_LOCAL, &sDefault.szVfsObjectFile, handle_vfs_object, NULL, FLAG_SHARE}, - {N_("vfs options"), P_STRING, P_LOCAL, &sDefault.szVfsOptions, NULL, NULL, FLAG_SHARE}, + {"vfs object", P_STRING, P_LOCAL, &sDefault.szVfsObjectFile, handle_vfs_object, NULL, FLAG_SHARE}, + {"vfs options", P_STRING, P_LOCAL, &sDefault.szVfsOptions, NULL, NULL, FLAG_SHARE}, - {N_("msdfs root"), P_BOOL, P_LOCAL, &sDefault.bMSDfsRoot, NULL, NULL, FLAG_SHARE}, - {N_("host msdfs"), P_BOOL, P_GLOBAL, &Globals.bHostMSDfs, NULL, NULL, 0}, - - {N_("Winbind options"), P_SEP, P_SEPARATOR}, - - {N_("winbind uid"), P_STRING, P_GLOBAL, &Globals.szWinbindUID, handle_winbind_id, NULL, 0}, - {N_("winbind gid"), P_STRING, P_GLOBAL, &Globals.szWinbindGID, handle_winbind_id, NULL, 0}, - {N_("template homedir"), P_STRING, P_GLOBAL, &Globals.szTemplateHomedir, NULL, NULL, 0}, - {N_("template shell"), P_STRING, P_GLOBAL, &Globals.szTemplateShell, NULL, NULL, 0}, - {N_("winbind separator"), P_STRING, P_GLOBAL, &Globals.szWinbindSeparator, NULL, NULL, 0}, - {N_("winbind cache time"), P_INTEGER, P_GLOBAL, &Globals.winbind_cache_time, NULL, NULL, 0}, - {N_("winbind enum users"), P_BOOL, P_GLOBAL, &Globals.bWinbindEnumUsers, NULL, NULL, 0}, - {N_("winbind enum groups"), P_BOOL, P_GLOBAL, &Globals.bWinbindEnumGroups, NULL, NULL, 0}, + {"msdfs root", P_BOOL, P_LOCAL, &sDefault.bMSDfsRoot, NULL, NULL, FLAG_SHARE}, + {"host msdfs", P_BOOL, P_GLOBAL, &Globals.bHostMSDfs, NULL, NULL, 0}, + + {"Winbind options", P_SEP, P_SEPARATOR}, + + {"winbind uid", P_STRING, P_GLOBAL, &Globals.szWinbindUID, handle_winbind_id, NULL, 0}, + {"winbind gid", P_STRING, P_GLOBAL, &Globals.szWinbindGID, handle_winbind_id, NULL, 0}, + {"template homedir", P_STRING, P_GLOBAL, &Globals.szTemplateHomedir, NULL, NULL, 0}, + {"template shell", P_STRING, P_GLOBAL, &Globals.szTemplateShell, NULL, NULL, 0}, + {"winbind separator", P_STRING, P_GLOBAL, &Globals.szWinbindSeparator, NULL, NULL, 0}, + {"winbind cache time", P_INTEGER, P_GLOBAL, &Globals.winbind_cache_time, NULL, NULL, 0}, + {"winbind enum users", P_BOOL, P_GLOBAL, &Globals.bWinbindEnumUsers, NULL, NULL, 0}, + {"winbind enum groups", P_BOOL, P_GLOBAL, &Globals.bWinbindEnumGroups, NULL, NULL, 0}, {NULL, P_BOOL, P_NONE, NULL, NULL, NULL, 0} }; diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c index f67a7175bf..8fcfab00ab 100644 --- a/source3/rpc_client/cli_netlogon.c +++ b/source3/rpc_client/cli_netlogon.c @@ -23,10 +23,6 @@ */ -#ifdef SYSLOG -#undef SYSLOG -#endif - #include "includes.h" extern pstring global_myname; diff --git a/source3/rpc_client/cli_reg.c b/source3/rpc_client/cli_reg.c index 229b82db52..cc433ab566 100644 --- a/source3/rpc_client/cli_reg.c +++ b/source3/rpc_client/cli_reg.c @@ -23,10 +23,6 @@ */ -#ifdef SYSLOG -#undef SYSLOG -#endif - #include "includes.h" /**************************************************************************** diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index fc15556924..ff8a3a3a67 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -21,10 +21,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef SYSLOG -#undef SYSLOG -#endif - #include "includes.h" /**************************************************************************** diff --git a/source3/rpc_client/cli_srvsvc.c b/source3/rpc_client/cli_srvsvc.c index cb3a784d07..50f2eeb158 100644 --- a/source3/rpc_client/cli_srvsvc.c +++ b/source3/rpc_client/cli_srvsvc.c @@ -22,10 +22,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef SYSLOG -#undef SYSLOG -#endif - #include "includes.h" /**************************************************************************** diff --git a/source3/rpc_client/cli_wkssvc.c b/source3/rpc_client/cli_wkssvc.c index 6b2a72515c..745542e651 100644 --- a/source3/rpc_client/cli_wkssvc.c +++ b/source3/rpc_client/cli_wkssvc.c @@ -22,10 +22,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef SYSLOG -#undef SYSLOG -#endif - #include "includes.h" /**************************************************************************** diff --git a/source3/rpc_client/ntclienttrust.c b/source3/rpc_client/ntclienttrust.c index d17eeeb952..9518c6a485 100644 --- a/source3/rpc_client/ntclienttrust.c +++ b/source3/rpc_client/ntclienttrust.c @@ -20,10 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef SYSLOG -#undef SYSLOG -#endif - #include "includes.h" diff --git a/source3/rpcclient/cmd_wkssvc.c b/source3/rpcclient/cmd_wkssvc.c index 6801f17c00..52c110dbd5 100644 --- a/source3/rpcclient/cmd_wkssvc.c +++ b/source3/rpcclient/cmd_wkssvc.c @@ -20,12 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - - -#ifdef SYSLOG -#undef SYSLOG -#endif - #include "includes.h" #define DEBUG_TESTING diff --git a/source3/torture/rpctorture.c b/source3/torture/rpctorture.c index 24b2fd9dc3..b61bfb639e 100644 --- a/source3/torture/rpctorture.c +++ b/source3/torture/rpctorture.c @@ -19,10 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef SYSLOG -#undef SYSLOG -#endif - #include "includes.h" #ifndef REGISTER diff --git a/source3/web/cgi.c b/source3/web/cgi.c index caba28396f..e1b26d99b4 100644 --- a/source3/web/cgi.c +++ b/source3/web/cgi.c @@ -20,7 +20,6 @@ #include "includes.h" #include "smb.h" -#include "webintl.h" #define MAX_VARIABLES 10000 @@ -138,7 +137,7 @@ void cgi_load_variables(void) #ifdef DEBUG_COMMENTS char dummy[100]=""; print_title(dummy); - printf("<!== Start dump in cgi_load_variables() %s ==>\n",__FILE__); + d_printf("<!== Start dump in cgi_load_variables() %s ==>\n",__FILE__); #endif if (!content_length) { @@ -270,7 +269,7 @@ static void cgi_setup_error(char *err, char *header, char *info) } } - printf("HTTP/1.0 %s\r\n%sConnection: close\r\nContent-Type: text/html\r\n\r\n<HTML><HEAD><TITLE>%s</TITLE></HEAD><BODY><H1>%s</H1>%s<p></BODY></HTML>\r\n\r\n", err, header, err, err, info); + d_printf("HTTP/1.0 %s\r\n%sConnection: close\r\nContent-Type: text/html\r\n\r\n<HTML><HEAD><TITLE>%s</TITLE></HEAD><BODY><H1>%s</H1>%s<p></BODY></HTML>\r\n\r\n", err, header, err, err, info); fclose(stdin); fclose(stdout); exit(0); @@ -448,9 +447,7 @@ static void cgi_download(char *file) char buf[1024]; int fd, l, i; char *p; -#if I18N_SWAT - int nLangDesc; -#endif + char *lang; /* sanitise the filename */ for (i=0;file[i];i++) { @@ -464,11 +461,8 @@ static void cgi_download(char *file) cgi_setup_error("404 File Not Found","", "The requested file was not found"); } -#if I18N_SWAT - fd = sys_open(ln_get_pref_file(file, &st, &nLangDesc),O_RDONLY,0); -#else - fd = sys_open(file,O_RDONLY,0); -#endif + + fd = web_open(file,O_RDONLY,0); if (fd == -1) { cgi_setup_error("404 File Not Found","", "The requested file was not found"); @@ -486,10 +480,12 @@ static void cgi_download(char *file) } } printf("Expires: %s\r\n", http_timestring(time(NULL)+EXPIRY_TIME)); -#if I18N_SWAT - if(ln_get_lang(nLangDesc)) - printf("Content-Language: %s\r\n", ln_get_lang(nLangDesc)); -#endif + + lang = lang_tdb_current(); + if (lang) { + printf("Content-Language: %s\r\n", lang); + } + printf("Content-Length: %d\r\n\r\n", (int)st.st_size); while ((l=read(fd,buf,sizeof(buf)))>0) { fwrite(buf, 1, l, stdout); @@ -511,6 +507,7 @@ void cgi_setup(char *rootdir, int auth_required) char line[1024]; char *url=NULL; char *p; + char *lang; if (chdir(rootdir)) { cgi_setup_error("400 Server Error", "", @@ -520,10 +517,10 @@ void cgi_setup(char *rootdir, int auth_required) /* Handle the possability we might be running as non-root */ sec_init(); -#if I18N_SWAT - if(getenv("HTTP_ACCEPT_LANGUAGE")) /* if running as a cgi program */ - ln_negotiate_language(getenv("HTTP_ACCEPT_LANGUAGE")); -#endif + if ((lang=getenv("HTTP_ACCEPT_LANGUAGE"))) { + /* if running as a cgi program */ + web_set_lang(lang); + } /* maybe we are running under a web server */ if (getenv("CONTENT_LENGTH") || getenv("REQUEST_METHOD")) { @@ -559,10 +556,8 @@ void cgi_setup(char *rootdir, int auth_required) authenticated = cgi_handle_authorization(&line[15]); } else if (strncasecmp(line,"Content-Length: ", 16)==0) { content_length = atoi(&line[16]); -#if I18N_SWAT } else if (strncasecmp(line,"Accept-Language: ", 17)==0) { - ln_negotiate_language(&line[17]); -#endif + web_set_lang(&line[17]); } /* ignore all other requests! */ } diff --git a/source3/web/neg_lang.c b/source3/web/neg_lang.c index 32f52aa473..8a5b60d99f 100644 --- a/source3/web/neg_lang.c +++ b/source3/web/neg_lang.c @@ -1,7 +1,7 @@ /* Unix SMB/Netbios implementation. - Version 1.9. - Samba Web Administration Tool + Version 3.0 + SWAT language handling 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 @@ -21,251 +21,47 @@ */ #include "includes.h" -/* #include "config.h" */ -#include "webintl.h" -#if I18N_SWAT -/* constants. */ -/* it is ok to make them bigger.*/ -#define LN_PREFLANG_MAX 10 -#define LN_LNAME_LENGTH 8+1+8 - -#define LN_DEFAULT_LANG I18N_DEFAULT_LANG -#define LN_LANGDESC_DEFAULT -1 -#define LN_NO_AVAILABLE_LANG -1 - -/* ****************************************************************** - * macros for debugging. - ***************************************************************** */ -#ifdef LN_R_NODEBUG - -#else /* - *#define LN_DEBUG_LOG "/tmp/lndebug.log" - *void ln_debug_error(const char *info, int nLine) - *{ - * FILE* fp; - * fp = sys_fopen(LN_DEBUG_LOG, "a"); - * fprintf(fp, "%s at %d.\n", info, nLine); - * fclose(fp); - *} - *void rassert_help(BOOL b, int l) - *{ - * if(!b) - * { - * ln_debug_error("language negotiation error.", l); - * exit(1); - * } - *} - */ -#endif /* LN_R_NODEBUG */ - -/* **************************************************************** - LNNegotiator struct. It contains... - [aPrefLang] - the array of strings. each string is the name of - languages ("ja", "ko"...), given by web browser. - [nPrefLang] - the number of the languages in aPrefLang. - [lOriginalLang] - == "en": indicates what language the default(original) files - are written with. -**************************************************************** */ -typedef char lnstring[LN_LNAME_LENGTH + 1]; -#define lnstrcpy(d,s) safe_strcpy((d),(s),sizeof(lnstring)-1) - -typedef struct tagLNNegotiator -{ - lnstring aPrefLang[LN_PREFLANG_MAX]; - int nPrefLang; - lnstring lOriginalLang; -}LNNegotiator; - -/* ************************************************************** - * some access functions & macros for LNNegotiator struct. - * ************************************************************ */ -#define ln_getPreflangCount(pLn) ((pLn)->nPrefLang) -#define ln_getOriginalLang(pLn) ((pLn)->lOriginalLang) -#define ln_getDefaultPrefLang(pLn) ((pLn)->lDefaultPrefLang) - -/* make it inline-expanded (or macro) to get better performance */ -static const char* ln_getPreflang(LNNegotiator* pLn, int i) -{ - rassert(i == LN_LANGDESC_DEFAULT - || (0 <= i && i < ln_getPreflangCount(pLn))); - - if(i == LN_LANGDESC_DEFAULT) - return NULL; - if(0 <= i && i < ln_getPreflangCount(pLn)) - return pLn->aPrefLang[i]; - return NULL; -} -/* initialize structures */ -static void ln_resetln(LNNegotiator* pLn) -{ - pLn->nPrefLang = 0; - /* using fixed memory.*/ -} -static BOOL ln_addPreflang(LNNegotiator* pLn, const char* pLang) -{ - int nPref = ln_getPreflangCount(pLn); - - if(nPref >= LN_PREFLANG_MAX) - return False; - - lnstrcpy(pLn->aPrefLang[nPref], pLang); - (pLn->nPrefLang)++; - return True; -} -static void ln_initln_help(LNNegotiator* pLn) -{ - ln_resetln(pLn); - lnstrcpy(pLn->lOriginalLang, I18N_ORIGINAL_LANG); - /* I18N_ORIGINAL_LANG = "en" is hardcoded in - webintl.h. */ - if (I18N_DEFAULT_PREF_LANG[0] != '\0') - ln_addPreflang(pLn, I18N_DEFAULT_PREF_LANG); - - /* this entry is used only when web browser didn't send - ACCEPT-LANGUAGE header. */ -} -/* **************************************************************** - * store acceptable languages into LNNegotiator object. - * [pstrLangarray] The arguments of "accept-language" http header, - * which is like "en-GB, es;q=0.5, ja". "q=0.5" is called quality value, - * but it is ignored now. wiled card "*" is also ignored. - ***************************************************************** */ -static BOOL ln_negotiate_language_help( LNNegotiator* pLn, const char* pstrLangarray ) + during a file download we first check to see if there is a language + specific file available. If there is then use that, otherwise + just open the specified file +*/ +int web_open(const char *fname, int flags, mode_t mode) { - char* pToken; - const char* pDelim = " \n\r\t,;"; - pstring strBuffer; - - rassert(pstrLangarray); - rassert(pLn); - - ln_resetln(pLn); - pstrcpy(strBuffer, pstrLangarray); - pToken = strtok(strBuffer, pDelim); - while(pToken != NULL) - { - if(strncmp(pToken, "q=", strlen("q=")) == 0) - { - pToken = strtok(NULL, pDelim); - continue; + char *p = NULL; + char *lang = lang_tdb_current(); + int fd; + if (lang) { + asprintf(&p, "lang/%s/%s", lang, fname); + if (p) { + fd = sys_open(p, flags, mode); + free(p); + if (fd != -1) { + return fd; + } } - if(!ln_addPreflang(pLn, pToken)) - break; - pToken = strtok(NULL, pDelim); } - rassert(ln_getPreflangCount(pLn) != 0); - return (ln_getPreflangCount(pLn) != 0); -} - -/* ************************************************************** - initialize gettext. Before this, cgi_setup() should be done. - cgi_setup() calls ln_negotiate_language() if the user specifies - languages in web browser. Then, ln_set_pref_language() will work. - ************************************************************* */ -static BOOL ln_init_lang_env_help(LNNegotiator* pLn) -{ -#if I18N_GETTEXT - int nLang; - nLang = ln_set_pref_language(pLn); - rstrace(getenv("LANGUAGE")); -#endif /* I18N_GETTEXT */ - return True; + /* fall through to default name */ + return sys_open(fname, flags, mode); } -/* ***************************************************************** - * This function searches for the "PrefLang" version of pFile. - * if not available, returns pFile. - * [pFile] the filename. - * [pst] the address of a struct. it will be filled with the information - * of the file. - * [pLangDesc] The address of an integer. a value which indicates the - * language of the returned value is written to the address. the value - * is used in ln_get_lang(). - * [return value] address of the name of the language version of the file. - * It is static object so it will be destroyed at the time ln_get_pref_file() - * is called. - **************************************************************** */ -static void ln_make_filename( pstring afname, const char* pFile, const char* pAdd ) -{ -#if LANG_PREFIX - /* LANG_PREFIX is already undefined, maybe removed soon */ - /* maybe, foo.html.ja */ - pstrcpy(afname, pFile); - pstrcat(afname, "."); - pstrcat(afname, pAdd); -#else - /* maybe, lang/ja/foo.html */ - pstrcpy(afname, "lang/"); - pstrcat(afname, pAdd); - pstrcat(afname, "/"); - pstrcat(afname, pFile); -#endif -} -static const char* ln_get_pref_file_help( - LNNegotiator* pLn, const char* pFile, - SMB_STRUCT_STAT* pst, int* pLangDesc) -{ - static pstring afname; - int i; - for(i = 0; i < ln_getPreflangCount(pLn); i++) - { - if(strcmp(ln_getPreflang(pLn, i), ln_getOriginalLang(pLn)) - == 0) - break; - ln_make_filename(afname, pFile, ln_getPreflang(pLn, i)); - if(file_exist(afname, pst)) - { - *pLangDesc = i; - return afname; - } - } - pstrcpy(afname, pFile); - file_exist(afname, pst); - *pLangDesc = LN_LANGDESC_DEFAULT; - return afname; -} -/* ******************************************************************* - * file scope variables. this variable is not locked. - * (not multithread-safe) - ******************************************************************** */ -static LNNegotiator lnLanguagenegotiator; -/* ******************************************************************* - * interfaces to the outside of this file. - ******************************************************************** */ -void ln_initln(void) -{ - ln_initln_help(&lnLanguagenegotiator); -} -BOOL ln_init_lang_env(void) -{ - return ln_init_lang_env_help(&lnLanguagenegotiator); -} -const char* ln_get_lang(int nLangDesc) -{ - return ln_getPreflang(&lnLanguagenegotiator, nLangDesc); -} -const char* ln_get_pref_file(const char* pFile, - SMB_STRUCT_STAT* pst, int* pLangDesc) -{ - return ln_get_pref_file_help( - &lnLanguagenegotiator, pFile, pst, pLangDesc); -} -BOOL ln_negotiate_language(const char* pstrLangarray) -{ - return ln_negotiate_language_help( - &lnLanguagenegotiator, pstrLangarray); -} -const char* ln_get_pref_file_n_o(const char* pFile) +/* + choose from a list of languages. The list can be comma or space + separated + Keep choosing until we get a hit +*/ +void web_set_lang(const char *lang_list) { - SMB_STRUCT_STAT st; - int nLangDesc; - return ln_get_pref_file(pFile, &st, &nLangDesc); + fstring lang; + char *p = (char *)lang_list; + + while (next_token(&p, lang, ", \t\r\n", sizeof(lang))) { + if (lang_tdb_init(lang)) return; + } + + /* it's not an error to not initialise - we just fall back to + the default */ } -#endif /* I18N_SWAT */ diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c index b49fc7b656..6af7674dc9 100644 --- a/source3/web/statuspage.c +++ b/source3/web/statuspage.c @@ -20,7 +20,6 @@ */ #include "includes.h" -#include "webintl.h" #define PIDMAP struct PidMap @@ -40,7 +39,7 @@ static void initPid2Machine (void) { /* show machine name rather PID on table "Open Files"? */ if (PID_or_Machine) { - PIDMAP *p, *q; + PIDMAP *p; for (p = pidmap; p != NULL; ) { DLIST_REMOVE(pidmap, p); @@ -105,41 +104,41 @@ static char *tstring(time_t t) static void print_share_mode(share_mode_entry *e, char *fname) { - printf("<tr><td>%s</td>",_(mapPid2Machine(e->pid))); - printf("<td>"); + d_printf("<tr><td>%s</td>",_(mapPid2Machine(e->pid))); + d_printf("<td>"); switch ((e->share_mode>>4)&0xF) { - case DENY_NONE: printf(_("DENY_NONE")); break; - case DENY_ALL: printf(_("DENY_ALL ")); break; - case DENY_DOS: printf(_("DENY_DOS ")); break; - case DENY_READ: printf(_("DENY_READ ")); break; - case DENY_WRITE:printf(_("DENY_WRITE ")); break; + case DENY_NONE: d_printf("DENY_NONE"); break; + case DENY_ALL: d_printf("DENY_ALL "); break; + case DENY_DOS: d_printf("DENY_DOS "); break; + case DENY_READ: d_printf("DENY_READ "); break; + case DENY_WRITE:d_printf("DENY_WRITE "); break; } - printf("</td>"); + d_printf("</td>"); - printf("<td>"); + d_printf("<td>"); switch (e->share_mode&0xF) { - case 0: printf(_("RDONLY ")); break; - case 1: printf(_("WRONLY ")); break; - case 2: printf(_("RDWR ")); break; + case 0: d_printf("RDONLY "); break; + case 1: d_printf("WRONLY "); break; + case 2: d_printf("RDWR "); break; } - printf("</td>"); + d_printf("</td>"); - printf("<td>"); + d_printf("<td>"); if((e->op_type & (EXCLUSIVE_OPLOCK|BATCH_OPLOCK)) == (EXCLUSIVE_OPLOCK|BATCH_OPLOCK)) - printf(_("EXCLUSIVE+BATCH ")); + d_printf("EXCLUSIVE+BATCH "); else if (e->op_type & EXCLUSIVE_OPLOCK) - printf(_("EXCLUSIVE ")); + d_printf("EXCLUSIVE "); else if (e->op_type & BATCH_OPLOCK) - printf(_("BATCH ")); + d_printf("BATCH "); else if (e->op_type & LEVEL_II_OPLOCK) - printf(_("LEVEL_II ")); + d_printf("LEVEL_II "); else - printf(_("NONE ")); - printf("</td>"); + d_printf("NONE "); + d_printf("</td>"); - printf("<td>%s</td><td>%s</td></tr>\n", + d_printf("<td>%s</td><td>%s</td></tr>\n", fname,tstring(e->time.tv_sec)); } @@ -179,15 +178,15 @@ static int traverse_fn2(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void* st addPid2Machine (crec.pid, crec.machine); - printf("<tr><td>%d</td><td>%s</td><td>%s</td><td>%s</td>\n", + d_printf("<tr><td>%d</td><td>%s</td><td>%s</td><td>%s</td>\n", (int)crec.pid, crec.machine,crec.addr, tstring(crec.start)); if (geteuid() == 0) { - printf("<td><input type=submit value=\"X\" name=\"kill_%d\"></td>\n", + d_printf("<td><input type=submit value=\"X\" name=\"kill_%d\"></td>\n", (int)crec.pid); } - printf("</tr>\n"); + d_printf("</tr>\n"); return 0; } @@ -205,7 +204,7 @@ static int traverse_fn3(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void* st if (crec.cnum == -1 || !process_exists(crec.pid)) return 0; - printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%d</td><td>%s</td><td>%s</td></tr>\n", + d_printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%d</td><td>%s</td><td>%s</td></tr>\n", crec.name,uidtoname(crec.uid), gidtoname(crec.gid),(int)crec.pid, crec.machine, @@ -270,22 +269,22 @@ void status_page(void) initPid2Machine (); - printf("<H2>%s</H2>\n", _("Server Status")); + d_printf("<H2>%s</H2>\n", _("Server Status")); - printf("<FORM method=post>\n"); + d_printf("<FORM method=post>\n"); if (!autorefresh) { - printf("<input type=submit value=\"%s\" name=autorefresh>\n", _("Auto Refresh")); - printf("<br>%s", _("Refresh Interval: ")); - printf("<input type=text size=2 name=\"refresh_interval\" value=%d>\n", + d_printf("<input type=submit value=\"%s\" name=autorefresh>\n", _("Auto Refresh")); + d_printf("<br>%s", _("Refresh Interval: ")); + d_printf("<input type=text size=2 name=\"refresh_interval\" value=%d>\n", refresh_interval); } else { - printf("<input type=submit value=\"%s\" name=norefresh>\n", _("Stop Refreshing")); - printf("<br>%s%d\n", _("Refresh Interval: "), refresh_interval); - printf("<input type=hidden name=refresh value=1>\n"); + d_printf("<input type=submit value=\"%s\" name=norefresh>\n", _("Stop Refreshing")); + d_printf("<br>%s%d\n", _("Refresh Interval: "), refresh_interval); + d_printf("<input type=hidden name=refresh value=1>\n"); } - printf("<p>\n"); + d_printf("<p>\n"); if (!tdb) { /* open failure either means no connections have been @@ -293,83 +292,83 @@ void status_page(void) } - printf("<table>\n"); + d_printf("<table>\n"); - printf("<tr><td>%s</td><td>%s</td></tr>", _("version:"), VERSION); + d_printf("<tr><td>%s</td><td>%s</td></tr>", _("version:"), VERSION); fflush(stdout); - printf("<tr><td>%s</td><td>%s</td>\n", _("smbd:"), smbd_running()?_("running"):_("not running")); + d_printf("<tr><td>%s</td><td>%s</td>\n", _("smbd:"), smbd_running()?_("running"):_("not running")); if (geteuid() == 0) { if (smbd_running()) { - printf("<td><input type=submit name=\"smbd_stop\" value=\"%s\"></td>\n", _("Stop smbd")); + d_printf("<td><input type=submit name=\"smbd_stop\" value=\"%s\"></td>\n", _("Stop smbd")); } else { - printf("<td><input type=submit name=\"smbd_start\" value=\"%s\"></td>\n", _("Start smbd")); + d_printf("<td><input type=submit name=\"smbd_start\" value=\"%s\"></td>\n", _("Start smbd")); } - printf("<td><input type=submit name=\"smbd_restart\" value=\"%s\"></td>\n", _("Restart smbd")); + d_printf("<td><input type=submit name=\"smbd_restart\" value=\"%s\"></td>\n", _("Restart smbd")); } - printf("</tr>\n"); + d_printf("</tr>\n"); fflush(stdout); - printf("<tr><td>%s</td><td>%s</td>\n", _("nmbd:"), nmbd_running()?_("running"):_("not running")); + d_printf("<tr><td>%s</td><td>%s</td>\n", _("nmbd:"), nmbd_running()?_("running"):_("not running")); if (geteuid() == 0) { if (nmbd_running()) { - printf("<td><input type=submit name=\"nmbd_stop\" value=\"%s\"></td>\n", _("Stop nmbd")); + d_printf("<td><input type=submit name=\"nmbd_stop\" value=\"%s\"></td>\n", _("Stop nmbd")); } else { - printf("<td><input type=submit name=\"nmbd_start\" value=\"%s\"></td>\n", _("Start nmbd")); + d_printf("<td><input type=submit name=\"nmbd_start\" value=\"%s\"></td>\n", _("Start nmbd")); } - printf("<td><input type=submit name=\"nmbd_restart\" value=\"%s\"></td>\n", _("Restart nmbd")); + d_printf("<td><input type=submit name=\"nmbd_restart\" value=\"%s\"></td>\n", _("Restart nmbd")); } - printf("</tr>\n"); + d_printf("</tr>\n"); - printf("</table>\n"); + d_printf("</table>\n"); fflush(stdout); - printf("<p><h3>%s</h3>\n", _("Active Connections")); - printf("<table border=1>\n"); - printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th>\n", _("PID"), _("Client"), _("IP address"), _("Date")); + d_printf("<p><h3>%s</h3>\n", _("Active Connections")); + d_printf("<table border=1>\n"); + d_printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th>\n", _("PID"), _("Client"), _("IP address"), _("Date")); if (geteuid() == 0) { - printf("<th>%s</th>\n", _("Kill")); + d_printf("<th>%s</th>\n", _("Kill")); } - printf("</tr>\n"); + d_printf("</tr>\n"); if (tdb) tdb_traverse(tdb, traverse_fn2, NULL); - printf("</table><p>\n"); + d_printf("</table><p>\n"); - printf("<p><h3>%s</h3>\n", _("Active Shares")); - printf("<table border=1>\n"); - printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n\n", + d_printf("<p><h3>%s</h3>\n", _("Active Shares")); + d_printf("<table border=1>\n"); + d_printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n\n", _("Share"), _("User"), _("Group"), _("PID"), _("Client"), _("Date")); if (tdb) tdb_traverse(tdb, traverse_fn3, NULL); - printf("</table><p>\n"); + d_printf("</table><p>\n"); - printf("<h3>%s</h3>\n", _("Open Files")); - printf("<table border=1>\n"); - printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n", _("PID"), _("Sharing"), _("R/W"), _("Oplock"), _("File"), _("Date")); + d_printf("<h3>%s</h3>\n", _("Open Files")); + d_printf("<table border=1>\n"); + d_printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n", _("PID"), _("Sharing"), _("R/W"), _("Oplock"), _("File"), _("Date")); locking_init(1); share_mode_forall(print_share_mode); locking_end(); - printf("</table>\n"); + d_printf("</table>\n"); if (tdb) tdb_close(tdb); - printf("<br><input type=submit name=\"show_client_in_col_1\" value=\"Show Client in col 1\">\n"); - printf("<input type=submit name=\"show_pid_in_col_1\" value=\"Show PID in col 1\">\n"); + d_printf("<br><input type=submit name=\"show_client_in_col_1\" value=\"Show Client in col 1\">\n"); + d_printf("<input type=submit name=\"show_pid_in_col_1\" value=\"Show PID in col 1\">\n"); - printf("</FORM>\n"); + d_printf("</FORM>\n"); if (autorefresh) { /* this little JavaScript allows for automatic refresh of the page. There are other methods but this seems to be the best alternative */ - printf("<script language=\"JavaScript\">\n"); - printf("<!--\nsetTimeout('window.location.replace(\"%s/status?refresh_interval=%d&refresh=1\")', %d)\n", + d_printf("<script language=\"JavaScript\">\n"); + d_printf("<!--\nsetTimeout('window.location.replace(\"%s/status?refresh_interval=%d&refresh=1\")', %d)\n", cgi_baseurl(), refresh_interval, refresh_interval*1000); - printf("//-->\n</script>\n"); + d_printf("//-->\n</script>\n"); } } diff --git a/source3/web/swat.c b/source3/web/swat.c index a6286dc93b..3deaafbc76 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -19,13 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef SYSLOG -#undef SYSLOG -#endif - #include "includes.h" -#include "smb.h" -#include "webintl.h" #define GLOBALS_SNUM -1 @@ -110,24 +104,22 @@ static char *make_parm_name(char *label) ****************************************************************************/ static int include_html(char *fname) { - FILE *f; + int fd; char buf[1024]; int ret; - f = sys_fopen((char*)LN_(fname), "r"); + fd = web_open(fname, O_RDONLY, 0); - if (!f) { - d_printf(_("ERROR: Can't open %s\n"), fname); + if (fd == -1) { + d_printf("ERROR: Can't open %s\n", fname); return 0; } - while (!feof(f)) { - ret = fread(buf, 1, sizeof(buf), f); - if (ret <= 0) break; - fwrite(buf, 1, ret, stdout); + while ((ret = read(fd, buf, sizeof(buf))) > 0) { + write(1, buf, ret); } - fclose(f); + close(fd); return 1; } @@ -475,7 +467,7 @@ static void commit_parameters(int snum) /**************************************************************************** spit out the html for a link with an image ****************************************************************************/ -static void image_link(char *name,char *hlink, char *src) +static void image_link(const char *name, const char *hlink, const char *src) { d_printf("<A HREF=\"%s/%s\"><img border=\"0\" src=\"/swat/%s\" alt=\"%s\"></A>\n", cgi_baseurl(), hlink, src, name); @@ -1045,6 +1037,8 @@ static void printers_page(void) /* just in case it goes wild ... */ alarm(300); + setlinebuf(stdout); + /* we don't want any SIGPIPE messages */ BlockSignals(True,SIGPIPE); @@ -1071,14 +1065,8 @@ static void printers_page(void) iNumNonAutoPrintServices = lp_numservices(); load_printers(); -#if I18N_SWAT - ln_initln(); - cgi_setup(SWATDIR, !demo_mode); - ln_init_lang_env(); -#else cgi_setup(SWATDIR, !demo_mode); -#endif print_header(); cgi_load_variables(); |