See also Fig. 2, different with the file system of aforementioned known Windows, the present invention mainly is the file system manager safe operation module 35 that embeds the safety operation document system that has the multi-user in original structure, when the user desires file in the accessing file system administration managers 30 by application program 40, must be earlier via above-mentioned file system manager safe operation module 35, determine its accessible path, system is shown to the user with this path more then.As for the inaccessible path of this user, system can't be shown to this user.
Core of the present invention is present in the virtual unit, virtual unit is the system module of a kind of Windows, the developer can utilize 32 the C language or the program compiler of compositional language, directly finish required virtual unit, can certainly utilize the combination of hardware or hardware and software to realize this virtual unit.In the process of Windows system start-up, VMM (virtual machine manager) understands all virtual unit graftabls of using, and calls its initialization procedure.Before all virtual unit initialization were finished, the Any user program can not called by system, so the time before the user can not utilize native system to pack into is carried out illegal access.After this virtual unit is loaded into system, will be present in the system, up to system finishing always.In the initialization procedure of the virtual unit of native system, can be by file system manager (IFSMGR, Installable File System Manager) a interface, multi-user's secure file system is embedded in the whole file system, thereby forms a new file system that has security function.This interface is specifically provided by file system manager (IFSMGR), and the title of interface is " IFSMgr_InstalI File System Api Hook ".This interface itself is to supply with concrete file system device, makes concrete file system the module's address of oneself can be offered file manager.Utilize this interface that the file system manager safe operation module of multi-user's file system is offered file manager in the present invention, thereby reach the purpose that is embedded in the file system manager and realizes monitoring all file operations.Multi-user's safety operation document system is exactly to utilize this safe operation module that the file operation in the system is monitored, and realizes the file operation in the system is managed, and makes each user access arrive one's own file and catalogue.
Above-mentioned interface " IFSMgr_Install File System API Hook " is defined as follows:
IFSMgr_Install?File?System?Api?Hook(pIFS?File?Hook?Func?Hook?Func);
Wherein, HookFunc is the function callback function, and it is defined as:
tyPedef?int(*plFS?File?Hook?Func)(pIFSFunc?pfn,int,fn,int?Drive,int?ResType,int?CodePage,pioreq?pir);
Above-mentioned pfn is that the next one of readjustment chain connects, and fn is a function number, and Driver is a logical DOS drives, and ResType is operated resource type, and CodePage is a code page, and pir is a functional parameter.
In native system, make amendment to the path in the functional parameter, call the next function of adjusting back in the chain with amended pir functional parameter then.
Embodiment 1
Multi-user's safety operation document system of the present invention includes system initialization, the user logins and three modules such as file access.
The virtual unit initialization module of above-mentioned multi-user's safety operation document system at first is described, this part is to operate when Windows 9x system bootstrap, whether it mainly is complete in order to judge the privately owned directory context of system, if finding has incomplete place, will carry out corresponding resuming work.Only installing first or user when reinstalling, the privately owned directory context of system can be complete.When system detects privately owned catalogue non-existent the time, just must be rebulid.Rebulid the security that privately owned catalogue can not have influence on system, because this situation just can take place when only installing in system, and all users also do not set up privately owned file when installing in system, so be unlikely to have influence on privately owned safety of files yet.
See also Fig. 3, the virtual unit initialization flow process system of multi-user's of the present invention safety operation document system comprises the following steps: (i) step 100, at first obtains user configured privately owned directory path; (ii) step 102 checks then whether the catalogue of depositing privately owned file exists, and does not then carry out next step if do not exist, otherwise proceeds to step 106; (iii) step 104 is set up in order to deposit the catalogue of privately owned file, carries out next step then; (iv) step 106 is connected to file system manager with the file access control module.
In above-mentioned flow process, deposit the title of catalogue of privately owned file and position and be when installing in system, by the setter appointment, after system start-up, this catalogue can become invisible, that is to say, the user of non-this catalogue will can't see the existence of this catalogue fully.
Behind the accessing operation of file, when the file in all systems is carried out access, all to pass through this module in the method surveillance of stating before use.This module checks at first whether the file of user access is present in the privately owned catalogue.Because all users' privately owned file all leaves appointed positions in, so as long as judge by the path of the file of access, whether the file that just can detect the access of user institute privately owned file.If what the user used is not privately owned file, then native system only need directly carry out file operation.If user's operation is privately owned file, then must be transformed into actual file to the file path of user's appointment and operate needed path, its method is that user name is added on the path of user's appointment, just user name is joined between privately owned file directory and other sub-directories.For example, privately owned file directory is " C: Personal ", the file path that user John imports into for " C: Personal Sub1 P101.bmp ", user name " John " will be added to during conversion between " C: Personal " and " Sub1 Pic1.bmp ", and form " C: Personal John Sub1 Pic.bmp ".
See also Fig. 4, the file access control flow of multi-user's of the present invention safety operation document system comprises the following steps: (i) at first, step 200, and when the user logined, system can obtain and the access request of Study document; (ii) follow, in step 202, judge that whether the path of importing into is positioned at privately owned catalogue, if then carry out next step, otherwise carry out step 208; (iii) step 204, system obtains current user name, carries out next step; (iv) step 206 after the increase user name, as the path of system file system view, proceeds to step 210 then in the path; (v) step 208 is directly used the path as the system file system view, the path imported into; (vi) step 210 uses the file request after changing to call the subsequent treatment module, finishes then.
The user of multi-user's safety operation document system logins part, mainly realizes the foundation of the file system environment when new user logined first.Judge whether newly user of a user, only need this user's of inquiry a privately owned catalogue whether to set up.If also do not set up, just represent that this user is for logining first.Be necessary for this user set up privately owned file directory this moment, and to be exactly privately owned directory path add user name in the path of this privately owned file directory.If through inquiry, privately owned file directory exists, then this part just can not done any operation, directly withdraws from.
See also Fig. 5, user's login process system of multi-user's of the present invention safety operation document system comprises the following steps: (i) at first, in step 300, and when the user logins, the user name that obtains logining; (ii) step 302 judges whether the privately owned catalogue of user's correspondence exists, if then finish, otherwise carries out next step; (iii) step 304, for the user sets up a privately owned catalogue, and directory name is identical with user name, finishes then.
Multi-user's file system has utilized the characteristic of user's login of Windows to determine user name.All use the people of Windows system all will carry out system login, to determine user name.Because user name does not have any special meaning in common Windows system, so generally speaking, the user of each using system uses same user name accessing system.But in multi-user's safe operation file system, user name relates to the file that the user can access, and this makes user name become a key, so when using multi-user's safe operation file system, different user must be with different user name accessing systems.
Native system provides the security of local access for each user, as long as the user with different user name accessing systems, just can deposit the privately owned file of oneself safely, and needn't worry that other users can check or damage privately owned file in system.The user will do be exactly privately owned document storage in the privately owned file directory of appointment.Be to use " C: Personal " to represent privately owned file directory in the above-described embodiments, the user not only can deposit file in this catalogue, can also be at its md down.Native system is by the method for file system mapping, makes each user can only see in the privately owned file directory file of oneself.Through planting method thus, the privately owned safety of files of user can be protected, and is different with the method for traditional enactment document access right, the direct mapped file system view of this kind method.For general user, the operation of enactment document access right, not only complicated and make mistakes easily.And use file system view method described in the invention, not only easy to use, and security is better.The user need only know the position of privately owned file directory, just can be stored in the file that needs protection wherein.
Multi-user's file system is to discern different users according to current (current) user name.Current user name can directly obtain from system.All users' privately owned file all is kept in the public privately owned catalogue, default catalogue be C: PERSONAL.Each user can operate this catalogue.But the content in the different catalogues that the user saw is different.Each login user can only see in the PERSONAL catalogue that all one's own file has used the notion of file system view in multi-user's safety operation document system, the called file system view is exactly the file system structure of seeing from certain angle, comprises user's the file system view and the file system view of system.User's file system view is exactly file system of this locality of seeing of this user and the file system that the networking mapping is come, just all file and catalogues (file) that can access arrive of this user.In common Windows system, use the user of different user name accessing system that different file system view is arranged.File system view is exactly to go to see file system from the angle of operating system itself, and this has comprised that all are from the appreciable file of user perspective and sightless file, user's file and all files such as file of system.
In Windows, the file system of file system manager IFSMGR management system level, promptly IFSMGR operates the system file system view.In common Windows, all users' file system view is identical with the file system view of system.In the Windows of the safety operation document system that has the multi-user, because the effect of multi-user's safety operation document system, user's the file system view no longer file system view with system is identical, and the file system view of different user is also inequality.So, user's privately owned file just can be protected.The function of multi-user's safety operation document system of the present invention is exactly the file system view that the file system view of system is changed into the user.
See also Fig. 6, it shows the synoptic diagram that changes between multi-user's the system file system view of safety operation document system and user file system view.Synoptic diagram with Fig. 6 is an example, can find user Jack and user John C: among the PERSONAL see that file is different, and in system file system view 50, comprised all users' file, the file system view 70 of the file system view 60 of user Jack and user John for example, each user's document storage is in different catalogues.Therefore, even different users has the privately owned file of same file name, its content also can be different.In user's file system view, has only the corresponding file that belongs to this user.
Between privately owned directory name and other paths, add user name exactly in the process that the user file system view is transformed into the system file system view.For example, user Jack want access C: PERSONAL text1.User name " Jack " is inserted between privately owned file directory name " C: PERSONAL " and other paths " text1 ".After multi-user's safety operation document system is handled, the path of passing to system become " C: PERSONAL Jack text1 ".So, the user to C: PERSONAL the operation of text1, in fact be transferred to the system file system view C: PERSONAL Jack the enterprising line operate of text1.The privately owned catalogue file operation that it should be noted that user John all is to add John after privately owned file directory, form C: PERSONAL John ... and can't form at all C: PERSONAL Jack ... the path, thereby privately owned file that can't access Jack.For the file under the non-privately owned catalogue, multi-user's safety operation document system directly is delivered to file system manager to the path, so all users can arrive in access.This shows that in multi-user's safety operation document system all catalogue and files that are arranged in privately owned catalogue all can't be arrived by other user access.Even two users have the file or the sub-directory of same names, its file or sub-directory content also can be different along with active user's difference.
The present invention can be applicable in the Windows multi-user system at present, the multi-user system of Windows allows two or more users to use a computer simultaneously, so when two users use different user names to sign in in the system, its all only can access oneself privately owned file, but can not see the other side's privately owned file each other.System of the present invention also can use in the Windows of unit operation system, so that the space of the privately owned file of user access to be provided.
Embodiment 2
Multi-user's safety operation document method of the present invention includes the executive system initialization, carry out that the user logins and three modules such as execute file access.
The execution virtual unit initialization module of above-mentioned multi-user's safety operation document method at first is described, this part is to operate when Windows 9x system bootstrap, whether it mainly is complete in order to judge the privately owned directory context of system, if finding has incomplete place, will carry out corresponding resuming work.Only installing first or user when reinstalling, the privately owned directory context of system can be complete.When system detects privately owned catalogue non-existent the time, just must be rebulid.Rebulid the security that privately owned catalogue can not have influence on system, because this situation just can take place when only installing in system, and all users also do not set up privately owned file when installing in system, so be unlikely to have influence on privately owned safety of files yet.
See also Fig. 3, the execution virtual unit initialization flow process of multi-user's of the present invention safety operation document method comprises the following steps: (i) step 100, at first obtains user configured privately owned directory path; (ii) step 102 checks then whether the catalogue of depositing privately owned file exists, and does not then carry out next step if do not exist, otherwise proceeds to step 106; (iii) step 104 is set up in order to deposit the catalogue of privately owned file, carries out next step then; (iv) step 106 is connected to file system manager with the file access control module.
In above-mentioned flow process, deposit the title of catalogue of privately owned file and position and be when installing in system, by the setter appointment, after system start-up, this catalogue can become invisible, that is to say, the user of non-this catalogue will can't see the existence of this catalogue fully.
Behind the accessing operation of file, when the file in all systems is carried out access, all to pass through this module in the method surveillance of stating before use.This module checks at first whether the file of user access is present in the privately owned catalogue.Because all users' privately owned file all leaves appointed positions in, so as long as judge whether the file that just can detect the access of user institute is privately owned file by the path of the file of access.If what the user used is not privately owned file, then native system only need directly carry out file operation.If user's operation is privately owned file, then must be transformed into actual file to the file path of user's appointment and operate needed path, its method is that user name is added on the path of user's appointment, just user name is joined between privately owned file directory and other sub-directories.For example, privately owned file directory is " C: Personal ", the file path that user John imports into for " C: Personal Sub1 Pic1.bmp ", user name " John " will be added to during conversion between " C: Personal " and " Sub1 Pic1.bmp ", and form " C: Personal John Sub1 Pic1.bmp ".
See also Fig. 4, the file access control flow of multi-user's of the present invention safety operation document method comprises the following steps: (i) at first, step 200, and when the user logined, system can obtain and the access request of Study document; (ii) follow, in step 202, judge that whether the path of importing into is positioned at privately owned catalogue, if then carry out next step, otherwise carry out step 208; (iii) step 204, system obtains current user name, carries out next step; (iv) step 206 after the increase user name, as the path of system file system view, proceeds to step 210 then in the path; (v) step 208 is directly used the path as the system file system view, the path imported into; (vi) step 210 uses the file request after changing to call the subsequent treatment module, finishes then.
The execution user of multi-user's safety operation document method logins part, mainly realizes the foundation of the file system environment when new user logined first.Judge whether newly user of a user, only need this user's of inquiry a privately owned catalogue whether to set up.If also do not set up, just represent that this user is for logining first.
Be necessary for this user set up privately owned file directory this moment, and to be exactly privately owned directory path add user name in the path of this privately owned file directory.If through inquiring about and having file directory to exist, then this part just can not done any operation, directly withdraws from.
See also Fig. 5, the execution user login process system of multi-user's of the present invention safety operation document method comprises the following steps: (i) at first, in step 300, and when the user logins, the user name that obtains logining; (ii) step 302 judges whether the privately owned catalogue of user's correspondence exists, if then finish, otherwise carries out next step; (iii) step 304, for the user sets up a privately owned catalogue, and directory name is identical with user name, finishes then.
Multi-user's file system has utilized the characteristic of user's login of Windows to determine user name.All use the people of Windows system all will carry out system login, to determine user name.Because user name does not have any special meaning in common Windows system, so generally speaking, the user of each using system uses same user name accessing system.But in multi-user's safe operation file system, user name relates to the file that the user can access, and this makes user name become a key, so when using multi-user's safe operation file system, different user must be with different user name accessing systems.
This method provides the security of local access for each user, as long as the user with different user name accessing systems, just can deposit the privately owned file of oneself safely, and needn't worry the file that other users can check or damage and have in system.The user will do be exactly privately owned document storage in the privately owned file directory of appointment.Be to use " C: Personal " to represent privately owned file directory in the above-described embodiments, the user not only can deposit file in this catalogue, can also be at its md down.This method is by the method for file system mapping, makes each user can only see in the privately owned file directory file of oneself.Through planting method thus, the privately owned safety of files of user can be protected, and is different with the method for traditional enactment document access right, the direct mapped file system view of this kind method.For general user, the operation of enactment document access right, not only complicated and make mistakes easily.And use file system view method described in the invention, not only easy to use, and security is better.The user need only know the position of privately owned file directory, just can be stored in the file that needs protection wherein.
Multi-user's file system is discerned different users according to current (current) user name.Current user name can directly obtain from system.All users' privately owned file all is kept in the public privately owned catalogue, default catalogue be C: PERSONAL.Each user can operate this catalogue, but the content in the different catalogues that the user saw is different.Each login user can only see in the PERSONAL catalogue that all one's own file has used the notion of file system view in multi-user's safety operation document method, the called file system view is exactly the file system structure of seeing from certain angle, comprises user's the file system view and the file system view of system.User's file system view is exactly file system of this locality of seeing of this user and the file system that the networking mapping is come, just all file and catalogues (file) that can access arrive of this user.In common Windows system, use the user of different user name accessing system that different file system view is arranged.File system view is exactly to go to see file system from the angle of operating system itself, and this has comprised that all are from the appreciable file of user perspective and sightless file, user's file and all files such as file of system.
In Windows, the file system of file system manager IFSMGR management system level, promptly IFSMGR operates the system file system view.In common Windows, all users' file system view is identical with the file system view of system.In the Windows of the safety operation document system that has the multi-user, because the effect of multi-user's safety operation document method, user's the file system view no longer file system view with system is identical, and the file system view of different user is also inequality.So, user's privately owned file just can be protected.The function of multi-user's safety operation document system of the present invention is exactly the file system view that the file system view of system is changed into the user.
See also Fig. 6, it shows the synoptic diagram that changes between multi-user's the system file system view of safety operation document method and user file system view.Synoptic diagram with Fig. 6 is an example, can find user Jack and user John C: among the PERSONAL see that file is different, and in system file system view 50, comprised all users' file, the file system view 70 of the file system view 60 of user Jack and user John for example, each user's document storage is in different catalogues.Therefore, even different users has the privately owned file of same file name, its content also can be different.Having only the corresponding file that belongs to this user in user's file system view is exactly to ask in privately owned directory name and other paths to add user name in the process that the user file system view is transformed into the system file system view.For example, user Jack want access C: PERSONAL text1.User name " Jack " is inserted between privately owned file directory name " C: PERSONAL " and other paths " text1 ".After multi-user's safety operation document method is handled, the path of passing to system become " C: PERSONAL Jack text1 ".So, the user to C: PERSONAL the operation of text1, in fact be transferred to the system file system view C: PERSONAL Jack the enterprising line operate of text1.The privately owned catalogue file operation that it should be noted that user John all is to add John after privately owned file directory, form C: PERSONAL John ... and can't form at all C: PERSONAL Jack ... the path, thereby privately owned file that can't access Jack.For the file under the non-privately owned catalogue, multi-user's safety operation document system directly is delivered to file system manager to the path, so all users can arrive in access.This shows that in multi-user's safety operation document method all catalogue and files that are arranged in privately owned catalogue all can't be arrived by other user access.Even two users have the file or the sub-directory of same names, its file or sub-directory content also can be different along with active user's difference.
The present invention can be applicable in the Windows multi-user system at present, the multi-user system of Windows allows two or more users to use a computer simultaneously, like this privately owned file that it all only can access oneself when two users use different user names to sign in in the system, but can not see the other side's privately owned file each other.System of the present invention also can use in the Windows of unit operation system, so that the space of the privately owned file of user access to be provided.