データ構造 | |
struct | smb_passwd |
struct | smbpasswd_privates |
列挙型 | |
enum | pwf_access_type { PWF_READ, PWF_UPDATE, PWF_CREATE } |
関数 | |
static void | gotalarm_sig (void) |
static BOOL | do_file_lock (int fd, int waitsecs, int type) |
static BOOL | pw_file_lock (int fd, int type, int secs, int *plock_depth) |
static BOOL | pw_file_unlock (int fd, int *plock_depth) |
static void | pdb_init_smb (struct smb_passwd *user) |
static FILE * | startsmbfilepwent (const char *pfile, enum pwf_access_type type, int *lock_depth) |
変数 | |
static SIG_ATOMIC_T | gotalarm |
enum pwf_access_type |
static void gotalarm_sig | ( | void | ) | [static] |
static BOOL do_file_lock | ( | int | fd, | |
int | waitsecs, | |||
int | type | |||
) | [static] |
pdb_smbpasswd.c の 83 行で定義されています。
参照先 CatchSignal()・gotalarm・gotalarm_sig().
参照元 pw_file_lock()・pw_file_unlock().
00084 { 00085 SMB_STRUCT_FLOCK lock; 00086 int ret; 00087 void (*oldsig_handler)(int); 00088 00089 gotalarm = 0; 00090 oldsig_handler = CatchSignal(SIGALRM, SIGNAL_CAST gotalarm_sig); 00091 00092 lock.l_type = type; 00093 lock.l_whence = SEEK_SET; 00094 lock.l_start = 0; 00095 lock.l_len = 1; 00096 lock.l_pid = 0; 00097 00098 alarm(waitsecs); 00099 /* Note we must *NOT* use sys_fcntl here ! JRA */ 00100 ret = fcntl(fd, SMB_F_SETLKW, &lock); 00101 alarm(0); 00102 CatchSignal(SIGALRM, SIGNAL_CAST oldsig_handler); 00103 00104 if (gotalarm) { 00105 DEBUG(0, ("do_file_lock: failed to %s file.\n", 00106 type == F_UNLCK ? "unlock" : "lock")); 00107 return False; 00108 } 00109 00110 return (ret == 0); 00111 }
static BOOL pw_file_lock | ( | int | fd, | |
int | type, | |||
int | secs, | |||
int * | plock_depth | |||
) | [static] |
pdb_smbpasswd.c の 117 行で定義されています。
参照先 do_file_lock()・errno・strerror().
参照元 startsmbfilepwent().
00118 { 00119 if (fd < 0) { 00120 return False; 00121 } 00122 00123 if(*plock_depth == 0) { 00124 if (!do_file_lock(fd, secs, type)) { 00125 DEBUG(10,("pw_file_lock: locking file failed, error = %s.\n", 00126 strerror(errno))); 00127 return False; 00128 } 00129 } 00130 00131 (*plock_depth)++; 00132 00133 return True; 00134 }
static BOOL pw_file_unlock | ( | int | fd, | |
int * | plock_depth | |||
) | [static] |
pdb_smbpasswd.c の 140 行で定義されています。
参照先 do_file_lock()・errno・strerror().
参照元 startsmbfilepwent().
00141 { 00142 BOOL ret=True; 00143 00144 if (fd == 0 || *plock_depth == 0) { 00145 return True; 00146 } 00147 00148 if(*plock_depth == 1) { 00149 ret = do_file_lock(fd, 5, F_UNLCK); 00150 } 00151 00152 if (*plock_depth > 0) { 00153 (*plock_depth)--; 00154 } 00155 00156 if(!ret) { 00157 DEBUG(10,("pw_file_unlock: unlocking file failed, error = %s.\n", 00158 strerror(errno))); 00159 } 00160 return ret; 00161 }
static void pdb_init_smb | ( | struct smb_passwd * | user | ) | [static] |
pdb_smbpasswd.c の 167 行で定義されています。
参照先 smb_passwd::pass_last_set_time.
参照元 startsmbfilepwent().
00168 { 00169 if (user == NULL) 00170 return; 00171 ZERO_STRUCTP (user); 00172 00173 user->pass_last_set_time = (time_t)0; 00174 }
static FILE* startsmbfilepwent | ( | const char * | pfile, | |
enum pwf_access_type | type, | |||
int * | lock_depth | |||
) | [static] |
pdb_smbpasswd.c の 183 行で定義されています。
参照先 smb_passwd::acct_ctrl・c・errno・fd・fp・smb_passwd::pass_last_set_time・pdb_decode_acct_ctrl()・pdb_gethexpwd()・pdb_init_smb()・smbpasswd_privates::pw_buf・pw_file_lock()・pw_file_unlock()・PWF_CREATE・PWF_READ・PWF_UPDATE・smb_passwd::smb_name・smb_passwd::smb_nt_passwd・smb_passwd::smb_passwd・smb_passwd::smb_userid・smbpasswd_privates::smbntpwd・smbpasswd_privates::smbpwd・status・strchr_m()・strerror()・StrnCaseCmp()・strnequal()・sys_fopen()・sys_fstat()・sys_open()・sys_stat()・sys_usleep()・smbpasswd_privates::user_name・user_name.
SIG_ATOMIC_T gotalarm [static] |
pdb_smbpasswd.c の 67 行で定義されています。