mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 10:06:14 +00:00
jacobsa fuse: add uid and gid in create ops
Add Uid and Gid fields in MkDirOp/MkNodOp/CreateFileOp/CreateSymlinkOp Signed-off-by: Shuoran Liu <shuoranliu@gmail.com>
This commit is contained in:
parent
f72bb5475f
commit
7ee565d148
7
vendor/github.com/jacobsa/fuse/conversions.go
generated
vendored
7
vendor/github.com/jacobsa/fuse/conversions.go
generated
vendored
@ -140,6 +140,9 @@ func convertInMessage(
|
||||
// opcode is mkdir. But we want the correct mode to go through, so ensure
|
||||
// that os.ModeDir is set.
|
||||
Mode: convertFileMode(in.Mode) | os.ModeDir,
|
||||
|
||||
Uid: inMsg.Header().Uid,
|
||||
Gid: inMsg.Header().Gid,
|
||||
}
|
||||
|
||||
case fusekernel.OpMknod:
|
||||
@ -161,6 +164,8 @@ func convertInMessage(
|
||||
Parent: fuseops.InodeID(inMsg.Header().Nodeid),
|
||||
Name: string(name),
|
||||
Mode: convertFileMode(in.Mode),
|
||||
Uid: inMsg.Header().Uid,
|
||||
Gid: inMsg.Header().Gid,
|
||||
}
|
||||
|
||||
case fusekernel.OpCreate:
|
||||
@ -182,6 +187,8 @@ func convertInMessage(
|
||||
Parent: fuseops.InodeID(inMsg.Header().Nodeid),
|
||||
Name: string(name),
|
||||
Mode: convertFileMode(in.Mode),
|
||||
Uid: inMsg.Header().Uid,
|
||||
Gid: inMsg.Header().Gid,
|
||||
}
|
||||
|
||||
case fusekernel.OpSymlink:
|
||||
|
||||
9
vendor/github.com/jacobsa/fuse/fuseops/ops.go
generated
vendored
9
vendor/github.com/jacobsa/fuse/fuseops/ops.go
generated
vendored
@ -229,6 +229,8 @@ type MkDirOp struct {
|
||||
// The name of the child to create, and the mode with which to create it.
|
||||
Name string
|
||||
Mode os.FileMode
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
|
||||
// Set by the file system: information about the inode that was created.
|
||||
//
|
||||
@ -256,6 +258,8 @@ type MkNodeOp struct {
|
||||
// The name of the child to create, and the mode with which to create it.
|
||||
Name string
|
||||
Mode os.FileMode
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
|
||||
// Set by the file system: information about the inode that was created.
|
||||
//
|
||||
@ -281,6 +285,8 @@ type CreateFileOp struct {
|
||||
// The name of the child to create, and the mode with which to create it.
|
||||
Name string
|
||||
Mode os.FileMode
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
|
||||
// Set by the file system: information about the inode that was created.
|
||||
//
|
||||
@ -308,6 +314,9 @@ type CreateSymlinkOp struct {
|
||||
// The name of the symlink to create.
|
||||
Name string
|
||||
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
|
||||
// The target of the symlink.
|
||||
Target string
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user