modules/vfs_readonly.c

ソースコードを見る。

関数

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.c57 行で定義されています。

参照先 get_date()handlelp_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], &current_time);
00070     time_t end_period   = get_date(period[1], &current_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.c95 行で定義されています。

参照先 readonly_op_tuplessmb_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]

初期値:

vfs_readonly.c88 行で定義されています。

参照元 vfs_readonly_init().


Sambaに対してSat Aug 29 21:23:52 2009に生成されました。  doxygen 1.4.7