mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
r24655: Fix bug 4919 reported by Matthias Wallnöfer <mwallnoefer@yahoo.de>:
> When you change to the SAMBA private directory on a shell (default
> /usr/local/samba/private) and start there for example ldbedit with the sam.ldb,
> the application crashes if you don't put the "./" before the filename.
I've adapted Matthias's patch.
Andrew Bartlett
(This used to be commit ba82197e30
)
This commit is contained in:
parent
7663475111
commit
67729cf71f
@ -722,11 +722,10 @@ static const char *relative_path(struct ldb_module *module,
|
||||
}
|
||||
if ( (p = strrchr(path, '/')) != NULL) {
|
||||
p[0] = '\0';
|
||||
full_name = talloc_asprintf(mem_ctx, "%s/%s", path, name);
|
||||
} else {
|
||||
talloc_free(path);
|
||||
return NULL;
|
||||
full_name = talloc_asprintf(mem_ctx, "./%s", name);
|
||||
}
|
||||
full_name = talloc_asprintf(mem_ctx, "%s/%s", path, name);
|
||||
talloc_free(path);
|
||||
return full_name;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user