summaryrefslogtreecommitdiffstats
path: root/source3/lib
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-07-08 16:02:19 +0200
committerMichael Adam <obnox@samba.org>2009-07-15 14:01:38 +0200
commit804d3f897be01e9088deefe807cd06fe194c5d58 (patch)
tree710acdaed9d47055a8c47301a5b8e88ba7a06f83 /source3/lib
parent5b594c695884aebdfbb199549901fea954122929 (diff)
downloadsamba-804d3f897be01e9088deefe807cd06fe194c5d58.tar.gz
samba-804d3f897be01e9088deefe807cd06fe194c5d58.tar.xz
samba-804d3f897be01e9088deefe807cd06fe194c5d58.zip
s3:dbwrap: add dbwrap_delete_bystring_upper()
To delete a key whose name is not given in but stored in uppercase. Michael
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/dbwrap_util.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c
index 67471b5c968..aca4b526974 100644
--- a/source3/lib/dbwrap_util.c
+++ b/source3/lib/dbwrap_util.c
@@ -340,3 +340,19 @@ NTSTATUS dbwrap_trans_do(struct db_context *db,
DEBUG(2, ("transaction_commit failed\n"));
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
+
+NTSTATUS dbwrap_delete_bystring_upper(struct db_context *db, const char *key)
+{
+ char *key_upper;
+ NTSTATUS status;
+
+ key_upper = talloc_strdup_upper(talloc_tos(), key);
+ if (key_upper == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ status = dbwrap_delete_bystring(db, key_upper);
+
+ talloc_free(key_upper);
+ return status;
+}