summaryrefslogtreecommitdiffstats
path: root/source/lib/util_str.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-20 20:54:29 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-20 20:54:29 +0000
commit97ec74e1fa99d773812d2df402251fafb76b181c (patch)
tree1158dbaaf7edd79a0f470280c86d724dc7a62a9e /source/lib/util_str.c
parent3ec269b402ba6898d905ea1029c427e1b645faf4 (diff)
downloadsamba-97ec74e1fa99d773812d2df402251fafb76b181c.tar.gz
samba-97ec74e1fa99d773812d2df402251fafb76b181c.tar.xz
samba-97ec74e1fa99d773812d2df402251fafb76b181c.zip
modified domain_client_validate to take trust account name / type. this
is to pass DOMAIN_NAME$ and SEC_CHAN_DOMAIN instead of WKSTA_NAME$ and SEC_CHAN_WKSTA. modified check_domain_security to determine if domain name is own domain, and to use wksta trust account if so, otherwise check "trusting domains" parameter and use inter-domain trust account if so, otherwise return False.
Diffstat (limited to 'source/lib/util_str.c')
-rw-r--r--source/lib/util_str.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/source/lib/util_str.c b/source/lib/util_str.c
index 43e3224df42..a25043df789 100644
--- a/source/lib/util_str.c
+++ b/source/lib/util_str.c
@@ -1066,6 +1066,38 @@ void all_string_sub(char *s,const char *pattern,const char *insert)
/****************************************************************************
splits out the front and back at a separator.
****************************************************************************/
+void split_at_first_component(char *path, char *front, char sep, char *back)
+{
+ char *p = strchr(path, sep);
+
+ if (p != NULL)
+ {
+ *p = 0;
+ }
+ if (front != NULL)
+ {
+ pstrcpy(front, path);
+ }
+ if (p != NULL)
+ {
+ if (back != NULL)
+ {
+ pstrcpy(back, p+1);
+ }
+ *p = sep;
+ }
+ else
+ {
+ if (back != NULL)
+ {
+ back[0] = 0;
+ }
+ }
+}
+
+/****************************************************************************
+ splits out the front and back at a separator.
+****************************************************************************/
void split_at_last_component(char *path, char *front, char sep, char *back)
{
char *p = strrchr(path, sep);
@@ -1084,7 +1116,7 @@ void split_at_last_component(char *path, char *front, char sep, char *back)
{
pstrcpy(back, p+1);
}
- *p = '\\';
+ *p = sep;
}
else
{