1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-12 12:23:50 +03:00

changed syntax of registry commands so keys can start with HKLM or HKU.

sorted lookupsids command
This commit is contained in:
Luke Leighton
-
parent a41defc367
commit 13a0ee851f
11 changed files with 454 additions and 307 deletions

View File

@@ -1024,3 +1024,34 @@ BOOL string_sub(char *s,char *pattern,char *insert)
return(ret);
}
/****************************************************************************
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);
if (p != NULL)
{
*p = 0;
}
if (front != NULL)
{
pstrcpy(front, path);
}
if (p != NULL)
{
if (back != NULL)
{
pstrcpy(back, p+1);
}
*p = '\\';
}
else
{
if (back != NULL)
{
back[0] = 0;
}
}
}