関数 | |
static int | readonly_connect (vfs_handle_struct *handle, const char *service, const char *user) |
NTSTATUS | vfs_readonly_init (void) |
変数 | |
static vfs_op_tuple | readonly_op_tuples [] |
static int readonly_connect | ( | vfs_handle_struct * | handle, | |
const char * | service, | |||
const char * | user | |||
) | [static] |
vfs_readonly.c の 57 行で定義されています。
参照先 get_date()・handle・lp_parm_string_list().
00060 { 00061 const char *period_def[] = {"today 0:0:0", "tomorrow 0:0:0"}; 00062 00063 const char **period = lp_parm_string_list(SNUM(handle->conn), 00064 (handle->param ? handle->param : MODULE_NAME), 00065 "period", period_def); 00066 00067 if (period && period[0] && period[1]) { 00068 time_t current_time = time(NULL); 00069 time_t begin_period = get_date(period[0], ¤t_time); 00070 time_t end_period = get_date(period[1], ¤t_time); 00071 00072 if ((current_time >= begin_period) && (current_time <= end_period)) { 00073 handle->conn->read_only = True; 00074 } 00075 00076 return SMB_VFS_NEXT_CONNECT(handle, service, user); 00077 00078 } else { 00079 00080 return 1; 00081 00082 } 00083 }
NTSTATUS vfs_readonly_init | ( | void | ) |
vfs_readonly.c の 95 行で定義されています。
参照先 readonly_op_tuples・smb_register_vfs().
00096 { 00097 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE_NAME, readonly_op_tuples); 00098 }
vfs_op_tuple readonly_op_tuples[] [static] |
初期値:
{ {SMB_VFS_OP(readonly_connect), SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_TRANSPARENT}, {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP} }
vfs_readonly.c の 88 行で定義されています。
参照元 vfs_readonly_init().