svn commit: samba r17550 - in branches/SAMBA_3_0/source: groupdb lib
vlendec at samba.org
vlendec at samba.org
Tue Aug 15 08:05:53 GMT 2006
Author: vlendec
Date: 2006-08-15 08:05:52 +0000 (Tue, 15 Aug 2006)
New Revision: 17550
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17550
Log:
Fix a few bugs in the tdb_multikey code. Thanks to tridge for pointing them
out.
Volker
Modified:
branches/SAMBA_3_0/source/groupdb/mapping.c
branches/SAMBA_3_0/source/lib/tdb_multikey.c
Changeset:
Modified: branches/SAMBA_3_0/source/groupdb/mapping.c
===================================================================
--- branches/SAMBA_3_0/source/groupdb/mapping.c 2006-08-15 06:03:13 UTC (rev 17549)
+++ branches/SAMBA_3_0/source/groupdb/mapping.c 2006-08-15 08:05:52 UTC (rev 17550)
@@ -95,10 +95,10 @@
return NULL;
}
- result[KEYNUM_SID] = talloc_strdup(mem_ctx,
+ result[KEYNUM_SID] = talloc_strdup(result,
sid_string_static(&mapp->sid));
- result[KEYNUM_NAME] = talloc_strdup(mem_ctx, mapp->nt_name);
- result[KEYNUM_GID] = talloc_asprintf(mem_ctx, "%d", (int)mapp->gid);
+ result[KEYNUM_NAME] = talloc_strdup(result, mapp->nt_name);
+ result[KEYNUM_GID] = talloc_asprintf(result, "%d", (int)mapp->gid);
result[3] = NULL;
if ((result[0] == NULL) || (result[1] == NULL) ||
@@ -109,7 +109,7 @@
}
/* name lookups are case insensitive, store the key in upper case */
- strupper_m(result[1]);
+ strupper_m(result[KEYNUM_NAME]);
return result;
}
Modified: branches/SAMBA_3_0/source/lib/tdb_multikey.c
===================================================================
--- branches/SAMBA_3_0/source/lib/tdb_multikey.c 2006-08-15 06:03:13 UTC (rev 17549)
+++ branches/SAMBA_3_0/source/lib/tdb_multikey.c 2006-08-15 08:05:52 UTC (rev 17550)
@@ -159,7 +159,7 @@
if (data.dptr == NULL) {
DEBUG(1, ("Did not find record %s for key %s\n",
prim.dptr, key.dptr));
- status = NT_STATUS_INTERNAL_DB_CORRUPTION;
+ status = NT_STATUS_NOT_FOUND;
goto fail;
}
More information about the samba-cvs
mailing list