JPH06110763A - File system - Google Patents

File system

Info

Publication number
JPH06110763A
JPH06110763A JP4262117A JP26211792A JPH06110763A JP H06110763 A JPH06110763 A JP H06110763A JP 4262117 A JP4262117 A JP 4262117A JP 26211792 A JP26211792 A JP 26211792A JP H06110763 A JPH06110763 A JP H06110763A
Authority
JP
Japan
Prior art keywords
file
protection information
partial
execution
partial protection
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.)
Pending
Application number
JP4262117A
Other languages
Japanese (ja)
Inventor
Akira Honda
亮 本田
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP4262117A priority Critical patent/JPH06110763A/en
Publication of JPH06110763A publication Critical patent/JPH06110763A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To attain file protection by the unit of an optional partial area within the file. CONSTITUTION:In addition to protection information regulating the access right of an owner or another user by the unit of the file 11, partial protection information 13 regulating the access of the owner or another user by the optional partial area within the file 11 is used so as to permit/prohibit its refference, update and execution by the unit of the partial area within the file 11. Consequently, partial data protection can finely be set to the sama file 11. Consequently, not only the efficient utilization of resources but also unified access is attained.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、利用者にファイルの
部分的保護を可能とさせる信頼性の高いファイルシステ
ムを有する計算機システムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer system having a highly reliable file system which enables a user to partially protect a file.

【0002】[0002]

【従来の技術】一般に、複数の利用者が資源を共有し利
用する計算機システムにおけるファイルのアクセス保護
は、そのファイルの格納単位で制御されている。すなわ
ち、1つのファイルには1通りの保護情報が付加されて
いる。例えば計算機システムの代表的なオペレーティン
グシステムであるUNIXでは、各ファイル毎にその所
有者、グループに属する利用者、その他の利用者に対し
て、それぞれ参照、更新、実行権を示す3ビットの許可
ビットが付加されて格納されている。その様子を図12
に示す。許可ビットが所有者、グループに属する利用
者、その他の利用者の順に、参照権を“r”で、更新権
を“w”、で実行権を“x”で表している。また、
“−”は権利がないことを示している。従って、図12
の第1のファイルでは、所有には参照、更新、実行権が
あり、グループに属する利用者とその他の利用者には共
に参照、実行のみが許可されている。
2. Description of the Related Art Generally, file access protection in a computer system in which a plurality of users share and use resources is controlled in units of storing the files. That is, one type of protection information is added to one file. For example, in UNIX, which is a typical operating system of a computer system, a 3-bit permission bit indicating the right of reference, update, and execution for each file owner, user belonging to a group, and other users. Is added and stored. Figure 12
Shown in. The permission bit is represented by “r” for the reference right, “w” for the update right, and “x” for the execution right in the order of the owner, the user belonging to the group, and the other users. Also,
"-" Indicates that there is no right. Therefore, FIG.
In the first file of 1, the owner has the reference right, the update right, and the execution right, and the user who belongs to the group and the other users are permitted only the reference and the execution.

【0003】また、UNIXにはファイルへのアクセス
手段として、参照、更新、実行などのシステムコールが
用意されている。そして、それらのシステムコールにお
けるファイルへのアクセス許可には、先に示したファイ
ル単位毎に用意された許可ビットに従って判断されてい
る。
In UNIX, system calls such as reference, update, and execution are prepared as a means for accessing a file. Then, the access permission to the file in those system calls is determined according to the permission bit prepared for each file unit described above.

【0004】しかし、1つのファイルを複数の利用者が
共有し利用する計算機環境においては、利用者毎に部分
的に異なったアクセスを必要とする場合がある。例え
ば、文書ファイルの一部分だけは、その他の利用者から
の参照を防ぎたい場合がある。また、実行ファイルにお
いては、モジュールや部分的な実行単位毎で、その他の
利用者の実行を防ぎたい場合もある。このような要求を
UNIXシステムにおいて実現するためには、まず、そ
の保護要求を満たす別のファイルを作成する必要があ
る。
However, in a computer environment in which a single file is shared and used by a plurality of users, there are cases where different access is required for each user. For example, it may be desirable to prevent only a part of the document file from being referenced by other users. In the execution file, it may be desired to prevent execution by other users for each module or partial execution unit. In order to realize such a request in the UNIX system, it is first necessary to create another file satisfying the protection request.

【0005】例えば、図13の(a)において、誰から
も参照が可能な文書ファイルAに対して、P1で示され
る領域はその他の利用者からの参照を防ぎたいとする。
その場合は元の文書ファイルAから参照を防ぎたい部分
を削除した文書ファイルBを作成する。これを図13の
(b)に示す。そして、新たに作成した文書ファイルB
のアクセス許可ビットに文書ファイルAのアクセス許可
ビットを複写し、文書ファイルAのアクセス許可ビット
からその他利用者の参照権を除く必要がある。
For example, in FIG. 13A, for the document file A which can be referred to by anyone, the area indicated by P1 is desired to be prevented from being referred to by other users.
In that case, the document file B is created by deleting the portion of the original document file A whose reference is desired to be prevented. This is shown in FIG. Then, the newly created document file B
It is necessary to copy the access permission bit of the document file A to the access permission bit of the above, and remove the reference right of other users from the access permission bit of the document file A.

【0006】また図13の(c)において、誰からも実
行可能な実行ファイルCに対してP2で示される実行単
位はその他の利用者の実行を防ぎたいとする。その場合
は元の実行ファイルから実行を防ぎたい部分を削除した
実行ファイルDを新たに作成する。これを図13の
(d)に示す。そして、新たに作成した実行ファイルD
のアクセス許可ビットに実行ファイルCのアクセス許可
ビットを複写し、実行ファイルCのアクセス許可ビット
からその他の利用者の実行権を除かなければならない。
Further, in FIG. 13 (c), it is assumed that the execution unit indicated by P2 for the execution file C that can be executed by anyone wants to prevent execution by other users. In that case, a new execution file D is created by deleting the portion of the original execution file whose execution is desired to be prevented. This is shown in FIG. And the newly created executable file D
The access permission bit of the execution file C must be copied to the access permission bit of the execution file C, and the execution right of other users must be removed from the access permission bit of the execution file C.

【0007】しかし、上記2つの例においては、複数の
ファイルを用意しなければならないこと、さらに元のフ
ァイルの名称と新たに作成したファイルの名称も別々の
ものとなり、統一的なアクセスができないという問題を
抱えている。従って、UNIXシステムでは、この様な
部分的な保護を同一のファイルに対して実現する機構は
ない。
However, in the above two examples, a plurality of files must be prepared, and the name of the original file and the name of the newly created file are also different, so that unified access cannot be performed. I have a problem. Therefore, the UNIX system has no mechanism for implementing such partial protection for the same file.

【0008】[0008]

【発明が解決しようとする課題】以上のように、従来の
計算機システムでは、データの保護はファイルの格納単
位で設定されており、同一のファイルに対して異なった
利用者への部分的なアクセス保護を提供する機構がな
い。従って部分的な保護の設定には、複数のファイルを
用意しなければならず、資源の利用が非効率的であるば
かりでなく、統一的なアクセスができないだけではない
という問題があった。
As described above, in the conventional computer system, the data protection is set for each file storage unit, and the same file is partially accessed by different users. There is no mechanism to provide protection. Therefore, in order to set partial protection, a plurality of files must be prepared, which not only makes inefficient use of resources, but also has a problem that uniform access is not possible.

【0009】本発明では、上記の欠点を解決し、資源の
有効利用と、統一的なアクセスが可能な上、細かく部分
保護の設定されたファイルへのアクセスを可能とするフ
ァイルシステムを提供することを目的とする。
The present invention solves the above-mentioned drawbacks, and provides a file system which enables effective use of resources and unified access, and also enables access to a file in which fine partial protection is set. With the goal.

【0010】[0010]

【課題を解決するための手段および作用】本発明は、複
数の利用者が同一のファイルを共有し利用する計算機の
ファイルシステムにおいて、ファイル単位毎に所有者や
他の利用者のアクセス権を規定する保護情報、およびフ
ァイル内の任意の部分領域毎に所有者や他の利用者のア
クセス権を規定する部分保護情報を各ファイル毎に用意
し、これら保護情報および部分保護情報に従って、対応
するファイルの参照、更新、実行をファイル単位および
そのファイル内の部分領域単位で許可/禁止するアクセ
ス手段とを具備することを特徴とする。
According to the present invention, in a file system of a computer in which a plurality of users share and use the same file, the access right of the owner and other users is defined for each file. The protection information to be specified and the partial protection information that regulates the access rights of the owner and other users for each arbitrary partial area in the file are prepared for each file, and the corresponding file according to these protection information and the partial protection information. And access means for permitting / prohibiting the reference, update, and execution of the file in units of files and units of partial areas in the files.

【0011】このファイルシステムにおいては、ファイ
ル単位毎に所有者や他の利用者のアクセス権を規定する
保護情報に加え、そのファイル内の任意の部分領域毎に
所有者や他の利用者のアクセス権を規定する部分保護情
報が使用され、ファイル内の部分領域単位でその参照、
更新、実行を許可/禁止することができる。したがっ
て、部分的なデータの保護を同一のファイルに対して細
かく設定可能となる。従って資源の利用が効率良く行な
えるばかりでなく、統一的なアクセスも可能となる。
In this file system, in addition to the protection information which defines the access right of the owner or other users for each file, the access of the owner or other users for each arbitrary partial area in the file Partial protection information that specifies the right is used, and its reference is made for each partial area in the file.
Update / execution can be permitted / prohibited. Therefore, partial data protection can be finely set for the same file. Therefore, not only can resources be used efficiently, but also unified access is possible.

【0012】[0012]

【実施例】以下、この発明の実施例を図面に従って説明
する。
Embodiments of the present invention will be described below with reference to the drawings.

【0013】図1には、UNIXシステムに本発明を適
用したファイルシステムが示されている。このファイル
システムは、実際のデータが格納されているファイル1
1、そのファイル11のアクセス制御の記された保護情
報12、さらにそのファイル内の部分的なアクセス制御
を記した部分保護情報13、及びアプリケーションに提
供された従来のアクセス制御手段14、部分保護情報に
従った部分アクセス手段15によって構成される。
FIG. 1 shows a file system in which the present invention is applied to a UNIX system. This file system is a file 1 that stores the actual data.
1, protected information 12 indicating access control of the file 11, partial protected information 13 indicating partial access control in the file 11, conventional access control means 14 provided to an application, partial protected information The partial access means 15 according to

【0014】各ファイルには1つの保護情報12があ
り、この保護情報12にはUNIXシステムで用いられ
ている許可ビットと部分保護情報の存在を示す指標が格
納されている。この様子を図2に示す。
Each file has one piece of protection information 12, and this protection information 12 stores the permission bit used in the UNIX system and an index indicating the existence of the partial protection information. This state is shown in FIG.

【0015】図2に示されているように、許可ビットは
所有者、グループ、他の利用者それぞれに対するファイ
ルへの参照(r)、更新(w)、実行権(x)を示す。
部分保護情報13には、保護範囲を指定するための開始
位置がバイト開始位置とビット開始位置で、また保護サ
イズがバイト単位とビット単位を使って記録されてい
る。もしその保護範囲がバイト境界で指定される場合に
は、その保護範囲はバイト単位で示され、ビット開始位
置は0コードが入っている。一方保護範囲がビット境界
にわたる場合には、保護開始位置はバイト開始位置とビ
ット開始位置の両方を使って表され、保護サイズもバイ
ト単位とビット単位の両方で表される。また、これらの
保護範囲にはその範囲に限り有効な許可ビットが、先の
保護情報と同一の形式で格納されている。
As shown in FIG. 2, the permission bits indicate a reference (r), an update (w), and an execution right (x) to the file for the owner, the group, and the other user.
In the partial protection information 13, the start position for designating the protection range is recorded in the byte start position and the bit start position, and the protection size is recorded in the byte unit and the bit unit. If the protection range is specified on a byte boundary, the protection range is indicated in bytes, and the bit start position contains a 0 code. On the other hand, when the protection range extends over bit boundaries, the protection start position is expressed using both the byte start position and the bit start position, and the protection size is also expressed in both byte units and bit units. In addition, permission bits effective only in the protection range are stored in these protection ranges in the same format as the protection information.

【0016】図3は、図2の部分保護情報13の付加さ
れているファイル11の保護状態を示したものである。
先頭の256バイトは部分保護情報で指定されていない
ため、従来の保護情報が適用され、グループ、その他の
利用者には参照、実行権がある。続く256バイトは部
分保護情報12に記録された第1の部分保護(rwx−
−−−−−)が適用されるため、所有者以外のアクセス
は全て拒否される。第2の部分保護(rwxr−x−−
−)はビット境界で指定されている。これは4097バ
イト目の上位4ビット目から開始される32バイトと1
ビット分の範囲が保護されており、グループの利用者に
対しては参照、実行を許可しているが、その他の利用者
のアクセスは全て拒否される。UNIXシステムにおい
て、利用者がアクセスするファイルには以下の種類があ
る。 (1)実行可能なオブジェクトファイル(バイナリファ
イル) (2)オブジェクトライブラリファイル(バイナリファ
イル) (3)実行可能なスクリプトファイル(テキストファイ
ル) (4)テキストデータファイル (5)バイナリデータファイル
FIG. 3 shows the protection state of the file 11 to which the partial protection information 13 of FIG. 2 is added.
Since the leading 256 bytes are not specified by the partial protection information, the conventional protection information is applied, and the group and other users have the reference and execution rights. The following 256 bytes are the first partial protection (rwx−) recorded in the partial protection information 12.
-----) is applied, so all access except for the owner is denied. Second partial protection (rwxr-x ---
-) Is specified on a bit boundary. This is 32 bytes starting from the 4th high-order bit of the 4097th byte and 1
The range of bits is protected, and reference and execution are permitted for the group users, but access for all other users is denied. In the UNIX system, there are the following types of files that users access. (1) Executable object file (binary file) (2) Object library file (binary file) (3) Executable script file (text file) (4) Text data file (5) Binary data file

【0017】UNIXでは、この内(2),(4),
(5)のファイルについてはユーザプロセスが参照、更
新を行なうためのreadシステムコール、write
システムコールが用意されている。また、(1),
(3)に対してはカーネルが直接ファイルから内容をメ
モリに読み込み実行するexecシステムコール用意さ
れている。従って本発明では、上記どちらの場合も、部
分保護情報の存在するファイルに対しては、これらのシ
ステムコールに代わる部分アクセス手段を用意する。
(2),(4),(5)のファイルに対するアクセス手
段は例1,2で述べる。また、(1),(3)のファイ
ルに対するアクセス手段は例3,4で述べる。 [例1]上記に示したファイルシステムにおける、部分
保護情報13の付加されているファイルの参照手続きの
実施例を図4及び図5を使って説明する。
In UNIX, of these (2), (4),
For the file (5), the user process refers to and updates the read system call, write.
System call is prepared. Also, (1),
For (3), the exec system call is prepared in which the kernel directly reads the contents from the file into the memory and executes the contents. Therefore, according to the present invention, in both of the above cases, a partial access means that replaces these system calls is prepared for a file in which partial protection information exists.
The means for accessing the files (2), (4), and (5) will be described in Examples 1 and 2. Also, the means for accessing the files (1) and (3) will be described in Examples 3 and 4. [Example 1] An example of a procedure for referring to a file to which the partial protection information 13 is added in the file system shown above will be described with reference to FIGS. 4 and 5.

【0018】まず、ユーザプロセスからファイル11の
オープンシステムコールが発生すると、まず、ファイル
の保護情報を検査する(ステップS1)。もし保護情報
の部分保護情報指標がセットされていない場合は、従来
のファイルオープン手続きを行なった後、従来のアクセ
ス手段14、すなわちreadシステムコールに制御を
渡す(ステップS2,S3)。一方、部分保護情報指標
がセットされている場合は、従来のアクセス手段14で
はなく、部分アクセス手段15で用意した別の手続きを
使ってファイルの参照を行なう(ステップS2,S3〜
S5)。
First, when an open system call for the file 11 is made by the user process, the protection information of the file is first inspected (step S1). If the partial protection information index of the protection information is not set, the conventional file open procedure is performed and then the control is passed to the conventional access means 14, that is, the read system call (steps S2 and S3). On the other hand, when the partial protected information index is set, the file is referred to by using another procedure prepared by the partial access means 15 instead of the conventional access means 14 (steps S2, S3 ...
S5).

【0019】ファイルのデータをバッファ領域に複写す
る際には、保護されているデータ部分の参照に対して、
指定したコードでマスクをかけるか、あるいは読み飛ば
すかのいずれかの手段があるが、ここではファイルのオ
ープン時にその手段を選択できるものとする。従ってフ
ァイルのオープンシステムコールを以下のように拡張す
ることで実現できる。 open(ファイル記述子、ファイルネーム、モード、
マスクフラグ、マスクパターン)
When copying the file data to the buffer area, referring to the protected data portion,
There is either a method of masking with a specified code or a step of skipping, but here, it is assumed that the method can be selected when the file is opened. Therefore, it can be realized by expanding the file open system call as follows. open (file descriptor, filename, mode,
Mask flag, mask pattern)

【0020】ここで、もしマスクフラグが指定されてい
ない場合には、保護されていて参照できない箇所は読み
飛ばす(ステップS4,S5)。実際には、読み取りサ
イズ、部分保護情報のオフセット、サイズ、許可ビット
から読み出し位置を移動させればよい。またマスクフラ
グが指定されていた場合には、保護された領域にはマス
クパターンが埋められたデータを参照するものとする
(ステップS4,S6)。同様に、読み取り位置、読み
取りサイズ、部分保護情報のオフセット、サイズ、許可
ビットから許可されていない領域の参照時にはマスクパ
ターンをバッファ領域に複写することになる。
Here, if the mask flag is not specified, the protected portion that cannot be referred to is skipped (steps S4 and S5). Actually, the read position may be moved from the read size, the offset of the partial protection information, the size, and the permission bit. When the mask flag is designated, the data in which the mask pattern is filled in the protected area is referred to (steps S4 and S6). Similarly, the mask pattern is copied to the buffer area when the read position, the read size, the offset of the partial protection information, the size, and the area not permitted by the permission bit are referred to.

【0021】図5は、部分保護情報の付加されたファイ
ルの参照イメージの例を示したものである。(a)は元
のファイルであり、オフセットP1からサイズS1分の範囲
に保護がかけられている。そして、その保護領域につい
ての参照権がないユーザがそのファイル全体の参照を行
なった場合の参照イメージを(b),(c)に示す。
(b)は保護されているサイズS1分のデータを除いたデ
ータが読み込まれ、(c)ではファイルオープン時にマ
スクを指定した場合に、保護された領域にマスクパター
ンが埋められて読み込まれる様子を表している。従っ
て、(b)では(元のファイルのサイズ − S1)が参
照可能なファイルサイズとなり、(c)では見かけ上の
参照可能サイズが元のファイルと同じサイズであるとい
う違いがある。 [例2]上記に示したファイルシステムにおける、部分
保護情報13の付加されているファイルの更新手続きの
例を説明する。
FIG. 5 shows an example of a reference image of a file to which partial protection information is added. The original file (a) is protected in the range from the offset P1 to the size S1. Then, reference images when a user who has no reference right to the protected area refers to the entire file are shown in (b) and (c).
In (b), the data excluding the protected data of size S1 is read, and in (c), when a mask is specified when the file is opened, the mask pattern is filled in the protected area and read. It represents. Therefore, in (b), the (original file size-S1) is the referable file size, and in (c), the apparent referable size is the same as the original file. [Example 2] An example of a procedure for updating a file to which the partial protection information 13 is added in the file system shown above will be described.

【0022】一般にファイルの更新はファイルの一部分
の更新と、ファイル全体の更新がある。UNIXシステ
ムで用意されているwriteシステムコールでは、フ
ァイルポインタで指定された読み込み位置からバッファ
領域のデータを、指定サイズ分上書きする部分的な更新
を行なうものである。部分保護情報が付加されているフ
ァイルへの部分的な書き込みは、書き込む位置と書き込
みサイズに従って保護領域外を更新する場合、保護領域
内を更新する場合、保護領域内と保護領域外の両方を更
新する場合の3通りが考えられる。従って、書き込み位
置、書き込みサイズ、保護開始位置、保護サイズ、許可
ビットから書き込み可能かどうか判断する必要がある。
Generally, updating a file includes updating a part of the file and updating the entire file. The write system call prepared in the UNIX system partially updates the data in the buffer area from the read position designated by the file pointer by the designated size. Partial writing to a file to which partial protection information is added updates both inside and outside the protected area when updating outside the protected area according to the write position and write size. There are three possible cases. Therefore, it is necessary to judge whether or not writing is possible from the write position, write size, protection start position, protection size, and permission bit.

【0023】しかし、ファイル全体を更新する場合には
注意が必要である。例えばUNIXのエディタプログラ
ムではファイルの更新時に、createシステムコー
ルを使用して元のファイルのサイズを0にした後に、w
riteシステムコールを使ってファイル全体を更新し
ているものがある。そのようなアプリケーションでは、
部分保護情報13が付加されているファイルに対して
は、その部分保護情報が無効になってしまうことにな
る。従ってファイルサイズを変更する可能性のあるシス
テムコールでは、部分保護情報13が付加されているフ
ァイルに対してはエラーを返すようにする必要がある。
また、ファイルの削除を行なうunlinkシステムコ
ールにおいても、部分保護情報13が付加されている場
合には、ファイルの所有者のみが実行可能なようにする
必要もある。次に、ファイル全体を更新する様子につい
て説明する。
However, care must be taken when updating the entire file. For example, in the UNIX editor program, when the file is updated, the size of the original file is set to 0 using the create system call, and then w
Some use the write system call to update the entire file. In such applications,
For a file to which the partial protection information 13 is added, the partial protection information becomes invalid. Therefore, in a system call that may change the file size, it is necessary to return an error for the file to which the partial protection information 13 is added.
Further, even in the unlink system call for deleting a file, if the partial protection information 13 is added, it is necessary that only the owner of the file can execute it. Next, how the entire file is updated will be described.

【0024】図6の(a)と(b)に更新前のファイル
の構造とその保護情報及び部分保護情報の例を示す。こ
のファイル保護情報(rwxr−xr−x)ではグルー
プの利用者、その他の利用者に対して参照、実行が許可
されているが、部分保護情報(p3 ,0x0 s2,0x0,
rwxr−x−−−)によってオフセットP1からサ
イズS2分だけバイト境界で部分的に保護がかけてあり、
グループに属する利用者のみだけに参照、実行が許可さ
れている。このファイルに対して、(a)と(c)に示
すように、オフセットP1にサイズS3のデータを挿入し、
オフセットP2からサイズS1のデータを削除し、サイズS4
のデータを追加するという更新を行なう場合の部分保護
情報の更新手順を図7のフローチャートを参照して説明
する。
6 (a) and 6 (b) show an example of the structure of a file before update and its protection information and partial protection information. In this file protection information (rwxr-xr-x), reference and execution are permitted for the group user and other users, but the partial protection information (p3, 0x0 s2, 0x0,
rwxr−x −−−) is partially protected on the byte boundary from the offset P1 by the size S2,
Only the users who belong to the group are allowed to refer and execute. For this file, as shown in (a) and (c), insert data of size S3 at offset P1,
Data of size S1 is deleted from offset P2, size S4
A procedure for updating the partial protection information in the case of performing the update of adding the data will be described with reference to the flowchart of FIG.

【0025】ここで、このファイルに対する保護情報で
の更新権は、ファイルのオープン時に検査済みであると
する。さらに、更新イメージは既にバッファ上にあるも
のとする。
Here, it is assumed that the update right of the protection information for this file has been checked when the file is opened. Furthermore, it is assumed that the updated image is already on the buffer.

【0026】最初に、部分保護情報13の存在を検査す
る(ステップS11)。部分保護情報13があった場合
には、部分保護情報の更新作業を始める(ステップS1
2)。部分保護情報がない場合には、writeシステ
ムコールを使った従来の更新処理が実行される(ステッ
プS13)。また、部分保護情報がある場合には、ファ
イル全体の更新か、部分的な更新かによって処理が別れ
る。部分的な更新の場合(ステップS21)は、保護領
域の更新許可がチェックされ(ステップS22)、更新
可能であれば、writeシステムコールを使った従来
の更新処理が実行される(ステップS23)。更新不可
能であれば、所定のエラー処理が行なわれる(ステップ
S24)。
First, the existence of the partial protection information 13 is checked (step S11). When there is the partial protection information 13, the update work of the partial protection information is started (step S1).
2). If there is no partial protection information, the conventional updating process using the write system call is executed (step S13). Further, if there is partial protection information, the processing is separated depending on whether the entire file is updated or a partial update is made. In the case of partial update (step S21), the update permission of the protected area is checked (step S22), and if update is possible, the conventional update process using the write system call is executed (step S23). If it cannot be updated, a predetermined error process is performed (step S24).

【0027】ファイル全体の更新の場合(ステット1
4)には、まず、更新前のファイルとバッファ上データ
を比較することにより、以下のオフセットとサイズで表
された差分データを得る(ステップS15)。 オフセット サイズ P1 +S3 P2 −S1 P4 +S4 ここでは、サイズは挿入・追加を正の数で、削除を負の
数で表され、オフセットが小さい順にソーティングされ
ているものとする。
In case of updating the entire file (step 1
In 4), first, the file before update and the data on the buffer are compared to obtain difference data represented by the following offset and size (step S15). Offset size P1 + S3 P2-S1 P4 + S4 Here, the size is expressed as a positive number for insertion / addition and a negative number for deletion, and is assumed to be sorted in ascending order of offset.

【0028】次に、更新前の部分保護情報から保護開始
位置(p3)と保護サイズ(S2)を1つ取り出す(ステッ
プS16)。また、差分データからオフセットとサイズ
を取り出す(ステップS17)。そして、部分保護の保
護開始位置と差分データのオフセットを比較する。この
例ではサイズの符号からデータの挿入ということがわか
り、 差分データのオフセットP1≦部分保護開始位置P3 から、部分保護データの前に挿入されるので、 新しい部分保護開始位置Po=部分保護開始位置P3+差分
データサイズS3 新しい部分保護サイズPs=部分保護サイズS2 となる。次の差分データについては、同様にデータの削
除であることがわかり、 差分データのオフセットP2+サイズS1<部分保護開始位
置P3 から、部分保護データの前からサイズS1分削除されるの
で、 新しい部分保護開始位置Po=新しい部分保護開始位置Po
−差分データサイズS1 新しい部分保護サイズPs=新しい部分保護サイズPs となる。最後の差分データについては、 差分データのオフセットP3+サイズS4≧部分保護開始位
置P3+部分保護サイズS1 から、部分保護データの後に追加されることがわかるの
で、新しい部分保護開始位置、サイズともに変更する必
要はなく、 新しい部分保護開始位置Po=新しい部分保護開始位置P
o 新しい部分保護サイズPs=新しい部分保護サイズPs となる。以上から最終的な新しい部分保護情報は、 新しい部分保護開始位置Po=P3+S3−S1 新しい部分保護サイズPs=S2 という結果が得られ、この新しい部分保護情報と、変更
されたデータを格納して、ファイルの更新が終了する
(ステップS18,S20)。 [例3]
Next, one protection start position (p3) and one protection size (S2) are extracted from the partial protection information before update (step S16). Further, the offset and the size are extracted from the difference data (step S17). Then, the protection start position of partial protection is compared with the offset of the difference data. In this example, it can be seen from the size code that data is inserted, and since it is inserted before the partial protection data from the offset P1 ≤ partial protection start position P3 of the differential data, the new partial protection start position Po = partial protection start position P3 + difference data size S3 New partial protection size Ps = partial protection size S2. As for the next differential data, it was found that the data was deleted in the same manner, and the size S1 was deleted before the partial protection data from the offset P2 of the differential data + size S1 <partial protection start position P3. Start position Po = new partial protection start position Po
-Differential data size S1 New partial protection size Ps = New partial protection size Ps. As for the last differential data, it is necessary to change both the new partial protection start position and size because it is added after the partial protection data from the offset P3 + size S4 ≥ partial protection start position P3 + partial protection size S1 of the differential data. Not, new partial protection start position Po = new partial protection start position P
o New partial protection size Ps = new partial protection size Ps. From the above, the final new partial protection information is the new partial protection start position Po = P3 + S3-S1 new partial protection size Ps = S2. The new partial protection information and the changed data are stored. The updating of the file ends (steps S18 and S20). [Example 3]

【0029】上記に示したファイルシステムにおける、
部分保護情報の付加されているオブジェクトファイルの
実行手続きの実施例を図8のフローチャートを参照して
説明する。
In the file system shown above,
An embodiment of the execution procedure of the object file to which the partial protection information is added will be described with reference to the flowchart of FIG.

【0030】まず、部分保護情報の存在がチェックされ
(ステップS31)、部分保護情報がない場合にはex
ecシステムコールを使った従来のプログラム実行処理
が行なわれる(ステップS32)。このシステムコール
では、ファイルの実行許可のチェック、ファイルがロー
ドモジュールかどうかのチェックを行なった後、ロード
モジュールに必要なメモリ領域を確保し、ファイルのロ
ードモジュールをあらかじめ確保したメモリ上にロード
する。
First, the existence of partial protection information is checked (step S31). If there is no partial protection information, ex
Conventional program execution processing using the ec system call is performed (step S32). In this system call, after checking the execution permission of the file and checking whether the file is a load module, the memory area required for the load module is secured, and the load module of the file is loaded on the secured memory.

【0031】一方、部分保護情報がある場合には、ロー
ドモジュールに必要なメモリ領域の確保(ステップS3
3)、ファイルのロードモジュールをあらかじめ確保し
たメモリ上にロード(ステップS34)が同様にして行
なわれるが、ファイルからメモリ上にプログラムをロー
ドする時点で、部分保護情報がチェックされ(ステップ
S35)、もし、実行が許可されていない領域について
は無効なコード(NOPコードなど)で置き換える(ス
テップS37)。またその領域がモジュールであった場
合には、無効なコードへ置換えと最後のコードをリター
ンコードに置き換えることで、実行を防ぐことができる
(ステップS38)。
On the other hand, if there is partial protection information, the memory area required for the load module is secured (step S3).
3) Similarly, the load module of the file is loaded onto the memory secured in advance (step S34), but at the time of loading the program from the file onto the memory, the partial protection information is checked (step S35), If the execution is not permitted, the invalid code (NOP code or the like) is replaced (step S37). If the area is a module, execution can be prevented by replacing it with an invalid code and replacing the last code with a return code (step S38).

【0032】図9において、(a)は部分保護情報が付
加されている実行ファイルを示し、(b)はその他の利
用者がそのプログラムを実行する際にメモリ上にロード
されたプログラムイメージを示す。図中NOPは無効な
コードを、またRETはリターンコードを表している。 [例4]
In FIG. 9, (a) shows an executable file to which partial protection information is added, and (b) shows a program image loaded on the memory when another user executes the program. . In the figure, NOP represents an invalid code and RET represents a return code. [Example 4]

【0033】上記に示したファイルシステムにおける、
部分保護情報の付加されているオブジェクトライブラリ
のリンク手続きの例を図10のフローチャートを参照し
て説明する。
In the file system shown above,
An example of the linking procedure of the object library to which the partial protection information is added will be described with reference to the flowchart of FIG.

【0034】まず、オブジェクトライブラリに部分保護
情報が付加されているか否かを調べる(ステップS4
1)。部分保護情報が付加されてない場合には、実行モ
ジュールへの通常のリンク手続きが実行される(ステッ
プS42)。UNIXシステムでは、オブジェクトライ
ブラリの実行モジュールへのリンクはリンカと呼ばれる
アプリケーションプログラムによって行なわれている。
このアプリケーションでは、オブジェクトライブラリか
らのモジュールのロードは、実際にはreadシステム
コールでバッファ上に読み込まれ、アドレスの再配置を
行なった後に、実行ファイルにwriteシステムコー
ルを使って付加される。
First, it is checked whether or not partial protection information is added to the object library (step S4).
1). If the partial protection information is not added, the normal link procedure to the execution module is executed (step S42). In the UNIX system, an object library is linked to an execution module by an application program called a linker.
In this application, the module load from the object library is actually read into the buffer by the read system call, the address is relocated, and then added to the executable file by the write system call.

【0035】部分保護情報がある場合には、その部分保
護情報をチェックし、リンクするモジュールが実行可能
か否かを調べる(ステップS43)。実行可能であれ
ば、通常通りリンク手続きを行ない(ステップS4
4)、実行不可能であれば、部分保護サイズ分を先頭か
ら無効なコードに置き換えてバッファ上に読み込み、最
後のコードをリターンコードに置き換え、その後、再配
置して実行モジュールに付加すれば、そのモジュールの
実行を防ぐことができる(ステップS45)。
If there is partial protection information, the partial protection information is checked to see if the linked module is executable (step S43). If it is feasible, the link procedure is performed as usual (step S4).
4) If it is not executable, replace the partial protection size with an invalid code from the beginning and read it into the buffer, replace the last code with the return code, and then rearrange and add it to the execution module. Execution of the module can be prevented (step S45).

【0036】図11には、部分保護情報が付加されてい
るオブジェクトライブラリが(a)に、またそのライブ
ラリから実行の保護されているモジュールを、その他の
使用者が実行ファイルにリンクした結果が(b)として
示されている。
In FIG. 11, the object library to which the partial protection information is added is shown in (a), and the result of linking a module whose execution is protected from the library to the execution file by another user is ( Shown as b).

【0037】以上のようにこの実施例においては、ファ
イル単位毎に所有者や他の利用者のアクセス権を規定す
る保護情報12に加え、そのファイル内の任意の部分領
域毎に所有者や他の利用者のアクセス権を規定する部分
保護情報13が使用され、ファイル11内の部分領域単
位でその参照、更新、実行を許可/禁止することができ
る。したがって、部分的なデータの保護を同一のファイ
ルに対して細かく設定可能となる。従って資源の利用が
効率良く行なえるばかりでなく、統一的なアクセスも可
能となる。
As described above, in this embodiment, in addition to the protection information 12 which defines the access right of the owner and other users for each file, the owner and the other for each arbitrary partial area in the file. The partial protection information 13 that defines the access right of the user is used, and the reference, update, and execution of the partial area in the file 11 can be permitted / prohibited. Therefore, partial data protection can be finely set for the same file. Therefore, not only can resources be used efficiently, but also unified access is possible.

【0038】[0038]

【発明の効果】以上説明したように、本発明によれば、
共有ファイルに関してファイルの格納単位だけではな
く、部分的なアクセス制御を同一のファイルにおいて可
能となるため、細かなセキュリティ管理と、統一的なア
クセスと、資源の効率的な利用を実現できる。
As described above, according to the present invention,
With regard to shared files, not only the file storage unit but also partial access control can be performed on the same file, so fine security management, unified access, and efficient use of resources can be realized.

【図面の簡単な説明】[Brief description of drawings]

【図1】この発明の一実施例に係わるファイルシステム
の構成を示すブロック図。
FIG. 1 is a block diagram showing the configuration of a file system according to an embodiment of the present invention.

【図2】同実施例において使用される保護情報と部分保
護情報の一例を示す図。
FIG. 2 is a diagram showing an example of protection information and partial protection information used in the embodiment.

【図3】図2の部分保護情報に対応するデータの構造を
示す図。
3 is a diagram showing a structure of data corresponding to the partial protection information of FIG.

【図4】同実施例におけるアクセス手段のファイル参照
時の動作を説明するフローチャート。
FIG. 4 is a flowchart for explaining an operation of the access unit at the time of referring to a file in the embodiment.

【図5】同実施例におけるアクセス手段のファイル参照
時のファイルイメージを示す図。
FIG. 5 is a diagram showing a file image at the time of referring to a file of the access means in the embodiment.

【図6】同実施例におけるアクセス手段のファイル更新
時のファイルイメージを示す図。
FIG. 6 is a diagram showing a file image at the time of updating a file of the access means in the embodiment.

【図7】同実施例におけるアクセス手段のファイル更新
動作を説明するフローチャート。
FIG. 7 is a flowchart for explaining a file updating operation of the access means in the embodiment.

【図8】同実施例におけるアクセス手段のファイル実行
動作を説明するフローチャート。
FIG. 8 is a flowchart for explaining a file execution operation of the access means in the embodiment.

【図9】同実施例における実行ファイルのロードイメー
ジを示す図。
FIG. 9 is a diagram showing an image of loading an execution file in the embodiment.

【図10】同実施例において実行ファイルのリンク動作
を説明するフローチャート。
FIG. 10 is a flowchart illustrating an operation of linking an execution file in the embodiment.

【図11】同実施例におけるライブラリをリンクした実
行ファイルの例を示す。
FIG. 11 shows an example of an execution file linked with the library in the embodiment.

【図12】従来のファイルシステムを説明するための
図。
FIG. 12 is a diagram for explaining a conventional file system.

【図13】従来のファイルシステムにおける文書ファイ
ルと実行ファイルのイメージを示す図。
FIG. 13 is a diagram showing an image of a document file and an execution file in a conventional file system.

【符号の説明】[Explanation of symbols]

11…ファイル、12…保護情報、13…部分保護情
報、15…部分アクセス手段。
11 ... File, 12 ... Protection information, 13 ... Partial protection information, 15 ... Partial access means.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 複数の利用者が同一のファイルを共有し
利用する計算機のファイルシステムにおいて、 ファイル単位毎に所有者や他の利用者のアクセス権を規
定する保護情報、およびファイル内の任意の部分領域毎
に所有者や他の利用者のアクセス権を規定する部分保護
情報を各ファイル毎に用意し、 これら保護情報および部分保護情報に従って、対応する
ファイルの参照、更新、実行をファイル単位およびその
ファイル内の部分領域単位で許可/禁止するアクセス手
段とを具備することを特徴とするファイルシステム。
1. In a file system of a computer in which a plurality of users share and use the same file, protection information defining access rights of the owner and other users for each file, and arbitrary information in the file Partial protection information that defines the access rights of the owner and other users is prepared for each partial area for each file, and according to these protection information and partial protection information, reference, update, and execution of the corresponding file can be performed in file units and A file system comprising: an access unit for permitting / prohibiting each partial area in the file.
【請求項2】 前記アクセス手段は、前記保護情報によ
って参照が許可され、かつ前記部分保護情報によって参
照が禁止されている部分領域を持つファイルを参照する
時、前記部分保護情報によって参照禁止されている領域
のデータを空白または無効コードに置き換えるか、ある
いはその箇所のデータを読み飛ばすことを特徴とする請
求項1記載のファイルシステム。
2. The access means, when referring to a file having a partial area whose reference is permitted by the protection information and whose reference is prohibited by the partial protection information, is prohibited by the partial protection information. 2. The file system according to claim 1, wherein the data in the existing area is replaced with a blank or an invalid code, or the data in the area is skipped.
【請求項3】 前記アクセス手段は、前記部分保護情報
によって保護される部分領域を持つファイルを更新する
時、更新前のデータと更新後のデータとの差に従ってそ
の更新により挿入、削除、追加されるデータの位置とサ
イズを取得し、その情報に基づいて前記部分保護情報を
更新することにより更新後のファイルに対応する新たな
部分保護情報を生成することを特徴とする請求項1記載
のファイルシステム。
3. The access means, when updating a file having a partial area protected by the partial protection information, inserts, deletes, or adds by the update according to a difference between data before update and data after update. 2. The file according to claim 1, wherein a new partial protection information corresponding to the updated file is generated by acquiring the position and size of the data to be read and updating the partial protection information based on the information. system.
【請求項4】 前記アクセス手段は、前記保護情報によ
って実行が許可され、かつ前記部分保護情報によって実
行が禁止されている部分領域を持つオブジェクトファイ
ルを実行する時、前記部分領域のオブジェクトコードを
無効な実行コードに置き換えると共に、所定の制御フロ
ーコードを付加して主記憶に読み込むことを特徴とする
請求項1記載のファイルシステム。
4. The access unit invalidates the object code of the partial area when executing an object file having a partial area whose execution is permitted by the protection information and prohibited by the partial protection information. 2. The file system according to claim 1, wherein the file system is replaced with a different execution code, and a predetermined control flow code is added and read into the main memory.
【請求項5】 前記アクセス手段は、前記保護情報によ
って参照が許可され、かつ前記部分保護情報によって実
行が禁止されている部分領域を持つオブジェクトライブ
ラリファイルをリンクする時、前記部分領域の保護され
たモジュールは無効な実行コードに置き換えると共に、
所定の制御フローコードを付加してリンクすることを特
徴とする請求項1記載のファイルシステム。
5. The access means protects the partial area when linking an object library file having a partial area whose reference is permitted by the protection information and whose execution is prohibited by the partial protection information. Replace the module with invalid execution code,
The file system according to claim 1, wherein the file system is linked by adding a predetermined control flow code.
JP4262117A 1992-09-30 1992-09-30 File system Pending JPH06110763A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4262117A JPH06110763A (en) 1992-09-30 1992-09-30 File system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4262117A JPH06110763A (en) 1992-09-30 1992-09-30 File system

Publications (1)

Publication Number Publication Date
JPH06110763A true JPH06110763A (en) 1994-04-22

Family

ID=17371288

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4262117A Pending JPH06110763A (en) 1992-09-30 1992-09-30 File system

Country Status (1)

Country Link
JP (1) JPH06110763A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012174147A (en) * 2011-02-23 2012-09-10 Fujitsu Ltd Information providing program, information providing apparatus, and information providing method
CN113361231A (en) * 2021-07-06 2021-09-07 北京字跳网络技术有限公司 Information reference method, system, device and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012174147A (en) * 2011-02-23 2012-09-10 Fujitsu Ltd Information providing program, information providing apparatus, and information providing method
CN113361231A (en) * 2021-07-06 2021-09-07 北京字跳网络技术有限公司 Information reference method, system, device and electronic equipment
CN113361231B (en) * 2021-07-06 2024-05-28 北京字跳网络技术有限公司 Information quotation method, system, device and electronic equipment

Similar Documents

Publication Publication Date Title
US11436163B2 (en) System and method for logical deletion of stored data objects
US6826604B2 (en) Input/output device information management system for multi-computer system
JP2912840B2 (en) File management system
US6247024B1 (en) Method and system for performing deferred file removal in a file system
Jones et al. A language extension for expressing constraints on data access
US7539680B2 (en) Revision control for database of evolved design
Wulf et al. Hydra: The kernel of a multiprocessor operating system
US5734899A (en) Device for managing data in a version
US5832263A (en) System and method for in-place modification of information recorded in read-only storage using modifiable non-volatile storage associated with an agent
KR100905564B1 (en) Content management method and content management apparatus
US10417179B2 (en) Method for managing files and apparatus using the same
US8452740B2 (en) Method and system for security of file input and output of application programs
JPH07262072A (en) File controller
JP3727076B2 (en) Program management method and apparatus
AU2005239729A1 (en) Systems and methods for reconciling image metadata
US5901311A (en) Access key protection for computer system data
Flink et al. System V/MLS labeling and mandatory policy alternatives
JPH06110763A (en) File system
JPH04344955A (en) Temporary change method for access right
CN107688732B (en) Resource permission configuration and acquisition method and device
JPS63153633A (en) Use limitation system for program
JPS5947341B2 (en) Dynamic exclusive control method for index sequential files
JPH07253894A (en) Shared storage device
JP2001202279A (en) File managing method and file managing program recording medium
JPH01208762A (en) Read/write protect control system