From 0f9b28e93777059737f00b03b14a15e21f868bde Mon Sep 17 00:00:00 2001 From: waterwin Date: Thu, 11 Aug 2022 14:43:06 +0800 Subject: [PATCH] hmdfs: change configfs node bid to appid ohos inclusion category: bugfix issue: #I5LP9F CVE: NA ---------------------------------------------- change configfs node bid to apid making it compatible Signed-off-by: waterwin --- fs/hmdfs/authority/config.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/fs/hmdfs/authority/config.c b/fs/hmdfs/authority/config.c index 2daadd40704e..df827b7d1e71 100644 --- a/fs/hmdfs/authority/config.c +++ b/fs/hmdfs/authority/config.c @@ -12,9 +12,6 @@ #include #include "hmdfs.h" -#define UID_ATTR_TYPE 0 -#define GID_ATTR_TYPE 1 - static struct kmem_cache *hmdfs_bid_entry_cachep; struct hmdfs_bid_entry { @@ -266,10 +263,10 @@ static struct configfs_attribute hmdfs_##_attr_##_attr = { \ .store = hmdfs_##_attr_##_store, \ }; -HMDFS_BUNDLE_ATTRIBUTE(bid) +HMDFS_BUNDLE_ATTRIBUTE(appid) static struct configfs_attribute *hmdfs_battrs[] = { - &hmdfs_bid_attr, + &hmdfs_appid_attr, NULL, }; @@ -280,8 +277,8 @@ static void hmdfs_config_bitem_release(struct config_item *item) hmdfs_info("release bundle item"); bitem = container_of(item, struct hmdfs_config_bitem, item); - remove_bid_hash_entry(&bitem->str); - remove_bid_hash_entry(&bitem->str); + remove_appid_hash_entry(&bitem->str); + remove_appid_hash_entry(&bitem->str); free_bitem(bitem); } @@ -336,7 +333,7 @@ static struct configfs_subsystem hmdfs_subsystem = { int get_bid(const char *bname) { - return hmdfs_bid_get(bname); + return hmdfs_appid_get(bname); } int __init hmdfs_init_configfs(void) @@ -371,7 +368,7 @@ void hmdfs_exit_configfs(void) hmdfs_info("hmdfs exit configfs"); configfs_unregister_subsystem(&hmdfs_subsystem); - clear_bid_hash_entry(); + clear_appid_hash_entry(); kmem_cache_destroy(hmdfs_bid_entry_cachep); } \ No newline at end of file -- Gitee