From 2f13a74671c62a2861979ce2ab33ad1363bdbcf7 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 20 Mar 2003 00:32:44 +0000 Subject: Cleanup bogus initialisation in SID_NAME_USE enum. Added new sid type = 9 for "computer" from MSDN. (This used to be commit 45929d126932e5cac5a23fe76d28a4fa05b54b77) --- source3/include/smb.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/include') diff --git a/source3/include/smb.h b/source3/include/smb.h index bf2d5631a7..0506c410f3 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -236,15 +236,15 @@ typedef struct nttime_info /* SID Types */ enum SID_NAME_USE { - SID_NAME_USE_NONE = 0,/* NOTUSED */ SID_NAME_USER = 1, /* user */ - SID_NAME_DOM_GRP = 2, /* domain group */ - SID_NAME_DOMAIN = 3, /* domain: don't know what this is */ - SID_NAME_ALIAS = 4, /* local group */ - SID_NAME_WKN_GRP = 5, /* well-known group */ - SID_NAME_DELETED = 6, /* deleted account: needed for c2 rating */ - SID_NAME_INVALID = 7, /* invalid account */ - SID_NAME_UNKNOWN = 8 /* oops. */ + SID_NAME_DOM_GRP, /* domain group */ + SID_NAME_DOMAIN, /* domain sid */ + SID_NAME_ALIAS, /* local group */ + SID_NAME_WKN_GRP, /* well-known group */ + SID_NAME_DELETED, /* deleted account: needed for c2 rating */ + SID_NAME_INVALID, /* invalid account */ + SID_NAME_UNKNOWN, /* unknown sid type */ + SID_NAME_COMPUTER, /* sid for a computer */ }; /** -- cgit From a38e5e6850220fc1a0afa5097359c05458e1ae41 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 22 Mar 2003 13:06:52 +0000 Subject: Small clenaup patches: - safe_string.h - don't assume that __FUNCTION__ is available - process.c - use new workaround from safe_string.h for the same - util.c - Show how many bytes we smb_panic()ed trying to smb_xmalloc() - gencache.c - Keep valgrind quiet by always null terminating. - clistr.c - Add copyright - srvstr.h - move srvstr_push into a .c file again, as a real function. - srvstr.c - revive, with 'safe' checked srvstr_push - loadparm.c - set a default for the display charset. Andrew Bartlett (This used to be commit a7eba37aadeb0b04cb1bd89deddb58be8aba825c) --- source3/include/safe_string.h | 50 +++++++++++++++++++++---------------------- source3/include/srvstr.h | 3 --- 2 files changed, 25 insertions(+), 28 deletions(-) (limited to 'source3/include') diff --git a/source3/include/safe_string.h b/source3/include/safe_string.h index 61ef4bdf96..f26a5785cb 100644 --- a/source3/include/safe_string.h +++ b/source3/include/safe_string.h @@ -2,6 +2,7 @@ Unix SMB/CIFS implementation. Safe string handling routines. Copyright (C) Andrew Tridgell 1994-1998 + Copyright (C) Andrew Bartlett 2003 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -48,6 +49,14 @@ #endif /* !_SPLINT_ */ +#ifdef DEVELOPER +#define SAFE_STRING_FUNCTION_NAME FUNCTION_MACRO +#define SAFE_STRING_LINE __LINE__ +#else +#define SAFE_STRING_FUNCTION_NAME ("") +#define SAFE_STRING_LINE (0) +#endif + /* We need a number of different prototypes for our non-existant fuctions */ char * __unsafe_string_function_usage_here__(void); @@ -141,32 +150,17 @@ size_t __unsafe_string_function_usage_here_char__(void); * long. This is not a good situation, because we can't do the normal * sanity checks. Don't use in new code! */ -#ifdef DEVELOPER -#define overmalloc_safe_strcpy(dest,src,maxlength) safe_strcpy_fn(__FUNCTION__,__LINE__,dest,src,maxlength) -#define safe_strcpy(dest,src,maxlength) safe_strcpy_fn2(__FUNCTION__,__LINE__,dest,src,maxlength) -#define safe_strcat(dest,src,maxlength) safe_strcat_fn2(__FUNCTION__,__LINE__,dest,src,maxlength) -#define push_string(base_ptr, dest, src, dest_len, flags) push_string_fn2(__FUNCTION__, __LINE__, base_ptr, dest, src, dest_len, flags) -#define pull_string(base_ptr, dest, src, dest_len, src_len, flags) pull_string_fn2(__FUNCTION__, __LINE__, base_ptr, dest, src, dest_len, src_len, flags) -#define clistr_push(cli, dest, src, dest_len, flags) clistr_push_fn2(__FUNCTION__, __LINE__, cli, dest, src, dest_len, flags) -#define clistr_pull(cli, dest, src, dest_len, src_len, flags) clistr_pull_fn2(__FUNCTION__, __LINE__, cli, dest, src, dest_len, src_len, flags) - -#define alpha_strcpy(dest,src,other_safe_chars,maxlength) alpha_strcpy_fn(__FUNCTION__,__LINE__,dest,src,other_safe_chars,maxlength) -#define StrnCpy(dest,src,n) StrnCpy_fn(__FUNCTION__,__LINE__,dest,src,n) - -#else - -#define overmalloc_safe_strcpy(dest,src,maxlength) safe_strcpy_fn(NULL,0,dest,src,maxlength) -#define safe_strcpy(dest,src,maxlength) safe_strcpy_fn2(NULL,0,dest,src,maxlength) -#define safe_strcat(dest,src,maxlength) safe_strcat_fn2(NULL,0,dest,src,maxlength) -#define push_string(base_ptr, dest, src, dest_len, flags) push_string_fn2(NULL, 0, base_ptr, dest, src, dest_len, flags) -#define pull_string(base_ptr, dest, src, dest_len, src_len, flags) pull_string_fn2(NULL, 0, base_ptr, dest, src, dest_len, src_len, flags) -#define clistr_push(cli, dest, src, dest_len, flags) clistr_push_fn2(NULL, 0, cli, dest, src, dest_len, flags) -#define clistr_pull(cli, dest, src, dest_len, src_len, flags) clistr_pull_fn2(NULL, 0, cli, dest, src, dest_len, src_len, flags) - -#define alpha_strcpy(dest,src,other_safe_chars,maxlength) alpha_strcpy_fn(NULL,0,dest,src,other_safe_chars,maxlength) -#define StrnCpy(dest,src,n) StrnCpy_fn(NULL,0,dest,src,n) -#endif /* DEVELOPER */ +#define overmalloc_safe_strcpy(dest,src,maxlength) safe_strcpy_fn(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE,dest,src,maxlength) +#define safe_strcpy(dest,src,maxlength) safe_strcpy_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE,dest,src,maxlength) +#define safe_strcat(dest,src,maxlength) safe_strcat_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE,dest,src,maxlength) +#define push_string(base_ptr, dest, src, dest_len, flags) push_string_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, base_ptr, dest, src, dest_len, flags) +#define pull_string(base_ptr, dest, src, dest_len, src_len, flags) pull_string_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, base_ptr, dest, src, dest_len, src_len, flags) +#define clistr_push(cli, dest, src, dest_len, flags) clistr_push_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, cli, dest, src, dest_len, flags) +#define clistr_pull(cli, dest, src, dest_len, src_len, flags) clistr_pull_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, cli, dest, src, dest_len, src_len, flags) +#define srvstr_push(base_ptr, dest, src, dest_len, flags) srvstr_push_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, base_ptr, dest, src, dest_len, flags) +#define alpha_strcpy(dest,src,other_safe_chars,maxlength) alpha_strcpy_fn(SAFE_STRING_FUNCTION_NAME,SAFE_STRING_LINE,dest,src,other_safe_chars,maxlength) +#define StrnCpy(dest,src,n) StrnCpy_fn(SAFE_STRING_FUNCTION_NAME,SAFE_STRING_LINE,dest,src,n) #ifdef HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS @@ -204,6 +198,11 @@ size_t __unsafe_string_function_usage_here_char__(void); ? __unsafe_string_function_usage_here_size_t__() \ : clistr_pull_fn(fn_name, fn_line, cli, dest, src, dest_len, srclen, flags)) +#define srvstr_push_fn2(fn_name, fn_line, base_ptr, dest, src, dest_len, flags) \ + (CHECK_STRING_SIZE(dest, dest_len) \ + ? __unsafe_string_function_usage_here_size_t__() \ + : srvstr_push_fn(fn_name, fn_line, base_ptr, dest, src, dest_len, flags)) + #else #define safe_strcpy_fn2 safe_strcpy_fn @@ -212,6 +211,7 @@ size_t __unsafe_string_function_usage_here_char__(void); #define pull_string_fn2 pull_string_fn #define clistr_push_fn2 clistr_push_fn #define clistr_pull_fn2 clistr_pull_fn +#define srvstr_push_fn2 srvstr_push_fn #endif diff --git a/source3/include/srvstr.h b/source3/include/srvstr.h index a433e0e3f9..04db59cf01 100644 --- a/source3/include/srvstr.h +++ b/source3/include/srvstr.h @@ -20,9 +20,6 @@ #include "includes.h" -#define srvstr_push(base_ptr, dest, src, dest_len, flags) \ - push_string(base_ptr, dest, src, dest_len, flags) - #define srvstr_pull(base_ptr, dest, src, dest_len, src_len, flags) \ pull_string(base_ptr, dest, src, dest_len, src_len, flags) -- cgit From 94837e2125fec8e75dceee91c09581b7be48309b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 22 Mar 2003 23:48:02 +0000 Subject: Add -U, -N, -i, -A, -W to popt. (This used to be commit 5a88d78f67fd7853d6f7d5042807afa56091d52c) --- source3/include/popt_common.h | 47 +++++++++++++++++++++++++++++++++++++++++++ source3/include/smb.h | 9 +-------- 2 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 source3/include/popt_common.h (limited to 'source3/include') diff --git a/source3/include/popt_common.h b/source3/include/popt_common.h new file mode 100644 index 0000000000..9354e8734d --- /dev/null +++ b/source3/include/popt_common.h @@ -0,0 +1,47 @@ +/* + Unix SMB/CIFS implementation. + Common popt arguments + Copyright (C) Jelmer Vernooij 2003 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef _POPT_COMMON_H +#define _POPT_COMMON_H + +/* Common popt structures */ +extern struct poptOption popt_common_debug[]; +extern struct poptOption popt_common_configfile[]; +extern struct poptOption popt_common_socket_options[]; +extern struct poptOption popt_common_version[]; +extern struct poptOption popt_common_netbios_name[]; +extern struct poptOption popt_common_log_base[]; +extern struct poptOption popt_common_credentials[]; +extern struct poptOption popt_common_scope[]; + +#define POPT_COMMON_SAMBA { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_version, 0, "Common samba options:", NULL }, +#define POPT_CREDENTIALS { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_credentials, 0, "Authentication options:", NULL }, + +struct user_auth_info { + pstring username; + pstring password; + pstring workgroup; + BOOL got_pass; + BOOL use_kerberos; +}; + +extern struct user_auth_info cmdline_auth_info; + +#endif /* _POPT_COMMON_H */ diff --git a/source3/include/smb.h b/source3/include/smb.h index 0506c410f3..4f37c38413 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1711,14 +1711,7 @@ typedef struct { #define DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH 14 -/* Common popt structures */ - -extern struct poptOption popt_common_debug[]; -extern struct poptOption popt_common_configfile[]; -extern struct poptOption popt_common_socket_options[]; -extern struct poptOption popt_common_version[]; -extern struct poptOption popt_common_netbios_name[]; -extern struct poptOption popt_common_log_base[]; +#include "popt_common.h" /* Module support */ typedef int (init_module_function) (void); -- cgit From 1f5e93e2e7dccb16da3b733fffd401867b2ea3b9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 23 Mar 2003 13:03:25 +0000 Subject: NTLM Authentication: - Add a 'privileged' mode to Winbindd. This is achieved by means of a directory under lockdir, that the admin can change the group access for. - This mode is now required to access with 'CRAP' authentication feature. - This *will* break the current SQUID helper, so I've fixed up our ntlm_auth replacement: - Update our NTLMSSP code to cope with 'datagram' mode, where we don't get a challenge. - Use this to make our ntlm_auth utility suitable for use in current Squid 2.5 servers. - Tested - works for Win2k clients, but not Win9X at present. NTLMSSP updates are needed. - Now uses fgets(), not x_fgets() to cope with Squid environment (I think somthing to do with non-blocking stdin). - Add much more robust connection code to wb_common.c - it will not connect to a server of a different protocol version, and it will automatically try and reconnect to the 'privileged' pipe if possible. - This could help with 'privileged' idmap operations etc in future. - Add a generic HEX encode routine to util_str.c, - fix a small line of dodgy C in StrnCpy_fn() - Correctly pull our 'session key' out of the info3 from th the DC. This is used in both the auth code, and in for export over the winbind pipe to ntlm_auth. - Given the user's challenge/response and access to the privileged pipe, allow external access to the 'session key'. To be used for MSCHAPv2 integration. Andrew Bartlett (This used to be commit dcdc75ebd89f504a0f6e3a3bc5b43298858d276b) --- source3/include/rpc_netlogon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/rpc_netlogon.h b/source3/include/rpc_netlogon.h index fb849f8238..74e3a50ee4 100644 --- a/source3/include/rpc_netlogon.h +++ b/source3/include/rpc_netlogon.h @@ -156,7 +156,7 @@ typedef struct net_user_info_3 uint32 buffer_groups; /* undocumented buffer pointer to groups. */ uint32 user_flgs; /* user flags */ - uint8 user_sess_key[16]; /* unused user session key */ + uint8 user_sess_key[16]; /* user session key */ UNIHDR hdr_logon_srv; /* logon server unicode string header */ UNIHDR hdr_logon_dom; /* logon domain unicode string header */ -- cgit From 11e9de855ca84af8d34a5f6459f304fcfa72dca3 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 24 Mar 2003 11:25:34 +0000 Subject: Patch from metze to generalise POPT_COMMON_SAMBA, with some minor changes (This used to be commit 2ddfed298d7f0b6e690275725a39c3ef107077ae) --- source3/include/popt_common.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'source3/include') diff --git a/source3/include/popt_common.h b/source3/include/popt_common.h index 9354e8734d..7cdbc98862 100644 --- a/source3/include/popt_common.h +++ b/source3/include/popt_common.h @@ -22,22 +22,15 @@ #define _POPT_COMMON_H /* Common popt structures */ -extern struct poptOption popt_common_debug[]; -extern struct poptOption popt_common_configfile[]; -extern struct poptOption popt_common_socket_options[]; -extern struct poptOption popt_common_version[]; -extern struct poptOption popt_common_netbios_name[]; -extern struct poptOption popt_common_log_base[]; +extern struct poptOption popt_common_samba[]; extern struct poptOption popt_common_credentials[]; -extern struct poptOption popt_common_scope[]; -#define POPT_COMMON_SAMBA { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_version, 0, "Common samba options:", NULL }, +#define POPT_COMMON_SAMBA { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_samba, 0, "Common samba options:", NULL }, #define POPT_CREDENTIALS { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_credentials, 0, "Authentication options:", NULL }, struct user_auth_info { pstring username; pstring password; - pstring workgroup; BOOL got_pass; BOOL use_kerberos; }; -- cgit From 66876060fea57a317535fe869a95a0721d03acc0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 24 Mar 2003 12:18:56 +0000 Subject: Define POPT_TABLEEND if current popt.h doesn't contain it already (This used to be commit de4bdf42d8f27b54260f58ff37d438c67623f446) --- source3/include/popt_common.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/include') diff --git a/source3/include/popt_common.h b/source3/include/popt_common.h index 7cdbc98862..380df4860e 100644 --- a/source3/include/popt_common.h +++ b/source3/include/popt_common.h @@ -25,6 +25,10 @@ extern struct poptOption popt_common_samba[]; extern struct poptOption popt_common_credentials[]; +#ifndef POPT_TABLEEND +#define POPT_TABLEEND { NULL, '\0', 0, 0, 0, NULL, NULL } +#endif + #define POPT_COMMON_SAMBA { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_samba, 0, "Common samba options:", NULL }, #define POPT_CREDENTIALS { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_credentials, 0, "Authentication options:", NULL }, -- cgit From 41a09c3c533ab170097309e1f91314eda32e4f4c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 24 Mar 2003 14:15:14 +0000 Subject: Revoke some of the popt patch from metze I applied earlier today. It added some double options and broke some parameters. (This used to be commit d5f9b0275c91512e1926504f22aaeec2d104430d) --- source3/include/popt_common.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/popt_common.h b/source3/include/popt_common.h index 380df4860e..57850bf682 100644 --- a/source3/include/popt_common.h +++ b/source3/include/popt_common.h @@ -23,6 +23,8 @@ /* Common popt structures */ extern struct poptOption popt_common_samba[]; +extern struct poptOption popt_common_connection[]; +extern struct poptOption popt_common_version[]; extern struct poptOption popt_common_credentials[]; #ifndef POPT_TABLEEND @@ -30,7 +32,9 @@ extern struct poptOption popt_common_credentials[]; #endif #define POPT_COMMON_SAMBA { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_samba, 0, "Common samba options:", NULL }, -#define POPT_CREDENTIALS { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_credentials, 0, "Authentication options:", NULL }, +#define POPT_COMMON_CONNECTION { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_connection, 0, "Connection options:", NULL }, +#define POPT_COMMON_VERSION { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_version, 0, "Common samba options:", NULL }, +#define POPT_COMMON_CREDENTIALS { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_credentials, 0, "Authentication options:", NULL }, struct user_auth_info { pstring username; -- cgit From 6d6f1c0522201792412b4618098536bcc45f4919 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 24 Mar 2003 23:03:46 +0000 Subject: - Add support to auth/ for the new modules system - Quite some small fixes (also fixes the build) (This used to be commit 3defbd5e0633acfa4631531b49601c7706072d86) --- source3/include/auth.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/include') diff --git a/source3/include/auth.h b/source3/include/auth.h index e37f181082..626b9f3ba0 100644 --- a/source3/include/auth.h +++ b/source3/include/auth.h @@ -148,6 +148,8 @@ struct auth_init_function_entry { /* Function to create a member of the authmethods list */ auth_init_function init; + + struct auth_init_function_entry *prev, *next; }; typedef struct auth_ntlmssp_state @@ -158,4 +160,6 @@ typedef struct auth_ntlmssp_state struct ntlmssp_state *ntlmssp_state; } AUTH_NTLMSSP_STATE; +#define AUTH_INTERFACE_VERSION 1 + #endif /* _SMBAUTH_H_ */ -- cgit From 0eff00c69225d106b827efed73e21d3538e72e0e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 26 Mar 2003 12:53:28 +0000 Subject: Output backtrace to logfile in smb_panic(), as suggested by mbp (only on systems that support it, of course) (This used to be commit bf439d733df6a11a25ff561a853c3382a3b34b96) --- source3/include/local.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/include') diff --git a/source3/include/local.h b/source3/include/local.h index 29b0641119..4c3c58e14f 100644 --- a/source3/include/local.h +++ b/source3/include/local.h @@ -223,4 +223,8 @@ /* Max number of simultaneous winbindd socket connections. */ #define WINBINDD_MAX_SIMULTANEOUS_CLIENTS 200 + +/* Buffer size to use when printing backtraces */ +#define BACKTRACE_STACK_SIZE 64 + #endif -- cgit From 70cf597a790b6f667800e43f81b105f674e61a20 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 26 Mar 2003 13:43:29 +0000 Subject: Use execinfo.h to get prototypes for backtrace_symbols (fixes some warnings) (This used to be commit d453b656e56a9b836b76f1cdce8de65d7bc4eb6c) --- source3/include/includes.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/include') diff --git a/source3/include/includes.h b/source3/include/includes.h index 2bba9d5084..f536ea88fe 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -345,6 +345,10 @@ #include #endif +#ifdef HAVE_EXECINFO_H +#include +#endif + #ifdef HAVE_SYS_CAPABILITY_H #if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) && !defined(_I386_STATFS_H) -- cgit From e6df31f14b3fa0a8819b8dfe443eaea009ac9657 Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel" Date: Thu, 27 Mar 2003 05:11:25 +0000 Subject: The definition of pstrcpy_base(), and the preceeding comments, were given twice (probably a cut/paste error). The definition of pstrcpy_base(), and the preceeding comments, were given twice (probably a cut/paste error). (This used to be commit 5306f6f7c88234d51c4ff13d5451d3489de6b00e) --- source3/include/safe_string.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'source3/include') diff --git a/source3/include/safe_string.h b/source3/include/safe_string.h index f26a5785cb..a6b352b02e 100644 --- a/source3/include/safe_string.h +++ b/source3/include/safe_string.h @@ -122,21 +122,15 @@ size_t __unsafe_string_function_usage_here_char__(void); #define safe_strcpy_base(dest, src, base, size) \ safe_strcpy(dest, src, size-PTR_DIFF(dest,base)-1) -/* String copy functions - macro hell below adds 'type checking' (limited, but the best we can - do in C) and may tag with function name/number to record the last 'clobber region' on - that string */ +/* String copy functions - macro hell below adds 'type checking' + (limited, but the best we can do in C) and may tag with function + name/number to record the last 'clobber region' on that string */ #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) -/* the addition of the DEVELOPER checks in safe_strcpy means we must - * update a lot of code. To make this a little easier here are some - * functions that provide the lengths with less pain */ -#define pstrcpy_base(dest, src, pstring_base) \ - safe_strcpy(dest, src, sizeof(pstring)-PTR_DIFF(dest,pstring_base)-1) - /* Inside the _fn variants of these is a call to clobber_region(), - * which might destroy the stack on a buggy function. We help the -- cgit From 11db21cc1c00d63c6b23ec6b3a3bdb48728b2b64 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 27 Mar 2003 12:08:46 +0000 Subject: Use the new modules system in VFS. If a module can't be loaded with the new modules system, we still fall back to the old system. (This used to be commit cebe8d8b424f10006f2f791a8f086c6c8a7f5d57) --- source3/include/vfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/include') diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 9a06764371..756e417814 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -48,7 +48,7 @@ #define SMB_VFS_INTERFACE_VERSION 5 -/* Version of supported cascaded interface backward copmatibility. +/* Version of supported cascaded interface backward compatibility. (version 5 corresponds to SMB_VFS_INTERFACE_VERSION 5) It is used in vfs_init_custom() to detect VFS modules which conform to cascaded VFS interface but implement elder version than current version of Samba uses. @@ -77,7 +77,7 @@ is unloaded from smbd process using sys_dlclose(). Prototypes: - vfs_op_tuple *vfs_init(int *vfs_version, const struct vfs_ops *def_vfs_ops, + vfs_op_tuple *vfs_init(const struct vfs_ops *def_vfs_ops, struct smb_vfs_handle_struct *vfs_handle); void vfs_done(connection_struct *conn); -- cgit