bool delete_share_security(const char *servicename) { TDB_DATA kbuf; char *key; NTSTATUS status; if (!share_info_db_init()) { return False; } if (!(key = talloc_asprintf(talloc_tos(), "SECDESC/%s", servicename))) { return False; } kbuf = string_term_tdb_data(key); status = dbwrap_trans_delete(share_db, kbuf); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("delete_share_security: Failed to delete entry for " "share %s: %s\n", servicename, nt_errstr(status))); return False; } return True; }
bool delete_share_security(const char *servicename) { TDB_DATA kbuf; char *key; NTSTATUS status; char *c_servicename = canonicalize_servicename(talloc_tos(), servicename); if (!c_servicename) { return NULL; } if (!share_info_db_init()) { TALLOC_FREE(c_servicename); return False; } if (!(key = talloc_asprintf(talloc_tos(), SHARE_SECURITY_DB_KEY_PREFIX_STR "%s", c_servicename))) { TALLOC_FREE(c_servicename); return False; } kbuf = string_term_tdb_data(key); status = dbwrap_trans_delete(share_db, kbuf); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("delete_share_security: Failed to delete entry for " "share %s: %s\n", c_servicename, nt_errstr(status))); TALLOC_FREE(c_servicename); return False; } TALLOC_FREE(c_servicename); return True; }
/* delete a secets database entry */ bool secrets_delete(const char *key) { NTSTATUS status; if (!secrets_init()) { return false; } status = dbwrap_trans_delete(db_ctx, string_tdb_data(key)); return NT_STATUS_IS_OK(status); }
static bool group_map_remove(const struct dom_sid *sid) { char *key; NTSTATUS status; key = group_mapping_key(talloc_tos(), sid); if (key == NULL) { return false; } status = dbwrap_trans_delete(db, string_term_tdb_data(key)); TALLOC_FREE(key); return NT_STATUS_IS_OK(status); }
NTSTATUS dbwrap_trans_delete_bystring(struct db_context *db, const char *key) { return dbwrap_trans_delete(db, string_term_tdb_data(key)); }