diff options
author | Michael Adam <obnox@samba.org> | 2011-08-24 13:08:13 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-10-11 14:17:56 +0200 |
commit | 0e28448a780cf231ae38fe03a85cf6e1ea9dded0 (patch) | |
tree | 91878c39866520bc06d968cd44cd8a86995cc8ad /source3/passdb | |
parent | 25a9978c2c4d00eb64b212170f64f5cc136e032a (diff) | |
download | samba-0e28448a780cf231ae38fe03a85cf6e1ea9dded0.tar.gz samba-0e28448a780cf231ae38fe03a85cf6e1ea9dded0.tar.bz2 samba-0e28448a780cf231ae38fe03a85cf6e1ea9dded0.zip |
s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and dbwrap_fetch_bystring_upper() to NTSTATUS
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/pdb_tdb.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index 32051b198a..3ecb31d88e 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -537,6 +537,7 @@ static NTSTATUS tdbsam_getsampwnam (struct pdb_methods *my_methods, TDB_DATA data; fstring keystr; fstring name; + NTSTATUS status; if ( !user ) { DEBUG(0,("pdb_getsampwnam: struct samu is NULL.\n")); @@ -559,8 +560,8 @@ static NTSTATUS tdbsam_getsampwnam (struct pdb_methods *my_methods, /* get the record */ - data = dbwrap_fetch_bystring(db_sam, talloc_tos(), keystr); - if (!data.dptr) { + status = dbwrap_fetch_bystring(db_sam, talloc_tos(), keystr, &data); + if (!NT_STATUS_IS_OK(status)) { DEBUG(5,("pdb_getsampwnam (TDB): error fetching database.\n")); DEBUGADD(5, (" Key: %s\n", keystr)); return NT_STATUS_NO_SUCH_USER; @@ -611,10 +612,10 @@ static NTSTATUS tdbsam_getsampwrid (struct pdb_methods *my_methods, /* get the record */ - data = dbwrap_fetch_bystring(db_sam, talloc_tos(), keystr); - if (!data.dptr) { + nt_status = dbwrap_fetch_bystring(db_sam, talloc_tos(), keystr, &data); + if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(5,("pdb_getsampwrid (TDB): error looking up RID %d by key %s.\n", rid, keystr)); - return NT_STATUS_UNSUCCESSFUL; + return nt_status; } fstrcpy(name, (const char *)data.dptr); |