[SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-794-geb7a404
Günther Deschner
gd at samba.org
Tue Sep 29 16:37:36 MDT 2009
The branch, master has been updated
via eb7a40422593970eba0541a7e4deaa6bc31f94e0 (commit)
via 26e798da19a9c36fad62e978545c6dfc90a9645d (commit)
via 2ccf75d9a9e73a05ab5cbe56526aba3bb45011f0 (commit)
via 76bb3808392c981f03deca632dd99081565bf6e1 (commit)
from b0a66496f571cd7003292a7c8fe0e072df18a0a2 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit eb7a40422593970eba0541a7e4deaa6bc31f94e0
Author: Günther Deschner <gd at samba.org>
Date: Wed Sep 30 00:36:05 2009 +0200
s3: remove unused unistr2_term_codes.
Guenther
commit 26e798da19a9c36fad62e978545c6dfc90a9645d
Author: Günther Deschner <gd at samba.org>
Date: Fri Sep 25 01:00:24 2009 +0200
s3: remove unused regval_convert_multi_sz().
Guenther
commit 2ccf75d9a9e73a05ab5cbe56526aba3bb45011f0
Author: Günther Deschner <gd at samba.org>
Date: Fri Sep 25 00:37:02 2009 +0200
s3: remove unused regval_build_multi_sz().
Guenther
commit 76bb3808392c981f03deca632dd99081565bf6e1
Author: Günther Deschner <gd at samba.org>
Date: Wed Sep 23 20:48:25 2009 +0200
s3-rpc_parse: remove unused UNISTR2 struct and init function.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source3/include/proto.h | 3 -
source3/include/rpc_misc.h | 13 -----
source3/registry/reg_util.c | 107 ----------------------------------------
source3/rpc_parse/parse_misc.c | 56 ---------------------
4 files changed, 0 insertions(+), 179 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 5de6ebf..05651e2 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5158,8 +5158,6 @@ bool reg_split_key(char *path, char **base, char **key);
char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname );
void normalize_dbkey(char *key);
char *reg_remaining_path(TALLOC_CTX *ctx, const char *key);
-int regval_convert_multi_sz( uint16 *multi_string, size_t byte_len, char ***values );
-size_t regval_build_multi_sz( char **values, uint16 **buffer );
/* The following definitions come from registry/reg_util_legacy.c */
@@ -5653,7 +5651,6 @@ bool smb_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME
bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime);
bool smb_io_uuid(const char *desc, struct GUID *uuid,
prs_struct *ps, int depth);
-void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes flags);
/* The following definitions come from rpc_parse/parse_prs.c */
diff --git a/source3/include/rpc_misc.h b/source3/include/rpc_misc.h
index 797e192..aff9b1c 100644
--- a/source3/include/rpc_misc.h
+++ b/source3/include/rpc_misc.h
@@ -26,9 +26,6 @@
#define SMB_RPC_INTERFACE_VERSION 1
#define PRS_POINTER_CAST bool (*)(const char*, prs_struct*, int, void*)
-enum unistr2_term_codes { UNI_FLAGS_NONE = 0, UNI_STR_TERMINATE = 1, UNI_MAXLEN_TERMINATE = 2, UNI_BROKEN_NON_NULL = 3, UNI_STR_DBLTERMINATE = 4 };
-
-
/**********************************************************************
* well-known RIDs - Relative IDs
@@ -107,16 +104,6 @@ typedef struct { /* UNISTR - unicode string size and buffer */
little-endian. ***MUST*** be null-terminated */
} UNISTR;
-typedef struct { /* UNISTR2 - unicode string size (in
- uint16 unicode chars) and buffer */
- uint32 uni_max_len;
- uint32 offset;
- uint32 uni_str_len;
- uint16 *buffer; /* unicode characters. ***MUST*** be little-endian.
- **must** be null-terminated and the uni_str_len
- should include the NULL character */
-} UNISTR2;
-
/*
* I'm really wondering how many different time formats
* I will have to cope with
diff --git a/source3/registry/reg_util.c b/source3/registry/reg_util.c
index 3b0885d..fd76521 100644
--- a/source3/registry/reg_util.c
+++ b/source3/registry/reg_util.c
@@ -158,110 +158,3 @@ char *reg_remaining_path(TALLOC_CTX *ctx, const char *key)
return p;
}
-
-/**********************************************************************
-*********************************************************************/
-
-int regval_convert_multi_sz( uint16 *multi_string, size_t byte_len, char ***values )
-{
- char **sz;
- int i;
- int num_strings = 0;
- fstring buffer;
- uint16 *wp;
- size_t multi_len = byte_len / 2;
-
- if ( !multi_string || !values )
- return 0;
-
- *values = NULL;
-
- /* just count the NULLs */
-
- for ( i=0; (i<multi_len-1) && !(multi_string[i]==0x0 && multi_string[i+1]==0x0); i++ ) {
- /* peek ahead */
- if ( multi_string[i+1] == 0x0 )
- num_strings++;
- }
-
- if ( num_strings == 0 )
- return 0;
-
- if ( !(sz = TALLOC_ARRAY( NULL, char*, num_strings+1 )) ) {
- DEBUG(0,("reg_convert_multi_sz: talloc() failed!\n"));
- return -1;
- }
-
- wp = multi_string;
-
- for ( i=0; i<num_strings; i++ ) {
- rpcstr_pull( buffer, wp, sizeof(buffer), -1, STR_TERMINATE );
- sz[i] = talloc_strdup( sz, buffer );
-
- /* skip to the next string NULL and then one more */
- while ( *wp )
- wp++;
- wp++;
- }
-
- /* tag the array off with an empty string */
- sz[i] = '\0';
-
- *values = sz;
-
- return num_strings;
-}
-
-/**********************************************************************
- Returns number of bytes, not number of unicode characters
-*********************************************************************/
-
-size_t regval_build_multi_sz( char **values, uint16 **buffer )
-{
- int i;
- size_t buf_size = 0;
- uint16 *buf, *b;
- DATA_BLOB sz;
-
- if ( !values || !buffer )
- return 0;
-
- /* go ahead and alloc some space */
-
- if ( !(buf = TALLOC_ARRAY( NULL, uint16, 2 )) ) {
- DEBUG(0,("regval_build_multi_sz: talloc() failed!\n"));
- return 0;
- }
-
- for ( i=0; values[i]; i++ ) {
-
- /* DEBUG(0,("regval_build_multi_sz: building [%s]\n",values[i])); */
- push_reg_sz(talloc_tos(), &sz, values[i]);
-
- /* Alloc some more memory. Always add one one to account for the
- double NULL termination */
-
- b = TALLOC_REALLOC_ARRAY( NULL, buf, uint16, buf_size+sz.length/2+1 );
- if ( !b ) {
- DEBUG(0,("regval_build_multi_sz: talloc() reallocation error!\n"));
- TALLOC_FREE( buffer );
- return 0;
- }
- buf = b;
-
- /* copy the unistring2 buffer and increment the size */
- /* dump_data(1,sz.data,sz.length); */
- memcpy( buf+buf_size, sz.data, sz.length);
- buf_size += sz.length;
-
- /* cleanup rather than leaving memory hanging around */
- TALLOC_FREE( sz.data );
- }
-
- buf[buf_size++] = 0x0;
-
- *buffer = buf;
-
- /* return number of bytes */
- return buf_size*2;
-}
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index 1ea4ecf..34611a4 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -127,59 +127,3 @@ bool smb_io_uuid(const char *desc, struct GUID *uuid,
return True;
}
-
-/*******************************************************************
- Inits a UNISTR2 structure.
-********************************************************************/
-
-void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes flags)
-{
- size_t len = 0;
- uint32 num_chars = 0;
-
- if (buf) {
- /* We always null terminate the copy. */
- len = strlen(buf) + 1;
- if ( flags == UNI_STR_DBLTERMINATE )
- len++;
- }
-
- if (buf == NULL || len == 0) {
- /* no buffer -- nothing to do */
- str->uni_max_len = 0;
- str->offset = 0;
- str->uni_str_len = 0;
-
- return;
- }
-
-
- str->buffer = TALLOC_ZERO_ARRAY(talloc_tos(), uint16, len);
- if (str->buffer == NULL) {
- smb_panic("init_unistr2: malloc fail");
- return;
- }
-
- /* Ensure len is the length in *bytes* */
- len *= sizeof(uint16);
-
- /*
- * The UNISTR2 must be initialized !!!
- * jfm, 7/7/2001.
- */
- if (buf) {
- rpcstr_push((char *)str->buffer, buf, len, STR_TERMINATE);
- num_chars = strlen_w(str->buffer);
- if (flags == UNI_STR_TERMINATE || flags == UNI_MAXLEN_TERMINATE) {
- num_chars++;
- }
- if ( flags == UNI_STR_DBLTERMINATE )
- num_chars += 2;
- }
-
- str->uni_max_len = num_chars;
- str->offset = 0;
- str->uni_str_len = num_chars;
- if ( num_chars && ((flags == UNI_MAXLEN_TERMINATE) || (flags == UNI_BROKEN_NON_NULL)) )
- str->uni_max_len++;
-}
--
Samba Shared Repository
More information about the samba-cvs
mailing list