summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-03 15:19:22 -0800
committerJeremy Allison <jra@samba.org>2007-12-03 15:19:22 -0800
commitb9342eaaa6bf61f559e4173d7ea58acc1a0a9705 (patch)
tree3c9aa7af80a3112eb22ab1bde3085155da29651a /source3/include
parentbcf033b38ee2f6c76cd56cae5cd84a6e321ffafa (diff)
downloadsamba-b9342eaaa6bf61f559e4173d7ea58acc1a0a9705.tar.gz
samba-b9342eaaa6bf61f559e4173d7ea58acc1a0a9705.tar.bz2
samba-b9342eaaa6bf61f559e4173d7ea58acc1a0a9705.zip
Remove unused wpstring and macros. Stop using pstrcpy in smbd/*.c
Jeremy. (This used to be commit e72bce5b62fb0a9d0ff4a3d76490219994f303cf)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/includes.h23
-rw-r--r--source3/include/safe_string.h31
2 files changed, 0 insertions, 54 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 5192c37901..9079c3aa82 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -699,29 +699,6 @@ struct timespec {
#include "ctdbd_conn.h"
#include "talloc_stack.h"
-/*
- * Type for wide character dirent structure.
- * Only d_name is defined by POSIX.
- */
-
-typedef struct smb_wdirent {
- wpstring d_name;
-} SMB_STRUCT_WDIRENT;
-
-/*
- * Type for wide character passwd structure.
- */
-
-typedef struct smb_wpasswd {
- wfstring pw_name;
- char *pw_passwd;
- uid_t pw_uid;
- gid_t pw_gid;
- wpstring pw_gecos;
- wpstring pw_dir;
- wpstring pw_shell;
-} SMB_STRUCT_WPASSWD;
-
/* used in net.c */
struct functable {
const char *funcname;
diff --git a/source3/include/safe_string.h b/source3/include/safe_string.h
index 7a60ad695e..53ee7d312e 100644
--- a/source3/include/safe_string.h
+++ b/source3/include/safe_string.h
@@ -86,26 +86,6 @@ size_t __unsafe_string_function_usage_here_char__(void);
#define CHECK_STRING_SIZE(d, len) (sizeof(d) != (len) && sizeof(d) != sizeof(char *))
-#define fstrterminate(d) (CHECK_STRING_SIZE(d, sizeof(fstring)) \
- ? __unsafe_string_function_usage_here_char__() \
- : (((d)[sizeof(fstring)-1]) = '\0'))
-#define pstrterminate(d) (CHECK_STRING_SIZE(d, sizeof(pstring)) \
- ? __unsafe_string_function_usage_here_char__() \
- : (((d)[sizeof(pstring)-1]) = '\0'))
-
-#define wpstrcpy(d,s) ((sizeof(d) != sizeof(wpstring) && sizeof(d) != sizeof(smb_ucs2_t *)) \
- ? __unsafe_string_function_usage_here__() \
- : safe_strcpy_w((d),(s),sizeof(wpstring)))
-#define wpstrcat(d,s) ((sizeof(d) != sizeof(wpstring) && sizeof(d) != sizeof(smb_ucs2_t *)) \
- ? __unsafe_string_function_usage_here__() \
- : safe_strcat_w((d),(s),sizeof(wpstring)))
-#define wfstrcpy(d,s) ((sizeof(d) != sizeof(wfstring) && sizeof(d) != sizeof(smb_ucs2_t *)) \
- ? __unsafe_string_function_usage_here__() \
- : safe_strcpy_w((d),(s),sizeof(wfstring)))
-#define wfstrcat(d,s) ((sizeof(d) != sizeof(wfstring) && sizeof(d) != sizeof(smb_ucs2_t *)) \
- ? __unsafe_string_function_usage_here__() \
- : safe_strcat_w((d),(s),sizeof(wfstring)))
-
#define push_pstring_base(dest, src, pstring_base) \
(CHECK_STRING_SIZE(pstring_base, sizeof(pstring)) \
? __unsafe_string_function_usage_here_size_t__() \
@@ -113,14 +93,6 @@ size_t __unsafe_string_function_usage_here_char__(void);
#else /* HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS */
-#define fstrterminate(d) (((d)[sizeof(fstring)-1]) = '\0')
-#define pstrterminate(d) (((d)[sizeof(pstring)-1]) = '\0')
-
-#define wpstrcpy(d,s) safe_strcpy_w((d),(s),sizeof(wpstring))
-#define wpstrcat(d,s) safe_strcat_w((d),(s),sizeof(wpstring))
-#define wfstrcpy(d,s) safe_strcpy_w((d),(s),sizeof(wfstring))
-#define wfstrcat(d,s) safe_strcat_w((d),(s),sizeof(wfstring))
-
#define push_pstring_base(dest, src, pstring_base) \
push_ascii(dest, src, sizeof(pstring)-PTR_DIFF(dest,pstring_base)-1, STR_TERMINATE)
@@ -143,9 +115,6 @@ size_t __unsafe_string_function_usage_here_char__(void);
/* 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