CN110851405A - File path determination method, device, equipment and readable storage medium - Google Patents

File path determination method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN110851405A
CN110851405A CN201911127748.7A CN201911127748A CN110851405A CN 110851405 A CN110851405 A CN 110851405A CN 201911127748 A CN201911127748 A CN 201911127748A CN 110851405 A CN110851405 A CN 110851405A
Authority
CN
China
Prior art keywords
directory entry
btrfs
determining
file
mount point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911127748.7A
Other languages
Chinese (zh)
Other versions
CN110851405B (en
Inventor
孟祥飞
范渊
黄进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Dbappsecurity Technology Co Ltd
Original Assignee
Hangzhou Dbappsecurity Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Dbappsecurity Technology Co Ltd filed Critical Hangzhou Dbappsecurity Technology Co Ltd
Priority to CN201911127748.7A priority Critical patent/CN110851405B/en
Publication of CN110851405A publication Critical patent/CN110851405A/en
Application granted granted Critical
Publication of CN110851405B publication Critical patent/CN110851405B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a file path determining method, a file path determining device, file path determining equipment and a readable storage medium. The method disclosed by the application comprises the following steps: if a request for accessing a target file in the btrfs file system is intercepted, determining a directory entry of the target file and a parent directory entry of the directory entry; determining a btrfs structure body corresponding to the parent directory item by using the identification information of the parent directory item; inquiring a mount point of a parent directory entry in a btrfs structure; if the mount point is inquired in the btrfs file system, the absolute path of the target file is determined according to the mount point and the directory entry. According to the method and the device, the mount point of the accessed file is determined by the btrfs structure, the absolute path of the accessed file in the btrfs file system can be accurately determined, so that the webpage tamper-resistant system is suitable for the btrfs file system, and the expandability and the universality of the webpage tamper-resistant system are improved. Accordingly, the file path determining device, the equipment and the readable storage medium disclosed by the application also have the technical effects.

Description

File path determination method, device, equipment and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for determining a file path.
Background
Along with the construction and popularization of various portal websites, the safety problem in the website construction process is increasingly highlighted. The webpage tamper-proofing system is created for solving the security problem of the portal website, and can effectively protect the webpage from being illegally tampered. The webpage tamper-proofing system comprises two parts: a driver and an application. The driver is used for capturing the absolute path of the currently accessed file and transmitting the absolute path of the file to the application program; the application program is used for analyzing and judging the absolute path of the file so as to determine whether the current access operation is continuously executed or intercepted, and transmitting a judgment result to the driver program for execution.
The process of capturing the absolute path of the file by the driver in the webpage tamper-resistant system is as follows: and acquiring a directory entry of the accessed file, and further determining a super _ block corresponding to the directory entry. Since one super _ block in the ext4 file system corresponds to one mount point, the mount point of the currently accessed file can be determined based on the super _ block, and the absolute path of the currently accessed file can be determined according to the mount point and the directory entry. The driver firstly needs to determine the mount point of the currently accessed file according to the super _ block, and then can further determine the absolute path of the accessed file.
It should be noted that the existing web page tamper-resistant system only supports the ext4 file system, and the universality of the web page tamper-resistant system is poor. If the existing webpage tamper-resistant system is applied to the btrfs file system, the btrfs file system comprises a plurality of sub-volumes, one sub-volume corresponds to one mount point, but the plurality of sub-volumes correspond to one super _ block. Therefore, a driver in the existing webpage tamper-resistant system cannot accurately determine a mount point based on the super _ block, and thus the determined absolute path is also wrong.
Therefore, how to make a webpage tamper-resistant system accurately determine the absolute path of an accessed file in a btrfs file system is a problem to be solved by those skilled in the art.
Disclosure of Invention
In view of the above, an object of the present application is to provide a file path determining method, apparatus, device and readable storage medium, so that a webpage tamper-resistant system can accurately determine an absolute path of an accessed file in a btrfs file system. The specific scheme is as follows:
in a first aspect, the present application provides a file path determining method, including:
if a request for accessing a target file in the btrfs file system is intercepted, determining a directory entry of the target file and a parent directory entry of the directory entry;
determining a btrfs structure body corresponding to the parent directory item by using the identification information of the parent directory item;
inquiring a mount point of a parent directory entry in a btrfs structure;
if the mount point is inquired in the btrfs file system, the absolute path of the target file is determined according to the mount point and the directory entry.
Preferably, querying the mount point of the parent directory entry in the btrfs structure includes:
querying a vfs _ inode and a btrfs _ root in a btrfs structure;
calculating a second address of btrfs _ root according to the first address of the vfs _ inode and the offset; the offset is an offset of the first address and the second address;
and inquiring the root value according to the second address, and determining a mounting point according to the inquired root value.
Preferably, if the mount point is queried in the btrfs file system, determining an absolute path of the target file according to the mount point and the directory entry includes:
if the root value is inquired in the btrfs file system, determining an absolute path of the target file according to the root value and the directory entry; the root value is an identifier of the mount point.
Preferably, if a root value is queried in the btrfs file system, determining an absolute path of the target file according to the root value and the directory entry includes:
and traversing the root value of each mounting point in the btrfs file system, and determining the absolute path of the target file according to the traversed root value and the directory entry.
Preferably, determining the directory entry of the target file, and the parent directory entry of the directory entry, comprises:
directory entries are determined, and fields of parent directory entries are queried in directory entries to determine parent directory entries.
Preferably, after determining the absolute path of the target file according to the mount point and the directory entry, the method further includes:
the absolute path is transmitted to the user-mode application program so that the user-mode application program returns the requested access control result.
Preferably, requests to access a target file in the btrfs file system are intercepted using the LSM.
In a second aspect, the present application provides a file path determining apparatus, including:
the first determining module is used for determining a directory entry of a target file and a parent directory entry of the directory entry if a request for accessing the target file in the btrfs file system is intercepted;
the second determining module is used for determining a btrfs structure corresponding to the parent directory entry by using the identification information of the parent directory entry;
the query module is used for querying the mount point of the parent directory entry in the btrfs structure;
and the third determining module is used for determining the absolute path of the target file according to the mount point and the directory entry if the mount point is inquired in the btrfs file system.
In a third aspect, the present application provides a file path determining apparatus, including:
a memory for storing a computer program;
a processor for executing a computer program to implement the file path determining method disclosed in the foregoing.
In a fourth aspect, the present application provides a readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the file path determination method disclosed in the foregoing.
According to the scheme, the file path determining method comprises the following steps: if a request for accessing a target file in the btrfs file system is intercepted, determining a directory entry of the target file and a parent directory entry of the directory entry; determining a btrfs structure body corresponding to the parent directory item by using the identification information of the parent directory item; inquiring a mount point of a parent directory entry in a btrfs structure; if the mount point is inquired in the btrfs file system, the absolute path of the target file is determined according to the mount point and the directory entry.
It can be seen that, when intercepting a request for accessing a target file in a btrfs file system, the method first determines a directory entry of the target file and a parent directory entry of the directory entry; determining a btrfs structure corresponding to the parent directory item by using the identification information of the parent directory item; further inquiring the mount point of the father directory entry in the btrfs structure; if the mount point is inquired in the btrfs file system, the absolute path of the target file is determined according to the mount point and the directory entry. The mounting point of the accessed file is determined by the btrfs structure based on the characteristics of the btrfs file system, so that the absolute path of the accessed file in the btrfs file system can be accurately determined, the webpage tamper-resistant system is suitable for the btrfs file system, help is provided for normal operation of the webpage tamper-resistant system in the btrfs file system, and the expandability and the universality of the webpage tamper-resistant system are improved.
Accordingly, the file path determining device, the equipment and the readable storage medium provided by the application also have the technical effects.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of a file path determination method disclosed herein;
FIG. 2 is a schematic diagram of a document path determination process disclosed herein;
FIG. 3 is a schematic diagram of another document path determination process disclosed herein;
FIG. 4 is a schematic diagram of a document path determining apparatus according to the present disclosure;
fig. 5 is a schematic diagram of a file path determining apparatus disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Currently, existing webpage tamper-resistant systems only support the ext4 file system. Therefore, the file path determining scheme is provided, the webpage tamper-proofing system can be suitable for a btrfs file system, and the expandability and the universality of the webpage tamper-proofing system are improved.
Referring to fig. 1, an embodiment of the present application discloses a file path determining method, including:
s101, if a request for accessing a target file in a btrfs file system is intercepted, determining a directory item of the target file and a parent directory item of the directory item;
in one embodiment, determining the directory entry of the target file and the parent directory entry of the directory entry comprises: a directory entry (entry) is determined and a field (d _ parent field) of the parent directory entry is looked up in the directory entry to determine the parent directory entry (parent).
In this embodiment, a request to access a target file in the btrfs file system may be intercepted using LSM. Lsm (linux security module) is a linux security module, which is a lightweight universal access control framework and is suitable for various access control models.
S102, determining a btrfs structure corresponding to the parent directory item by using the identification information of the parent directory item;
wherein, btrfs structure includes: vfs _ inode and btrfs _ root.
S103, inquiring a mount point of a parent directory entry in the btrfs structure;
in one embodiment, querying a mount point for a parent directory entry in a btrfs structure comprises: querying a vfs _ inode and a btrfs _ root in a btrfs structure; calculating a second address of btrfs _ root according to the first address of the vfs _ inode and the offset; the offset is an offset of a first address (memory address) and a second address (memory address); and inquiring the root value according to the second address, and determining a mounting point according to the inquired root value.
It should be noted that each mounting point can be represented by a root value therein, and thus the root value can be regarded as an identifier of the mounting point.
S104, if the mount point is inquired in the btrfs file system, determining the absolute path of the target file according to the mount point and the directory entry.
In one embodiment, if a mount point is queried in the btrfs file system, determining an absolute path of the target file according to the mount point and the directory entry includes: if the root value is inquired in the btrfs file system, determining an absolute path of the target file according to the root value and the directory entry; the root value is an identifier of the mount point.
If the root value is inquired in the btrfs file system, determining the absolute path of the target file according to the root value and the directory entry, wherein the method comprises the following steps: and traversing the root value of each mounting point in the btrfs file system, and determining the absolute path of the target file according to the traversed root value and the directory entry.
When a mount point is queried in a btrfs file system, a traversal algorithm can be employed. Before the webpage tamper-resistant system is applied to the btrfs file system, root values of all mount points in the btrfs file system are stored in a global variable, so that when the root value of each mount point in the btrfs file system is traversed, the root values stored in the global variable can be directly traversed.
In a specific embodiment, after determining the absolute path of the target file according to the mount point and the directory entry, the method further includes: the absolute path is transmitted to the user-mode application program so that the user-mode application program returns the requested access control result. And the access control result returned by the user mode application program is an interception request or an allowance request to continue executing. The method disclosed by the embodiment can be applied to a driver in a webpage tamper-resistant system, and when the driver receives an access control result returned by a user mode application program, the current request can be controlled according to the control result.
It can be seen that, when a request for accessing a target file in a btrfs file system is intercepted, a directory entry of the target file and a parent directory entry of the directory entry are determined first; determining a btrfs structure corresponding to the parent directory item by using the identification information of the parent directory item; further inquiring the mount point of the father directory entry in the btrfs structure; if the mount point is inquired in the btrfs file system, the absolute path of the target file is determined according to the mount point and the directory entry. The mounting point of the accessed file is determined by the btrfs structure based on the characteristics of the btrfs file system, so that the absolute path of the accessed file in the btrfs file system can be accurately determined, the webpage tamper-resistant system is suitable for the btrfs file system, help is provided for normal operation of the webpage tamper-resistant system in the btrfs file system, and the expandability and the universality of the webpage tamper-resistant system are improved.
If the method provided by the application is implemented in a driver in a webpage tamper-resistant system, an example can be implemented, which includes an initialization phase and a driver interception event phase.
An initialization stage:
when a driver in the webpage tamper-resistant system is loaded to an initial process of a kernel, the driver traverses all mount points in the btrfs file system, and stores information such as a root value of each mount point into a global variable, wherein the information to be stored can refer to the following contents:
Figure BDA0002277387320000061
btrfs _ root in the btrfs file system is the unique identification of mount point, and mnt _ sb in the ext4 file system is the unique identification of mount point. The saved mounting point information is used in a later driver interception event stage and used for determining the mounting point according to the unique identifier.
Driver intercept event phase:
after intercepting the file operation event, the driver acquires a directory entry (entry) of the accessed file from the file operation event, and at this time, an inode of the directory entry is not created yet, so that a parent directory entry of the directory entry needs to be determined to determine the inode. It should be noted that the directory entry and its parent directory entry are necessarily mounted at the same mounting point, so that the directory entry mounting point can also be determined by its parent directory entry.
The process of determining the parent directory entry of the directory entry and the identification information of the parent directory entry is as follows: retrieving a parent directory entry through the d _ parent field in the directory entry; the parent inode (identification information of the parent directory entry) is obtained through the d _ inode (identification information of the directory entry) field in the entry.
Since the identification information of the parent directory entry corresponds to the identification information of the btrfs structure, the btrfs structure corresponding to the parent directory entry can be determined based on the identification information of the parent directory entry. The btrfs structure is a btrfs _ inode structure, and the btrfs _ inode structure comprises: btrfs _ root and vfs _ inode. The memory addresses of btrfs _ root and vfs _ inode are offset, so that one memory address can be calculated based on the other memory address and the offset. The root value in btrfs _ root determined according to the storage address is the identifier of the mount point of the parent directory entry, so that the mount point of the parent directory entry can be determined, and the mount point of the directory entry is determined. Then, the absolute path of the currently accessed file can be determined according to the mounting point and the directory entry.
The file path determining method provided by the present embodiment can be seen in fig. 2 and 3.
In fig. 2, a file operation is intercepted first to obtain a file dentry, and then a btrfs _ root to which the file belongs is obtained, then a mount point is searched in mount point information saved in initialization according to the btrfs _ root, and finally an absolute path of the file can be obtained according to the mount point and the dentry. Mount in fig. 2 represents Mount point, where Mnt _ sb represents super block corresponding to current Mount point; btrfs _ root represents Btrfs root corresponding to the current mounting point; path represents the Path corresponding to the current mount point. The mounting point information saved in the initialization includes information of all mounting points in the btrfs file system.
In fig. 3, first, a parent entry is obtained through a d _ parent field in the entry of the file, and then a parent inode is obtained through a d _ inode field in the parent entry; and determining a btrfs _ inode according to the parent _ inode, determining a root value according to a btrfs _ root and a vfs _ inode in the btrfs _ inode structure, and determining a mount point of the parent directory entry according to the root value in the btrfs _ root as an identifier of the mount point of the parent directory entry, thus determining the mount point of the parent directory entry. Then, the absolute path of the currently accessed file can be determined according to the mounting point and the directory entry. And determining a super _ block corresponding to the current mounting point according to i _ sb in the parent _ inode, wherein s _ inode in the super _ block is an identifier of the super _ block.
It can be seen that, in this embodiment, when a driver in the webpage tamper-resistant system is loaded, all mount points in the btrfs file system are traversed, and basic information of each mount point is recorded. If the mounting point is a sub-volume, recording field information such as a super _ block, a mounting point name, a sub-volume root node, a mounting path and the like; if the volume is not the sub volume, field information such as a super _ block, a mounting point name, a mounting path and the like is recorded. And then after the LSM intercepts a file operation event, determining a parent dentry of the current file through the dentry of the current file, determining a btrfs structural body through identification information of the parent dentry, determining a root value in the btrfs structural body, determining a mount point based on the root value, and then obtaining an absolute path of the file according to the dentry and the mount point.
In the following, a file path determining apparatus provided by an embodiment of the present application is introduced, and a file path determining apparatus described below and a file path determining method described above may be referred to each other.
Referring to fig. 4, an embodiment of the present application discloses a file path determining apparatus, including:
a first determining module 401, configured to determine a directory entry of a target file and a parent directory entry of the directory entry if a request for accessing the target file in the btrfs file system is intercepted;
a second determining module 402, configured to determine, by using the identification information of the parent directory entry, a btrfs structure corresponding to the parent directory entry;
the query module 403 is configured to query mount points of parent directory entries in the btrfs structure;
a third determining module 404, configured to determine an absolute path of the target file according to the mount point and the directory entry if the mount point is found in the btrfs file system.
In one embodiment, the query module comprises:
the first query unit is used for querying the vfs _ inode and the btrfs _ root in the btrfs structure;
a calculation unit, configured to calculate a second address of btrfs _ root according to the first address of vfs _ inode and the offset; the offset is an offset of the first address and the second address;
and the second query unit is used for querying the root value according to the second address and determining the mounting point according to the queried root value.
In a specific embodiment, the third determining module is specifically configured to:
if the root value is inquired in the btrfs file system, determining an absolute path of the target file according to the root value and the directory entry; the root value is an identifier of the mount point.
In a specific embodiment, the third determining module is specifically configured to:
and traversing the root value of each mounting point in the btrfs file system, and determining the absolute path of the target file according to the traversed root value and the directory entry.
In a specific embodiment, the first determining module is specifically configured to:
directory entries are determined, and fields of parent directory entries are queried in directory entries to determine parent directory entries.
In a specific embodiment, the method further comprises the following steps:
and the transmission module is used for transmitting the absolute path to the user mode application program so that the user mode application program can return the requested access control result.
In one embodiment, a request to access a target file in a btrfs file system is intercepted using an LSM.
For more specific working processes of each module and unit in this embodiment, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not described here again.
Therefore, the embodiment provides a file path determining device, which determines a mount point of an accessed file by using a btrfs structure based on the characteristics of a btrfs file system, so that an absolute path of the accessed file in the btrfs file system can be accurately determined, a webpage tamper-resistant system is suitable for the btrfs file system, help is provided for normal operation of the webpage tamper-resistant system in the btrfs file system, and expandability and universality of the webpage tamper-resistant system are improved.
In the following, a file path determining device provided in an embodiment of the present application is introduced, and a file path determining device described below and a file path determining method and device described above may be referred to each other.
Referring to fig. 5, an embodiment of the present application discloses a file path determining apparatus, including:
a memory 501 for storing a computer program;
a processor 502 for executing the computer program to implement the method disclosed in any of the embodiments above.
In the following, a readable storage medium provided by an embodiment of the present application is introduced, and a readable storage medium described below and a file path determining method, apparatus, and device described above may be referred to each other.
A readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the file path determining method disclosed in the foregoing embodiments. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which are not described herein again.
References in this application to "first," "second," "third," "fourth," etc., if any, are intended to distinguish between similar elements and not necessarily to describe a particular order or sequence. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, or apparatus.
It should be noted that the descriptions in this application referring to "first", "second", etc. are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of readable storage medium known in the art.
The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for determining a file path, comprising:
if a request for accessing a target file in a btrfs file system is intercepted, determining a directory entry of the target file and a parent directory entry of the directory entry;
determining a btrfs structure corresponding to the parent directory entry by using the identification information of the parent directory entry;
querying a mount point of the parent directory entry in the btrfs structure;
and if the mount point is inquired in the btrfs file system, determining an absolute path of the target file according to the mount point and the directory entry.
2. The method of claim 1, wherein querying the btrfs structure for a mount point of the parent directory entry comprises:
querying a vfs _ inode and a btrfs _ root in the btrfs structural body;
calculating a second address of the btrfs _ root according to the first address and the offset of the vfs _ inode; the offset is an offset of the first address and the second address;
and inquiring a root value according to the second address, and determining the mounting point according to the inquired root value.
3. The method of claim 2, wherein determining the absolute path of the target file according to the mount point and the directory entry if the mount point is queried in the btrfs file system comprises:
if the root value is inquired in the btrfs file system, determining an absolute path of the target file according to the root value and the directory entry; the root value is an identifier of the mount point.
4. The method of claim 3, wherein determining the absolute path of the target file according to the root value and the directory entry if the root value is queried in the btrfs file system comprises:
and traversing the root value of each mounting point in the btrfs file system, and determining the absolute path of the target file according to the traversed root value and the directory entry.
5. The method of claim 1, wherein determining the directory entry of the target file and the parent directory entry of the directory entry comprises:
determining the directory entry, querying a field of the parent directory entry in the directory entry to determine the parent directory entry.
6. The method according to any one of claims 1 to 5, wherein after determining the absolute path of the target file according to the mount point and the directory entry, the method further comprises:
and transmitting the absolute path to a user mode application program so that the user mode application program returns the requested access control result.
7. The file path determination method of claim 1 wherein a request to access a target file in a btrfs file system is intercepted using LSM.
8. A file path determination apparatus, comprising:
the system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for determining a directory entry of a target file and a parent directory entry of the directory entry if a request for accessing the target file in a btrfs file system is intercepted;
the second determining module is used for determining a btrfs structure corresponding to the parent directory entry by using the identification information of the parent directory entry;
the query module is used for querying the mount point of the parent directory entry in the btrfs structure;
and the third determining module is used for determining the absolute path of the target file according to the mount point and the directory entry if the mount point is inquired in the btrfs file system.
9. A file path determining apparatus, characterized by comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the file path determination method of any one of claims 1 to 7.
10. A readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the file path determining method according to any one of claims 1 to 7.
CN201911127748.7A 2019-11-18 2019-11-18 File path determination method, device, equipment and readable storage medium Active CN110851405B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911127748.7A CN110851405B (en) 2019-11-18 2019-11-18 File path determination method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911127748.7A CN110851405B (en) 2019-11-18 2019-11-18 File path determination method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN110851405A true CN110851405A (en) 2020-02-28
CN110851405B CN110851405B (en) 2022-03-08

Family

ID=69601999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911127748.7A Active CN110851405B (en) 2019-11-18 2019-11-18 File path determination method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN110851405B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035888A (en) * 2020-09-01 2020-12-04 杭州安恒信息安全技术有限公司 File path determining method, device and medium based on webpage tamper-proof system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5574903A (en) * 1994-05-13 1996-11-12 Apple Computer, Inc. Method and apparatus for handling request regarding information stored in a file system
WO2010050944A1 (en) * 2008-10-30 2010-05-06 Hewlett-Packard Development Company, L.P. Online checking of data structures of a file system
CN104766025A (en) * 2015-03-23 2015-07-08 中国人民解放军信息工程大学 Mimicry tamper-proof method of distributed file system
CN105589964A (en) * 2015-12-23 2016-05-18 浪潮(北京)电子信息产业有限公司 Method and system for remotely mounting file
CN108875370A (en) * 2017-05-15 2018-11-23 南京大学 Linux file system integrity verification method based on static data reference chain
CN109240989A (en) * 2018-09-07 2019-01-18 深圳市万普拉斯科技有限公司 File object querying method, device, terminal device and readable storage medium storing program for executing
CN110008703A (en) * 2019-04-08 2019-07-12 四川大学 Malware static detection system and method in a kind of container
CN110347656A (en) * 2019-06-27 2019-10-18 苏州浪潮智能科技有限公司 The management method and device requested in document storage system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5574903A (en) * 1994-05-13 1996-11-12 Apple Computer, Inc. Method and apparatus for handling request regarding information stored in a file system
WO2010050944A1 (en) * 2008-10-30 2010-05-06 Hewlett-Packard Development Company, L.P. Online checking of data structures of a file system
CN104766025A (en) * 2015-03-23 2015-07-08 中国人民解放军信息工程大学 Mimicry tamper-proof method of distributed file system
CN105589964A (en) * 2015-12-23 2016-05-18 浪潮(北京)电子信息产业有限公司 Method and system for remotely mounting file
CN108875370A (en) * 2017-05-15 2018-11-23 南京大学 Linux file system integrity verification method based on static data reference chain
CN109240989A (en) * 2018-09-07 2019-01-18 深圳市万普拉斯科技有限公司 File object querying method, device, terminal device and readable storage medium storing program for executing
CN110008703A (en) * 2019-04-08 2019-07-12 四川大学 Malware static detection system and method in a kind of container
CN110347656A (en) * 2019-06-27 2019-10-18 苏州浪潮智能科技有限公司 The management method and device requested in document storage system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
MOHAMAD AHTISHAM WANI 等: ""An analysis of anti-forensic capabilities of B-tree file system (Btrfs)"", 《HTTPS://WWWTANDFONLINE.FENSHISHANG.COM/DOI/ABS/10.1080/00450618.2018.1533038》 *
侯昱珂: "Linux系统访问控制文件系统", 《电脑编程技巧与维护》 *
哆先生: ""btrfs文件系统详解及使用"", 《HTTPS://BLOG.51CTO.COM/U_11970509/2316898》 *
流云863: ""BT的文件系统btrfs"", 《HTTPS://BLOG.51CTO.COM/FALLCAMEL/1692538》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035888A (en) * 2020-09-01 2020-12-04 杭州安恒信息安全技术有限公司 File path determining method, device and medium based on webpage tamper-proof system

Also Published As

Publication number Publication date
CN110851405B (en) 2022-03-08

Similar Documents

Publication Publication Date Title
CN107948314B (en) Business processing method and device based on rule file and server
JP4726545B2 (en) Method, system and apparatus for discovering and connecting data sources
CN110046133B (en) Metadata management method, device and system for storage file system
CN109474640B (en) Malicious crawler detection method and device, electronic equipment and storage medium
US20070294203A1 (en) Search early warning
US20100312749A1 (en) Scalable lookup service for distributed database
CN103747072A (en) Data reading and writing method and application server
CN109120709A (en) A kind of caching method, device, equipment and medium
US20090164738A1 (en) Process Based Cache-Write Through For Protected Storage In Embedded Devices
CN108256014B (en) Page display method and device
US20200036812A1 (en) Resource Download Method, Electronic Device, and Apparatus
CN109298987B (en) Method and device for detecting running state of web crawler
CN109634753B (en) Data processing method, device, terminal and storage medium for switching browser kernels
US7529750B2 (en) Accessing information on a network
CN110851405B (en) File path determination method, device, equipment and readable storage medium
CN112600797A (en) Method and device for detecting abnormal access behavior, electronic equipment and storage medium
CN108154024B (en) Data retrieval method and device and electronic equipment
CN114745356A (en) Domain name resolution method, device and equipment and readable storage medium
CN108696562A (en) A kind of method and device obtaining site resource
CN109600272B (en) Crawler detection method and device
CN107704464B (en) Method and device for analyzing path of static resource
CN105243134B (en) A kind of method and apparatus handling browser of being held as a hostage
US20110270803A1 (en) Cloud Commands
US20030145087A1 (en) Generating a list of addresses in a server
CN108255878B (en) User information processing method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant