wmi-1.3.16 from opsview.com

This commit is contained in:
Are Casilla
2019-02-16 00:16:52 +01:00
parent 163fdd3d1b
commit 17b3af2911
2146 changed files with 678824 additions and 0 deletions
+100
View File
@@ -0,0 +1,100 @@
/*
Unix SMB/CIFS implementation.
Core Samba data types
Copyright (C) Andrew Tridgell 1992-2000
Copyright (C) Stefan Metzmacher 2004
Copyright (C) Jelmer Vernooij 2005
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.
*/
#ifndef _SAMBA_CORE_H
#define _SAMBA_CORE_H
#include "libcli/util/nt_status.h"
typedef bool BOOL;
#define False false
#define True true
/* used to hold an arbitrary blob of data */
typedef struct datablob {
uint8_t *data;
size_t length;
} DATA_BLOB;
struct data_blob_list_item {
struct data_blob_list_item *prev,*next;
DATA_BLOB blob;
};
/* by making struct ldb_val and DATA_BLOB the same, we can simplify
a fair bit of code */
#define ldb_val datablob
/* 64 bit time (100 nanosec) 1601 - cifs6.txt, section 3.5, page 30, 4 byte aligned */
typedef uint64_t NTTIME;
/*
we use struct ipv4_addr to avoid having to include all the
system networking headers everywhere
*/
struct ipv4_addr {
uint32_t addr;
};
typedef NTSTATUS (*init_module_fn) (void);
/*
use the same structure for dom_sid2 as dom_sid. A dom_sid2 is really
just a dom sid, but with the sub_auths represented as a conformant
array. As with all in-structure conformant arrays, the array length
is placed before the start of the structure. That's what gives rise
to the extra num_auths elemenent. We don't want the Samba code to
have to bother with such esoteric NDR details, so its easier to just
define it as a dom_sid and use pidl magic to make it all work. It
just means you need to mark a sid as a "dom_sid2" in the IDL when you
know it is of the conformant array variety
*/
#define dom_sid2 dom_sid
/* same struct as dom_sid but inside a 28 bytes fixed buffer in NDR */
#define dom_sid28 dom_sid
/* protocol types. It assumes that higher protocols include lower protocols
as subsets. FIXME: Move to one of the smb-specific headers */
enum protocol_types {
PROTOCOL_NONE,
PROTOCOL_CORE,
PROTOCOL_COREPLUS,
PROTOCOL_LANMAN1,
PROTOCOL_LANMAN2,
PROTOCOL_NT1,
PROTOCOL_SMB2
};
/* passed to br lock code. FIXME: Move to one of the smb-specific headers */
enum brl_type {
READ_LOCK,
WRITE_LOCK,
PENDING_READ_LOCK,
PENDING_WRITE_LOCK
};
#endif /* _SAMBA_CORE_H */
+101
View File
@@ -0,0 +1,101 @@
#ifndef _INCLUDES_H
#define _INCLUDES_H
/*
Unix SMB/CIFS implementation.
Machine customisation and include handling
Copyright (C) Andrew Tridgell 1994-1998
Copyright (C) 2002 by Martin Pool <mbp@samba.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "lib/replace/replace.h"
/* make sure we have included the correct config.h */
#ifndef NO_CONFIG_H /* for some tests */
#ifndef CONFIG_H_IS_FROM_SAMBA
#error "make sure you have removed all config.h files from standalone builds!"
#error "the included config.h isn't from samba!"
#endif
#endif /* NO_CONFIG_H */
#include "local.h"
#ifdef __GNUC__
/** gcc attribute used on function parameters so that it does not emit
* warnings about them being unused. **/
# define UNUSED(param) param __attribute__ ((unused))
#else
# define UNUSED(param) param
/** Feel free to add definitions for other compilers here. */
#endif
#ifndef _PUBLIC_
#ifdef HAVE_VISIBILITY_ATTR
# define _PUBLIC_ __attribute__((visibility("default")))
#else
# define _PUBLIC_
#endif
#endif
#ifndef PRINTF_ATTRIBUTE
#if __GNUC__ >= 3
/** Use gcc attribute to check printf fns. a1 is the 1-based index of
* the parameter containing the format, and a2 the index of the first
* argument. Note that some gcc 2.x versions don't handle this
* properly **/
#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
#else
#define PRINTF_ATTRIBUTE(a1, a2)
#endif
#endif
#ifndef NORETURN_ATTRIBUTE
#if (__GNUC__ >= 3)
#define NORETURN_ATTRIBUTE __attribute__ ((noreturn))
#else
#define NORETURN_ATTRIBUTE
#endif
#endif
/* mark smb_panic() as noreturn, so static analysers know that it is
used like abort */
_PUBLIC_ void smb_panic(const char *why) NORETURN_ATTRIBUTE;
#include "system/time.h"
#include "system/wait.h"
#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
/* Lists, trees, caching, database... */
#include "talloc/talloc.h"
#include "core.h"
#include "charset/charset.h"
#include "util/util.h"
#include "param/param.h"
#include "librpc/gen_ndr/misc.h"
struct smbcli_tree;
#include "libcli/util/error.h"
/* String routines */
#include "util/safe_string.h"
#if 0
/* darn, we can't do this now that we don't link the ldb tools to all the smb libs */
#define TALLOC_ABORT(reason) smb_panic(reason)
#endif
#endif /* _INCLUDES_H */
+60
View File
@@ -0,0 +1,60 @@
/* Copyright (C) 1995-1998 Samba-Team */
/* Copyright (C) 1998 John H Terpstra <jht@aquasoft.com.au> */
/* local definitions for file server */
#ifndef _LOCAL_H
#define _LOCAL_H
/* The default workgroup - usually overridden in smb.conf */
#ifndef DEFAULT_WORKGROUP
#define DEFAULT_WORKGROUP "WORKGROUP"
#endif
/* the maximum debug level to compile into the code. This assumes a good
optimising compiler that can remove unused code
for embedded or low-memory systems set this to a value like 2 to get
only important messages. This gives *much* smaller binaries
*/
#ifndef MAX_DEBUG_LEVEL
#define MAX_DEBUG_LEVEL 1000
#endif
/* This defines the section name in the configuration file that will contain */
/* global parameters - that is, parameters relating to the whole server, not */
/* just services. This name is then reserved, and may not be used as a */
/* a service name. It will default to "global" if not defined here. */
#define GLOBAL_NAME "global"
#define GLOBAL_NAME2 "globals"
/* define what facility to use for syslog */
#ifndef SYSLOG_FACILITY
#define SYSLOG_FACILITY LOG_DAEMON
#endif
/* separators for lists */
#define LIST_SEP " \t,\n\r"
/* what default type of filesystem do we want this to show up as in a
NT file manager window? */
#define FSTYPE_STRING "NTFS"
/* user to test password server with as invalid in security=server mode. */
#ifndef INVALID_USER_PREFIX
#define INVALID_USER_PREFIX "sambatest"
#endif
/* the default pager to use for the client "more" command. Users can
override this with the PAGER environment variable */
#ifndef PAGER
#define PAGER "more"
#endif
/*
* Default passwd chat script.
*/
#define DEFAULT_PASSWD_CHAT "*new*password* %n\\n *new*password* %n\\n *changed*"
/* Max number of jobs per print queue. */
#define PRINT_MAX_JOBID 10000
#endif
+42
View File
@@ -0,0 +1,42 @@
/*
samba -- Unix SMB/CIFS implementation.
ugly string types from Samba3. Will be removed
with glee when we finally don't use them.
Copyright (C) Andrew Tridgell 1992-2000
Copyright (C) John H Terpstra 1996-2000
Copyright (C) Luke Kenneth Casson Leighton 1996-2000
Copyright (C) Paul Ashton 1998-2000
Copyright (C) Martin Pool 2002
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.
*/
#ifndef _PSTRING
#define _PSTRING
#define PSTRING_LEN 1024
#define FSTRING_LEN 256
typedef char pstring[PSTRING_LEN];
typedef char fstring[FSTRING_LEN];
#define pstrcpy(d,s) safe_strcpy((d), (s),sizeof(pstring)-1)
#define pstrcat(d,s) safe_strcat((d), (s),sizeof(pstring)-1)
#define fstrcpy(d,s) safe_strcpy((d),(s),sizeof(fstring)-1)
#define fstrcat(d,s) safe_strcat((d),(s),sizeof(fstring)-1)
#endif