関数 | |
static int | fake_perms_stat (vfs_handle_struct *handle, const char *fname, SMB_STRUCT_STAT *sbuf) |
static int | fake_perms_fstat (vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf) |
NTSTATUS | vfs_fake_perms_init (void) |
変数 | |
current_user | current_user |
static vfs_op_tuple | fake_perms_ops [] |
static int fake_perms_stat | ( | vfs_handle_struct * | handle, | |
const char * | fname, | |||
SMB_STRUCT_STAT * | sbuf | |||
) | [static] |
vfs_fake_perms.c の 32 行で定義されています。
参照先 current_user・_unix_token::gid・handle・_unix_token::uid・current_user::ut.
00033 { 00034 int ret = -1; 00035 00036 ret = SMB_VFS_NEXT_STAT(handle, fname, sbuf); 00037 if (ret == 0) { 00038 if (S_ISDIR(sbuf->st_mode)) { 00039 sbuf->st_mode = S_IFDIR | S_IRWXU; 00040 } else { 00041 sbuf->st_mode = S_IRWXU; 00042 } 00043 sbuf->st_uid = current_user.ut.uid; 00044 sbuf->st_gid = current_user.ut.gid; 00045 } 00046 00047 return ret; 00048 }
static int fake_perms_fstat | ( | vfs_handle_struct * | handle, | |
files_struct * | fsp, | |||
int | fd, | |||
SMB_STRUCT_STAT * | sbuf | |||
) | [static] |
vfs_fake_perms.c の 50 行で定義されています。
参照先 current_user・_unix_token::gid・handle・_unix_token::uid・current_user::ut.
00051 { 00052 int ret = -1; 00053 00054 ret = SMB_VFS_NEXT_FSTAT(handle, fsp, fd, sbuf); 00055 if (ret == 0) { 00056 if (S_ISDIR(sbuf->st_mode)) { 00057 sbuf->st_mode = S_IFDIR | S_IRWXU; 00058 } else { 00059 sbuf->st_mode = S_IRWXU; 00060 } 00061 sbuf->st_uid = current_user.ut.uid; 00062 sbuf->st_gid = current_user.ut.gid; 00063 } 00064 return ret; 00065 }
NTSTATUS vfs_fake_perms_init | ( | void | ) |
vfs_fake_perms.c の 77 行で定義されています。
参照先 fake_perms_ops・smb_register_vfs().
00078 { 00079 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "fake_perms", fake_perms_ops); 00080 }
struct current_user current_user |
vfs_op_tuple fake_perms_ops[] [static] |
初期値:
{ {SMB_VFS_OP(fake_perms_stat), SMB_VFS_OP_STAT, SMB_VFS_LAYER_TRANSPARENT}, {SMB_VFS_OP(fake_perms_fstat), SMB_VFS_OP_FSTAT, SMB_VFS_LAYER_TRANSPARENT}, {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP} }
vfs_fake_perms.c の 69 行で定義されています。