mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
tdb: don't alter errno on success of tdb_open_ex()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
b8f91696f5
commit
80dff80ee9
@ -170,6 +170,7 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td
|
|||||||
const struct tdb_logging_context *log_ctx,
|
const struct tdb_logging_context *log_ctx,
|
||||||
tdb_hash_func hash_fn)
|
tdb_hash_func hash_fn)
|
||||||
{
|
{
|
||||||
|
int orig_errno = errno;
|
||||||
struct tdb_header header;
|
struct tdb_header header;
|
||||||
struct tdb_context *tdb;
|
struct tdb_context *tdb;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
@ -489,6 +490,7 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td
|
|||||||
}
|
}
|
||||||
tdb->next = tdbs;
|
tdb->next = tdbs;
|
||||||
tdbs = tdb;
|
tdbs = tdb;
|
||||||
|
errno = orig_errno;
|
||||||
return tdb;
|
return tdb;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user