summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-06-24 16:33:37 +0200
committerMichael Adam <obnox@samba.org>2010-06-25 17:35:41 +0200
commit15bacaf3c594ac24cf26b0329723e873a5cae43d (patch)
tree6d49def92215c4fd375d54862a260984702099cd /source3/lib
parentf540833632ffe2c743e90ef9df1627e69b7a0c7b (diff)
downloadsamba-15bacaf3c594ac24cf26b0329723e873a5cae43d.tar.gz
samba-15bacaf3c594ac24cf26b0329723e873a5cae43d.tar.bz2
samba-15bacaf3c594ac24cf26b0329723e873a5cae43d.zip
s3-registry: Convert registry key delimiter from slash to backslash.
This is needed to support keynames containing a '/' like TCP/IP. Which is used in serveral standard paths. Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/adt_tree.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/lib/adt_tree.c b/source3/lib/adt_tree.c
index 7f4a39de6e..6d481613c7 100644
--- a/source3/lib/adt_tree.c
+++ b/source3/lib/adt_tree.c
@@ -46,7 +46,7 @@ static bool trim_tree_keypath( char *path, char **base, char **new_path )
*base = path;
- p = strchr( path, '/' );
+ p = strchr( path, '\\' );
if ( p ) {
*p = '\0';
@@ -214,7 +214,7 @@ WERROR pathtree_add(struct sorted_tree *tree, const char *path, void *data_p)
DEBUG(8,("pathtree_add: Enter\n"));
- if ( !path || *path != '/' ) {
+ if ( !path || *path != '\\' ) {
DEBUG(0,("pathtree_add: Attempt to add a node with a bad path [%s]\n",
path ? path : "NULL" ));
return WERR_INVALID_PARAM;
@@ -225,7 +225,7 @@ WERROR pathtree_add(struct sorted_tree *tree, const char *path, void *data_p)
return WERR_INVALID_PARAM;
}
- /* move past the first '/' */
+ /* move past the first '\\' */
path++;
path2 = SMB_STRDUP( path );
@@ -248,7 +248,7 @@ WERROR pathtree_add(struct sorted_tree *tree, const char *path, void *data_p)
do {
/* break off the remaining part of the path */
- str = strchr( str, '/' );
+ str = strchr( str, '\\' );
if ( str )
*str = '\0';
@@ -269,7 +269,7 @@ WERROR pathtree_add(struct sorted_tree *tree, const char *path, void *data_p)
base = str;
if ( base ) {
- *base = '/';
+ *base = '\\';
base++;
str = base;
}
@@ -384,7 +384,7 @@ void* pathtree_find(struct sorted_tree *tree, char *key )
/* make a copy to play with */
- if ( *key == '/' )
+ if ( *key == '\\' )
keystr = SMB_STRDUP( key+1 );
else
keystr = SMB_STRDUP( key );