mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
r3494: got rid of include/rewrite.h, and split out the dynconfig.h header
This commit is contained in:
parent
4aed1b7921
commit
558de54ec6
@ -22,6 +22,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "client.h"
|
||||
#include "lib/cmdline/popt_common.h"
|
||||
#include "librpc/gen_ndr/ndr_srvsvc.h"
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "librpc/gen_ndr/ndr_epmapper.h"
|
||||
#include "gtk/common/select.h"
|
||||
#include "gtk/common/gtk-smb.h"
|
||||
@ -322,9 +323,9 @@ static GtkWidget* create_mainwindow (void)
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
gtk_init(&argc, &argv);
|
||||
lp_load(dyn_CONFIGFILE,True,False,False);
|
||||
load_interfaces();
|
||||
setup_logging("gepdump", True);
|
||||
lp_load(dyn_CONFIGFILE,True,False,False);
|
||||
load_interfaces();
|
||||
setup_logging("gepdump", True);
|
||||
mainwin = create_mainwindow();
|
||||
gtk_widget_show_all(mainwin);
|
||||
gtk_main();
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "registry.h"
|
||||
#include "lib/cmdline/popt_common.h"
|
||||
#include "gtk/common/select.h"
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "librpc/gen_ndr/ndr_atsvc.h"
|
||||
#include "gtk/common/select.h"
|
||||
#include "gtk/common/gtk-smb.h"
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "librpc/gen_ndr/ndr_samr.h"
|
||||
#include "gtk/common/select.h"
|
||||
#include "gtk/common/gtk-smb.h"
|
||||
|
@ -42,3 +42,16 @@ struct charset_functions {
|
||||
typedef uint32_t codepoint_t;
|
||||
|
||||
#define INVALID_CODEPOINT ((codepoint_t)-1)
|
||||
|
||||
|
||||
/* generic iconv conversion structure */
|
||||
typedef struct {
|
||||
size_t (*direct)(void *cd, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
size_t (*pull)(void *cd, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
size_t (*push)(void *cd, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
void *cd_direct, *cd_pull, *cd_push;
|
||||
} *smb_iconv_t;
|
||||
|
||||
|
@ -127,6 +127,12 @@
|
||||
#define uint64 uint64_t
|
||||
#endif
|
||||
|
||||
#define False (0)
|
||||
#define True (1)
|
||||
#define Auto (2)
|
||||
|
||||
typedef int BOOL;
|
||||
|
||||
/*
|
||||
we use struct ipv4_addr to avoid having to include all the
|
||||
system networking headers everywhere
|
||||
@ -152,11 +158,7 @@ extern char *sys_errlist[];
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
/* Our own pstrings and fstrings */
|
||||
#include "pstring.h"
|
||||
|
||||
/* Lists, trees, caching, database... */
|
||||
#include "dynconfig.h"
|
||||
#include "version.h"
|
||||
#include "xfile.h"
|
||||
#include "talloc.h"
|
||||
@ -169,7 +171,12 @@ extern int errno;
|
||||
#include "trans2.h"
|
||||
#include "nterr.h"
|
||||
#include "charset.h"
|
||||
#include "rewrite.h"
|
||||
#include "debug.h"
|
||||
#include "doserr.h"
|
||||
#include "enums.h"
|
||||
#include "pstring.h"
|
||||
#include "smb_macros.h"
|
||||
#include "rpc_secdes.h"
|
||||
#include "smb.h"
|
||||
#include "ads.h"
|
||||
#include "lib/socket/socket.h"
|
||||
|
@ -1,6 +1,8 @@
|
||||
/*
|
||||
samba -- Unix SMB/CIFS implementation.
|
||||
Safe standardized string types
|
||||
|
||||
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
|
||||
@ -23,8 +25,6 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef _PSTRING
|
||||
|
||||
#define PSTRING_LEN 1024
|
||||
#define FSTRING_LEN 256
|
||||
|
||||
@ -32,5 +32,3 @@ typedef char pstring[PSTRING_LEN];
|
||||
typedef char fstring[FSTRING_LEN];
|
||||
|
||||
#define _PSTRING
|
||||
|
||||
#endif /* ndef _PSTRING */
|
||||
|
@ -1,91 +0,0 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
SMB parameters and setup, plus a whole lot more.
|
||||
|
||||
Copyright (C) Andrew Tridgell 1992-2000
|
||||
Copyright (C) John H Terpstra 1996-2002
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-2000
|
||||
Copyright (C) Paul Ashton 1998-2000
|
||||
Copyright (C) Simo Sorce 2001-2002
|
||||
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 _REWRITE_H
|
||||
#define _REWRITE_H
|
||||
|
||||
#define False (0)
|
||||
#define True (1)
|
||||
#define Auto (2)
|
||||
|
||||
#ifndef _BOOL
|
||||
typedef int BOOL;
|
||||
#define _BOOL /* So we don't typedef BOOL again in vfs.h */
|
||||
#endif
|
||||
|
||||
/* string manipulation flags - see clistr.c and srvstr.c */
|
||||
#define STR_TERMINATE 1
|
||||
#define STR_UPPER 2
|
||||
#define STR_ASCII 4
|
||||
#define STR_UNICODE 8
|
||||
#define STR_NOALIGN 16
|
||||
#define STR_NO_RANGE_CHECK 32
|
||||
#define STR_LEN8BIT 64
|
||||
#define STR_TERMINATE_ASCII 128 /* only terminate if ascii */
|
||||
#define STR_LEN_NOTERM 256 /* the length field is the unterminated length */
|
||||
|
||||
/* Debugging stuff */
|
||||
#include "debug.h"
|
||||
#include "doserr.h"
|
||||
|
||||
#include "enums.h"
|
||||
|
||||
/*
|
||||
* Loopback command offsets.
|
||||
*/
|
||||
|
||||
#define OPBRK_CMD_LEN_OFFSET 0
|
||||
#define OPBRK_CMD_PORT_OFFSET 4
|
||||
#define OPBRK_CMD_HEADER_LEN 6
|
||||
|
||||
#define OPBRK_MESSAGE_CMD_OFFSET 0
|
||||
|
||||
/* Message types */
|
||||
#define OPLOCK_BREAK_CMD 0x1
|
||||
#define KERNEL_OPLOCK_BREAK_CMD 0x2
|
||||
#define LEVEL_II_OPLOCK_BREAK_CMD 0x3
|
||||
#define ASYNC_LEVEL_II_OPLOCK_BREAK_CMD 0x4
|
||||
|
||||
#define CMD_REPLY 0x8000
|
||||
|
||||
#include "smb_macros.h"
|
||||
|
||||
#include "rpc_secdes.h"
|
||||
|
||||
#define SAFE_NETBIOS_CHARS ". -_"
|
||||
|
||||
/* generic iconv conversion structure */
|
||||
typedef struct {
|
||||
size_t (*direct)(void *cd, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
size_t (*pull)(void *cd, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
size_t (*push)(void *cd, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
void *cd_direct, *cd_pull, *cd_push;
|
||||
} *smb_iconv_t;
|
||||
|
||||
#endif /* _REWRITE_H */
|
@ -592,4 +592,16 @@ typedef uint64_t HYPER_T;
|
||||
/* passed to br lock code */
|
||||
enum brl_type {READ_LOCK, WRITE_LOCK, PENDING_READ_LOCK, PENDING_WRITE_LOCK};
|
||||
|
||||
/* string manipulation flags - see clistr.c and srvstr.c */
|
||||
#define STR_TERMINATE 1
|
||||
#define STR_UPPER 2
|
||||
#define STR_ASCII 4
|
||||
#define STR_UNICODE 8
|
||||
#define STR_NOALIGN 16
|
||||
#define STR_NO_RANGE_CHECK 32
|
||||
#define STR_LEN8BIT 64
|
||||
#define STR_TERMINATE_ASCII 128 /* only terminate if ascii */
|
||||
#define STR_LEN_NOTERM 256 /* the length field is the unterminated length */
|
||||
|
||||
|
||||
#endif /* _SMB_H */
|
||||
|
@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "ldap_server/ldap_server.h"
|
||||
#include "system/time.h"
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "system/passwd.h"
|
||||
#include "lib/cmdline/popt_common.h"
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
|
||||
/* this global variable determines what messages are printed */
|
||||
int DEBUGLEVEL;
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "registry.h"
|
||||
#include "lib/cmdline/popt_common.h"
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "registry.h"
|
||||
#include "lib/cmdline/popt_common.h"
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "registry.h"
|
||||
#include "lib/cmdline/popt_common.h"
|
||||
#include "system/time.h"
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "registry.h"
|
||||
#include "lib/cmdline/popt_common.h"
|
||||
|
||||
|
@ -37,6 +37,7 @@ void sub_set_context(struct substitute_context *subptr)
|
||||
*/
|
||||
static void setup_string(char **dest, const char *str)
|
||||
{
|
||||
#define SAFE_NETBIOS_CHARS ". -_"
|
||||
char *s;
|
||||
|
||||
s = strdup(str);
|
||||
|
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "system/network.h"
|
||||
#include "system/iconv.h"
|
||||
|
||||
|
@ -456,118 +456,6 @@ struct ipv4_addr *name_query(int fd,const char *name,int name_type,
|
||||
return ip_list;
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
Start parsing the lmhosts file.
|
||||
*********************************************************/
|
||||
|
||||
XFILE *startlmhosts(char *fname)
|
||||
{
|
||||
XFILE *fp = x_fopen(fname,O_RDONLY, 0);
|
||||
if (!fp) {
|
||||
DEBUG(4,("startlmhosts: Can't open lmhosts file %s. Error was %s\n",
|
||||
fname, strerror(errno)));
|
||||
return NULL;
|
||||
}
|
||||
return fp;
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
Parse the next line in the lmhosts file.
|
||||
*********************************************************/
|
||||
|
||||
BOOL getlmhostsent( TALLOC_CTX *mem_ctx,
|
||||
XFILE *fp, pstring name, int *name_type, struct ipv4_addr *ipaddr)
|
||||
{
|
||||
pstring line;
|
||||
|
||||
while(!x_feof(fp) && !x_ferror(fp)) {
|
||||
pstring ip,flags,extra;
|
||||
const char *ptr;
|
||||
char *ptr1;
|
||||
int count = 0;
|
||||
|
||||
*name_type = -1;
|
||||
|
||||
if (!fgets_slash(line,sizeof(pstring),fp))
|
||||
continue;
|
||||
|
||||
if (*line == '#')
|
||||
continue;
|
||||
|
||||
pstrcpy(ip,"");
|
||||
pstrcpy(name,"");
|
||||
pstrcpy(flags,"");
|
||||
|
||||
ptr = line;
|
||||
|
||||
if (next_token(&ptr,ip ,NULL,sizeof(ip)))
|
||||
++count;
|
||||
if (next_token(&ptr,name ,NULL, sizeof(pstring)))
|
||||
++count;
|
||||
if (next_token(&ptr,flags,NULL, sizeof(flags)))
|
||||
++count;
|
||||
if (next_token(&ptr,extra,NULL, sizeof(extra)))
|
||||
++count;
|
||||
|
||||
if (count <= 0)
|
||||
continue;
|
||||
|
||||
if (count > 0 && count < 2)
|
||||
{
|
||||
DEBUG(0,("getlmhostsent: Ill formed hosts line [%s]\n",line));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (count >= 4)
|
||||
{
|
||||
DEBUG(0,("getlmhostsent: too many columns in lmhosts file (obsolete syntax)\n"));
|
||||
continue;
|
||||
}
|
||||
|
||||
DEBUG(4, ("getlmhostsent: lmhost entry: %s %s %s\n", ip, name, flags));
|
||||
|
||||
if (strchr_m(flags,'G') || strchr_m(flags,'S'))
|
||||
{
|
||||
DEBUG(0,("getlmhostsent: group flag in lmhosts ignored (obsolete)\n"));
|
||||
continue;
|
||||
}
|
||||
|
||||
*ipaddr = interpret_addr2(ip);
|
||||
|
||||
/* Extra feature. If the name ends in '#XX', where XX is a hex number,
|
||||
then only add that name type. */
|
||||
if((ptr1 = strchr_m(name, '#')) != NULL)
|
||||
{
|
||||
char *endptr;
|
||||
|
||||
ptr1++;
|
||||
*name_type = (int)strtol(ptr1, &endptr, 16);
|
||||
|
||||
if(!*ptr1 || (endptr == ptr1))
|
||||
{
|
||||
DEBUG(0,("getlmhostsent: invalid name %s containing '#'.\n", name));
|
||||
continue;
|
||||
}
|
||||
|
||||
*(--ptr1) = '\0'; /* Truncate at the '#' */
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
return False;
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
Finish parsing the lmhosts file.
|
||||
*********************************************************/
|
||||
|
||||
void endlmhosts(XFILE *fp)
|
||||
{
|
||||
x_fclose(fp);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************
|
||||
Resolve via "bcast" method.
|
||||
*********************************************************/
|
||||
|
@ -89,8 +89,7 @@ typedef char pstring[PSTRING_LEN];
|
||||
typedef char fstring[FSTRING_LEN];
|
||||
#endif
|
||||
|
||||
#ifndef _BOOL
|
||||
#define _BOOL /* So we don't typedef BOOL again in vfs.h */
|
||||
#ifndef Auto
|
||||
#define False (0)
|
||||
#define True (1)
|
||||
#define Auto (2)
|
||||
|
@ -53,6 +53,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "system/time.h"
|
||||
#include "system/iconv.h"
|
||||
#include "system/network.h"
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
|
||||
/*
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "system/time.h"
|
||||
#include "request.h"
|
||||
#include "libcli/raw/libcliraw.h"
|
||||
|
@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "system/time.h"
|
||||
|
||||
static int numops = 1000;
|
||||
|
@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "client.h"
|
||||
#include "libcli/raw/libcliraw.h"
|
||||
#include "system/time.h"
|
||||
|
@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "client.h"
|
||||
#include "lib/cmdline/popt_common.h"
|
||||
#include "libcli/raw/libcliraw.h"
|
||||
|
@ -42,6 +42,7 @@
|
||||
/*****************************************************/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "utils/net/net.h"
|
||||
#include "lib/cmdline/popt_common.h"
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dynconfig.h"
|
||||
#include "system/passwd.h"
|
||||
#include "lib/cmdline/popt_common.h"
|
||||
#include "auth/auth.h"
|
||||
|
Loading…
Reference in New Issue
Block a user